Browse Source

fix:业主端首次加载首页显示异常

master
liujiangyong 2 years ago
parent
commit
9d77025124
  1. 11
      weapp/pages/index/index.js

11
weapp/pages/index/index.js

@ -108,14 +108,21 @@ Page({
wx.reLaunch({
url: '/pages/login/login'
});
} else {
return
}
const userRole = wx.getStorageSync('userRole');
if (userRole && userRole.includes('管理')) {
wx.reLaunch({
url: '/pages/home/home'
});
return
}
this.getData();
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
selected: 0
})
}
}
},
/**

Loading…
Cancel
Save