|
@ -9,19 +9,19 @@ Page({ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 巡检
|
|
|
// 巡检
|
|
|
bindPolling () { |
|
|
bindPolling() { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: '/package/polling/polling', |
|
|
url: '/package/polling/polling', |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
bindTroubleshooting () { |
|
|
bindTroubleshooting() { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: '/package/troubleshooting/index', |
|
|
url: '/package/troubleshooting/index', |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
bindInspectionReport () { |
|
|
bindInspectionReport() { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: '/package/inspectionReport/inspectionReport', |
|
|
url: '/package/inspectionReport/inspectionReport', |
|
|
}) |
|
|
}) |
|
@ -30,21 +30,28 @@ Page({ |
|
|
/** |
|
|
/** |
|
|
* 生命周期函数--监听页面加载 |
|
|
* 生命周期函数--监听页面加载 |
|
|
*/ |
|
|
*/ |
|
|
onLoad (options) { |
|
|
onLoad(options) { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
*/ |
|
|
*/ |
|
|
onReady () { |
|
|
onReady() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 生命周期函数--监听页面显示 |
|
|
* 生命周期函数--监听页面显示 |
|
|
*/ |
|
|
*/ |
|
|
onShow () { |
|
|
onShow() { |
|
|
|
|
|
const userRole = wx.getStorageSync('userRole'); |
|
|
|
|
|
if (userRole && userRole.includes('管理')) { |
|
|
|
|
|
wx.reLaunch({ |
|
|
|
|
|
url: '/pages/workbench/workbench' |
|
|
|
|
|
}); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
|
|
if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
|
|
this.getTabBar().setData({ |
|
|
this.getTabBar().setData({ |
|
|
selected: 1 |
|
|
selected: 1 |
|
@ -55,35 +62,35 @@ Page({ |
|
|
/** |
|
|
/** |
|
|
* 生命周期函数--监听页面隐藏 |
|
|
* 生命周期函数--监听页面隐藏 |
|
|
*/ |
|
|
*/ |
|
|
onHide () { |
|
|
onHide() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 生命周期函数--监听页面卸载 |
|
|
* 生命周期函数--监听页面卸载 |
|
|
*/ |
|
|
*/ |
|
|
onUnload () { |
|
|
onUnload() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 页面相关事件处理函数--监听用户下拉动作 |
|
|
* 页面相关事件处理函数--监听用户下拉动作 |
|
|
*/ |
|
|
*/ |
|
|
onPullDownRefresh () { |
|
|
onPullDownRefresh() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 页面上拉触底事件的处理函数 |
|
|
* 页面上拉触底事件的处理函数 |
|
|
*/ |
|
|
*/ |
|
|
onReachBottom () { |
|
|
onReachBottom() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 用户点击右上角分享 |
|
|
* 用户点击右上角分享 |
|
|
*/ |
|
|
*/ |
|
|
onShareAppMessage () { |
|
|
onShareAppMessage() { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |