index.js
2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// pages/zong/index.js
import {
getPatrolRecordList
} from "../../api/tour.js";
const App = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
navHeight: App.globalData.navHeight,
windowHeight: App.globalData.windowHeight,
windowWidth: App.globalData.windowWidth,
menuItems: [{
name: '基础客流',
icon: '1',
path: '/pages/zong/basic/index'
},
{
name: '进出客流',
icon: '2',
path: '/pages/zong/contrast/index'
},
{
name: '排行榜',
icon: '3',
path: '/pages/zong/ranking/index'
},
{
name: '同环比',
icon: '4',
path: '/pages/zong/sequential/index'
},
{
name: '时段客流',
icon: '5',
path: '/pages/zong/timeTravel/index'
},
{
name: '节假日客流',
icon: '6',
path: '/pages/zong/holiday-comparison/index'
},
],
tourItems:[{
name: '实时监控',
icon: '8',
path: '/pages/tour/gate/index?type=view'
},{
name: '远程巡店',
icon: '9',
path: '/pages/tour/gate/index?type=tour'
},{
name: '点检巡店',
icon: '10',
path: '/pages/tour/point/index'
},{
name: '我发起的',
icon: '11',
path: '/pages/tour/list/index?type=create'
},{
name: '待我处理',
icon: '12',
path: '/pages/tour/list/index?type=handle'
}]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
const deploymentType = wx.getStorageSync('deploymentType');
const { menuItems } = this.data
if (deploymentType === 'store') {
menuItems.push({
name: '进店率',
icon: '7',
path: '/pages/zong/entry-rate/index'
})
this.setData({ menuItems })
}
},
goOtherPage: function(e) {
const { path } = e.currentTarget.dataset.value
wx.navigateTo({ url: path })
}
})