Browse Source

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

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

11
weapp/pages/index/index.js

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

Loading…
Cancel
Save