uniapp 插件市场
```
<template>
<view>
<view style="width:100%;height: 500px;"><l-echart ref="chartRef"></l-echart></view>
</view>
</template>
<script>
const app = getApp();
import componentNoData from '../../components/no-data/no-data';
import componentBottomLine from '../../components/bottom-line/bottom-line';
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
var common_static_url = app.globalData.get_static_url('common');
export default {
data() {
return {
option: {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true
}
]
},
}
},
onLoad(params) {
// 调用公共事件方法
console.log(params)
// app.globalData.page_event_onload_handle(params);
// // 设置参数
// this.setData({
// params: params,
// });
this.init()
},
methods: {
async init() {
// chart 图表实例不能存在data里
const chart = await this.$refs.chartRef.init(echarts);
var _this = this
uni.request({
url: app.globalData.get_request_url('line', 'buy'),
method: 'POST',
dataType: 'json',
success: (res) => {
chart.setOption(res.data.option)
}
})
}
}
}
</script>
<style>
</style>
```