| | |
| | | click: (url: string, index: number) => typeof url === 'string', |
| | | }; |
| | | |
| | | const whitePageList = [RouterPath.home, RouterPath.mine]; |
| | | const whitePageList = [RouterPath.task, RouterPath.mine]; |
| | | |
| | | export default { |
| | | name: 'CustomTabBar', |
| | |
| | | Message.confirm({ message: '请前往登录' }) |
| | | .then(() => { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.authorization}?redirect=${RouterPath.home}`, |
| | | url: `${RouterPath.authorization}?redirect=${RouterPath.task}`, |
| | | }); |
| | | }) |
| | | .finally(() => { |
| | |
| | | }} |
| | | > |
| | | <TarBarItem |
| | | text={'找工作'} |
| | | icon="../assets/tabbar/icon-home.png" |
| | | activeIcon="../assets/tabbar/icon-home-active.png" |
| | | pagePath={TabBarPageRouter.Home} |
| | | currentPath={_router.path} |
| | | index={0} |
| | | active={system.activeTab === 0} |
| | | className="home" |
| | | onClick={switchTab} |
| | | ></TarBarItem> |
| | | |
| | | <TarBarItem |
| | | text="任务" |
| | | icon="../assets/tabbar/icon-task.png" |
| | | activeIcon="../assets/tabbar/icon-task-active.png" |
| | | pagePath={TabBarPageRouter.Task} |
| | | currentPath={_router.path} |
| | | active={system.activeTab === 1} |
| | | active={system.activeTab === 0} |
| | | className="task" |
| | | onClick={switchTab} |
| | | index={1} |
| | | index={0} |
| | | ></TarBarItem> |
| | | <TarBarItem |
| | | text="我的" |
| | |
| | | activeIcon="../assets/tabbar/icon-mine-active.png" |
| | | pagePath={TabBarPageRouter.Mine} |
| | | currentPath={_router.path} |
| | | active={system.activeTab === 2} |
| | | active={system.activeTab === 1} |
| | | className="mine" |
| | | onClick={switchTab} |
| | | index={2} |
| | | index={1} |
| | | ></TarBarItem> |
| | | </View> |
| | | ); |