add member page & tabbar item

This commit is contained in:
Dawn_Ocean
2024-03-11 19:22:51 +08:00
parent 2920059ffa
commit afdedea344
10 changed files with 144 additions and 46 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ import type CustomTabBar from '@/custom-tab-bar';
import PageFooter from '@/components/PageFooter/PageFooter';
import aboutIcon from '@/assets/icons/AboutPage/about.svg';
import pt, { Lang } from '@/plain-text';
import wechatUser from '@/wechat';
import logo from '@/assets/images/UserPage/logo.png';
import './user.scss';
@@ -23,13 +24,14 @@ export default class UserPage extends Component {
clicks: memberClickTimes,
isToastOpen: false,
toastText: '',
haveAccess: wechatUser.getAccess(),
};
// 以下是TabBar相关
pageCtx = Taro.getCurrentInstance().page;
componentDidShow() {
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx);
tabbar?.setSelected(2);
tabbar?.setSelected(this.state.haveAccess ? 3 : 2);
}
// 以上是TabBar相关