| | |
| | | const index = Object.values(TabBarPageRouterForCheck).findIndex((x) => option.url.includes(x)); |
| | | console.log('index: ', index); |
| | | systemStore.setTabIndex(index); |
| | | Taro.switchTab(option); |
| | | RouteHelper.switchTab(option); |
| | | }; |
| | | return switchTab; |
| | | } |
| | |
| | | const channelId = router.params?.channelId ?? ''; |
| | | console.log('router: params', router, blLifeRecharge.accountModel.channlesNum); |
| | | |
| | | Taro.useTabItemTap((item) => { |
| | | Taro.reLaunch({ |
| | | url: pathAddExtraParam(item.pagePath, { channelId: blLifeRecharge.accountModel.channlesNum }), |
| | | success() { |
| | | appStore.setLatestRoute(''); |
| | | }, |
| | | }); |
| | | }); |
| | | |
| | | Taro.useDidShow(() => { |
| | | console.log('latestRoute.value: ', latestRoute.value); |
| | | const isTabbarPage = Object.values(TabBarPageRouterForCheck).some((x) => |
| | | latestRoute.value.toLowerCase().includes(x.toLowerCase()) |
| | | ); |
| | | const currentIsTabbarPage = Object.values(TabBarPageRouterForCheck).some((x) => |
| | | getRouterPath(router.path).toLowerCase().includes(x.toLowerCase()) |
| | | ); |
| | | console.log('currentIsTabbarPage: ', currentIsTabbarPage); |
| | | if (currentIsTabbarPage && blLifeRecharge.accountModel.channlesNum && !channelId) { |
| | | Taro.reLaunch({ |
| | | url: pathAddExtraParam(router.path, { channelId: blLifeRecharge.accountModel.channlesNum }), |
| | | success() { |
| | | appStore.setLatestRoute(''); |
| | | }, |
| | | }); |
| | | return; |
| | | } |
| | | // const currentIsTabbarPage = Object.values(TabBarPageRouterForCheck).some((x) => |
| | | // getRouterPath(router.path).toLowerCase().includes(x.toLowerCase()) |
| | | // ); |
| | | // if (currentIsTabbarPage && blLifeRecharge.accountModel.channlesNum && !channelId) { |
| | | // Taro.reLaunch({ |
| | | // url: pathAddExtraParam(router.path, { channelId: blLifeRecharge.accountModel.channlesNum }), |
| | | // success() { |
| | | // appStore.setLatestRoute(''); |
| | | // }, |
| | | // }); |
| | | // return; |
| | | // } |
| | | if (isTabbarPage && isInAlipay) { |
| | | Taro.reLaunch({ |
| | | url: router.path, |