change tab-bar logic

This commit is contained in:
Dawn1Ocean
2024-03-19 22:54:35 +08:00
parent db11f03bda
commit 239d4f0c7c
3 changed files with 6 additions and 14 deletions
+1 -1
View File
@@ -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相关
+1 -1
View File
@@ -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相关