@ -45,6 +45,13 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
const userRole = wx.getStorageSync('userRole');
if (userRole && userRole.includes('管理')) {
wx.reLaunch({
url: '/pages/workbench/workbench'
});
return
}
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 1