From 9e5a47d90455c4770815d32899f660b53fc27110 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期四, 22 五月 2025 13:26:09 +0800 Subject: [PATCH] Merge branch 'dev-ui' of http://120.26.58.240:8888/r/LifePaymentFront into dev-ui --- apps/taro/src/hooks/router.ts | 35 +++++++++++++++++++++-------------- 1 files changed, 21 insertions(+), 14 deletions(-) diff --git a/apps/taro/src/hooks/router.ts b/apps/taro/src/hooks/router.ts index d8f82a8..e53ba52 100644 --- a/apps/taro/src/hooks/router.ts +++ b/apps/taro/src/hooks/router.ts @@ -57,24 +57,31 @@ 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, -- Gitblit v1.9.1