add member page & tabbar item
This commit is contained in:
@@ -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相关
|
||||
|
||||
|
||||
Reference in New Issue
Block a user