| | |
| | | export default defineAppConfig({ |
| | | entryPagePath: 'pages/home/index', |
| | | pages: ['pages/home/index', 'pages/task/task', 'pages/mine/index'], |
| | | entryPagePath: 'pages/mine/index', |
| | | pages: ['pages/task/task', 'pages/mine/index'], |
| | | requiredPrivateInfos: ['getLocation', 'chooseLocation'], |
| | | permission: { |
| | | 'scope.userLocation': { |
| | |
| | | }, |
| | | tabBar: { |
| | | list: [ |
| | | { |
| | | pagePath: 'pages/home/index', |
| | | iconPath: 'assets/tabbar/icon-home.png', |
| | | selectedIconPath: 'assets/tabbar/icon-home-active.png', |
| | | text: '首页', |
| | | }, |
| | | // { |
| | | // pagePath: 'pages/home/index', |
| | | // iconPath: 'assets/tabbar/icon-home.png', |
| | | // selectedIconPath: 'assets/tabbar/icon-home-active.png', |
| | | // text: '首页', |
| | | // }, |
| | | { |
| | | pagePath: 'pages/task/task', |
| | | iconPath: 'assets/tabbar/icon-task.png', |
| | |
| | | privacyPolicy = '/subpackages/login/privacyPolicy/privacyPolicy', |
| | | loginByForm = '/subpackages/login/loginByForm/loginByForm', |
| | | registerForm = '/subpackages/login/registerForm/registerForm', |
| | | home = '/pages/home/index', |
| | | // home = '/pages/home/index', |
| | | task = '/pages/task/task', |
| | | mine = '/pages/mine/index', |
| | | editRichContent = '/subpackages/editRichContent/editRichContent', |
| | |
| | | export const TabBarPageRouter = { |
| | | Home: '/pages/home/index', |
| | | // Home: '/pages/home/index', |
| | | Task: '/pages/task/task', |
| | | Mine: '/pages/mine/index', |
| | | }; |
| | | |
| | | export const TabBarPageRouterList = [ |
| | | TabBarPageRouter.Home, |
| | | // TabBarPageRouter.Home, |
| | | TabBarPageRouter.Task, |
| | | TabBarPageRouter.Mine, |
| | | ]; |
| | |
| | | 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> |
| | | ); |
| | |
| | | state: () => ({ |
| | | options: {} as Options, |
| | | |
| | | activeTab: 0, |
| | | activeTab: 1, |
| | | |
| | | info: {} as Taro.getSystemInfoSync.Result, |
| | | |
| | |
| | | |
| | | export function goHome() { |
| | | const systemStore = useSystemStoreWithOut(); |
| | | systemStore.setTabIndex(0); |
| | | systemStore.setTabIndex(1); |
| | | Taro.switchTab({ |
| | | url: '/pages/home/index', |
| | | url: '/pages/mine/index', |
| | | }); |
| | | } |