|
@ -45,6 +45,13 @@ Page({ |
|
|
* 生命周期函数--监听页面显示 |
|
|
* 生命周期函数--监听页面显示 |
|
|
*/ |
|
|
*/ |
|
|
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 |
|
|