change tab-bar logic
This commit is contained in:
@@ -122,7 +122,7 @@ export default class MemberPage extends Component<{}, MemberPageState> {
|
||||
pageCtx = Taro.getCurrentInstance().page;
|
||||
componentDidShow() {
|
||||
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx);
|
||||
tabbar?.setSelected(2);
|
||||
tabbar?.setSelected(0);
|
||||
}
|
||||
// 以上是TabBar相关
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ export default class UserPage extends Component {
|
||||
pageCtx = Taro.getCurrentInstance().page;
|
||||
componentDidShow() {
|
||||
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx);
|
||||
tabbar?.setSelected(wechatUser.getAccess() ? 3 : 2);
|
||||
tabbar?.setSelected(2);
|
||||
}
|
||||
// 以上是TabBar相关
|
||||
|
||||
|
||||
Reference in New Issue
Block a user