add member page & tabbar item
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component, ReactNode } from 'react';
|
||||
import { AtTabBar } from 'taro-ui';
|
||||
import Taro from '@tarojs/taro';
|
||||
import pt from '@/plain-text';
|
||||
import wechatUser from '@/wechat';
|
||||
import 'taro-ui/dist/style/index.scss';
|
||||
import './index.scss';
|
||||
|
||||
@@ -14,6 +15,10 @@ const navList: Array<Taro.TabBarItem> = [
|
||||
pagePath: '/pages/repair/repair',
|
||||
text: pt.get().tabBar.repairText,
|
||||
},
|
||||
{
|
||||
pagePath: '/pages/member/member',
|
||||
text: pt.get().tabBar.memberText,
|
||||
},
|
||||
{
|
||||
pagePath: '/pages/user/user',
|
||||
text: pt.get().tabBar.userText,
|
||||
@@ -23,20 +28,39 @@ const navList: Array<Taro.TabBarItem> = [
|
||||
export default class Index extends Component {
|
||||
state = {
|
||||
selected: 0,
|
||||
tabList: [
|
||||
{
|
||||
title: pt.get().tabBar.indexText,
|
||||
iconType: 'home',
|
||||
},
|
||||
{
|
||||
title: pt.get().tabBar.repairText,
|
||||
iconType: 'settings',
|
||||
},
|
||||
{
|
||||
title: pt.get().tabBar.userText,
|
||||
iconType: 'user',
|
||||
},
|
||||
],
|
||||
tabList: wechatUser.getAccess()
|
||||
? [
|
||||
{
|
||||
title: pt.get().tabBar.indexText,
|
||||
iconType: 'home',
|
||||
},
|
||||
{
|
||||
title: pt.get().tabBar.repairText,
|
||||
iconType: 'settings',
|
||||
},
|
||||
{
|
||||
title: pt.get().tabBar.memberText,
|
||||
iconType: 'sketch',
|
||||
},
|
||||
{
|
||||
title: pt.get().tabBar.userText,
|
||||
iconType: 'user',
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
title: pt.get().tabBar.indexText,
|
||||
iconType: 'home',
|
||||
},
|
||||
{
|
||||
title: pt.get().tabBar.repairText,
|
||||
iconType: 'settings',
|
||||
},
|
||||
{
|
||||
title: pt.get().tabBar.userText,
|
||||
iconType: 'user',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
handleClick(idx: number) {
|
||||
|
||||
Reference in New Issue
Block a user