123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- Page({
- data: {
- name: wx.getStorageSync('username'),
- avatar: wx.getStorageSync('avatar'),
- role: wx.getStorageSync('role'),
- current: 1,
- list: [{
- id: 1,
- text: '修改密码',
- imgUrl: 'http://resource.bike.hanyiyun.com/bike_yunwei/pwd.png',
- isShow:true,
- },
- {
- id: 2,
- text: '地勤人员',
- imgUrl: 'http://resource.bike.hanyiyun.com/bike_yunwei/worker.png',
- isShow:true,
- },
- {
- id: 7,
- text: '用户反馈',
- imgUrl: 'http://resource.bike.hanyiyun.com/yunwei/feedBack.png',
- isShow:true,
- },
- {
- id: 8,
- text: '用户报修',
- imgUrl: 'http://resource.bike.hanyiyun.com/yunwei/repair.png',
- isShow:true,
- },
- {
- id: 3,
- text: '中控管理',
- imgUrl: 'http://resource.bike.hanyiyun.com/yunwei/control.png',
- isShow:true,
- },
- {
- id: 4,
- text: '数据统计',
- imgUrl: 'http://resource.bike.hanyiyun.com/yunwei/statistics.png',
- isShow:wx.getStorageSync('role')=='管理员' || '技术管理员' ? true : false
- },
- // {
- // id: 5,
- // text: '热力地图',
- // imgUrl: 'http://resource.bike.hanyiyun.com/yunwei/hot.png'
- // },
- {
- id: 6,
- text: '停车区管理',
- imgUrl: 'http://resource.bike.hanyiyun.com/bike_yunwei/parkMange.png',
- isShow:true,
- },
- ]
- },
- onLoad: function () {
- console.log(wx.getStorageSync('allArea'))
- },
- scanCode: function () {
- wx.reLaunch({
- url: '/pages/logs/logs?scan=' + 1,
- })
- },
- skipNext(e) {
- let idx = e.currentTarget.dataset.id;
- let url = '';
- switch (idx) {
- case 1:
- url = "/pages/password/password";
- break;
- case 2:
- url = "/pages/personnel/personnel";
- break;
- case 3:
- url = "/pages/control/control";
- break;
- case 4:
- url = "/pages/lineChart/lineChart";
- break;
- case 5:
- url = "/pages/chart/chart";
- break;
- case 6:
- url = "/pages/park/park";
- break;
- case 7:
- url = "/pages/feedback/feedback";
- break;
- case 8:
- url = "/pages/repairs/repairs";
- break;
- default:
- break;
- }
- wx.navigateTo({
- url
- })
- },
- //退出登录
- quit() {
- wx.removeStorageSync('username');
- wx.removeStorageSync('avatar');
- wx.removeStorageSync('token');
- wx.removeStorageSync('role');
- wx.removeStorageSync('curVal');
- wx.removeStorageSync('curId');
- wx.reLaunch({
- url: '/pages/login/login',
- })
- },
- onShow: function () {
- this.setData({
- name: wx.getStorageSync('username'),
- avatar: wx.getStorageSync('avatar'),
- role: wx.getStorageSync('role'),
- })
- },
- onShareAppMessage: function () {
- return {
- title: '轻松出行,方便你我',
- path: '/pages/login/login',
- success: function (res) { }
- }
- }
- })
|