You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
// pages/index/index.js
|
|
|
|
import * as echarts from "../../components/echarts/echarts";
|
|
|
|
function initChart(canvas, width, height, dpr) {
|
|
|
|
const chart = echarts.init(canvas, null, {
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
devicePixelRatio: dpr
|
|
|
|
});
|
|
|
|
canvas.setChart(chart);
|
|
|
|
|
|
|
|
var option = {
|
|
|
|
tooltip: {
|
|
|
|
trigger: 'axis',
|
|
|
|
axisPointer: {
|
|
|
|
type: 'shadow'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
legend: {},
|
|
|
|
grid: {
|
|
|
|
left: '3%',
|
|
|
|
right: '4%',
|
|
|
|
bottom: '3%',
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
|
|
|
|
type: 'category',
|
|
|
|
data: ['一月', '二月', '三月', '四月', '五月', '六月','七月','八月','九月','十一月','十二月']
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
type: 'value',
|
|
|
|
boundaryGap: [0, 0.01]
|
|
|
|
},
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
name: '核收数',
|
|
|
|
type: 'bar',
|
|
|
|
data: [10, 20, 46, 120, 90, 80]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '接收数',
|
|
|
|
type: 'bar',
|
|
|
|
data: [20, 56, 46, 30, 45, 60]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
chart.setOption(option);
|
|
|
|
|
|
|
|
return chart;
|
|
|
|
};
|
|
|
|
|
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
ec: {
|
|
|
|
onInit: initChart
|
|
|
|
},
|
|
|
|
msg:[], //首页中间消息列表
|
|
|
|
},
|
|
|
|
|
|
|
|
//自建物流
|
|
|
|
goMelogistics(){
|
|
|
|
wx.navigateTo({
|
|
|
|
url: '../meLogistics/meLogistics',
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
//第三方物流
|
|
|
|
goThreelogistics(){
|
|
|
|
wx.navigateTo({
|
|
|
|
url: '../threeLogistics/threeLogistics',
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
//货运物流
|
|
|
|
goHandover(){
|
|
|
|
wx.navigateTo({
|
|
|
|
url: '../handover/handover',
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
|
*/
|
|
|
|
onHide() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
|
*/
|
|
|
|
onUnload() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
*/
|
|
|
|
onPullDownRefresh() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|