apps/h5/src/components/NavigationBar/CommonNavigationBar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
apps/taro/src/app.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
apps/taro/src/components/NavigationBar/CommonNavigationBar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
apps/taro/src/components/NavigationBar/TransparentNavigationBar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
apps/taro/src/constants/tabBar.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
apps/taro/src/hooks/login.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
apps/taro/src/hooks/router.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
apps/taro/src/utils/page.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
packages/components/src/styles/components.scss | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
packages/components/src/views/Order/OrderRefundResultView.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
packages/utils/common.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
apps/h5/src/components/NavigationBar/CommonNavigationBar.vue
@@ -34,7 +34,7 @@ return !isCanGoBack.value; }); // const isTabbarPage = computed(() => // Object.values(TabBarPageRouter).some((x) => x.toLowerCase() === router.path.toLowerCase()) // Object.values(TabBarPageRouterForCheck).some((x) => x.toLowerCase() === router.path.toLowerCase()) // ); function goBack() { apps/taro/src/app.ts
@@ -52,6 +52,7 @@ onLaunch(options) { if (options.query?.channelId) { console.log('options: ', options); blLifeRecharge.accountModel.setChannlesNum(options.query.channelId); } // 如果是收藏进入 if (options.query.collect) { apps/taro/src/components/NavigationBar/CommonNavigationBar.vue
@@ -25,7 +25,7 @@ import IconArrowWhite from '@/assets/common/icon-navi-arrow-white.png'; import Taro from '@tarojs/taro'; import { goBack } from '@/utils'; import { TabBarPageRouter } from '@/constants'; import { TabBarPageRouterForCheck } from '@/constants'; defineOptions({ name: 'CommonNavigationBar', @@ -43,7 +43,7 @@ }); const isTabbarPage = computed(() => Object.values(TabBarPageRouter).some((x) => x.toLowerCase() === router.path.toLowerCase()) Object.values(TabBarPageRouterForCheck).some((x) => x.toLowerCase() === router.path.toLowerCase()) ); const barStyle = computed(() => { apps/taro/src/components/NavigationBar/TransparentNavigationBar.vue
@@ -25,7 +25,7 @@ import IconArrowWhite from '@/assets/common/icon-navi-arrow-white.png'; import Taro from '@tarojs/taro'; import { goBack } from '@/utils'; import { TabBarPageRouter } from '@/constants'; import { TabBarPageRouterForCheck } from '@/constants'; defineOptions({ name: 'TransparentNavigationBar', @@ -44,7 +44,9 @@ }); const isTabbarPage = computed(() => Object.values(TabBarPageRouter).some((x) => router.path.toLowerCase().includes(x.toLowerCase())) Object.values(TabBarPageRouterForCheck).some((x) => router.path.toLowerCase().includes(x.toLowerCase()) ) ); const barStyle = computed(() => { apps/taro/src/constants/tabBar.ts
@@ -2,7 +2,12 @@ let res = Taro.getLaunchOptionsSync(); console.log('getLaunchOptionsSync: ', res); export const TabBarPageRouterForCheck = { Home: `/pages/home/index`, Mine: `/pages/mine/index`, }; export const TabBarPageRouter = { Home: `/pages/home/index?channelId=${res.query?.channelId}`, Mine: `/pages/mine/index?channelId=${res.query?.channelId}`, Home: `${TabBarPageRouterForCheck['Home']}?channelId=${res.query?.channelId}`, Mine: `${TabBarPageRouterForCheck['Mine']}?channelId=${res.query?.channelId}`, }; apps/taro/src/hooks/login.ts
@@ -2,7 +2,7 @@ import { object2query } from '@life-payment/utils'; import { goBack } from '@/utils'; import { useSwitchTab } from './router'; import { TabBarPageRouter } from '@/constants'; import { TabBarPageRouterForCheck } from '@/constants'; import { useQueryClient } from '@tanstack/vue-query'; function getOtherQuery(query: Partial<Record<string, string>>) { @@ -55,7 +55,7 @@ function jump() { if (redirect) { const isTabBarPage = Object.values(TabBarPageRouter).includes(redirect as any); const isTabBarPage = Object.values(TabBarPageRouterForCheck).includes(redirect as any); if (isTabBarPage) { switchTab({ url: redirectPath.value, apps/taro/src/hooks/router.ts
@@ -1,14 +1,16 @@ import Taro from '@tarojs/taro'; import { TabBarPageRouter } from '@/constants'; import { TabBarPageRouterForCheck } from '@/constants'; import { useSystemStore } from '@/stores/modules/system'; import { useAppStore } from '@/stores/modules/app'; import { isInAlipay } from '@/utils/env'; import { useLifeRechargeContext } from '@life-payment/core-vue'; import { getRouterPath } from '@life-payment/utils'; export function useSwitchTab() { const systemStore = useSystemStore(); const switchTab = (option: Taro.switchTab.Option) => { const index = Object.values(TabBarPageRouter).findIndex((x) => option.url.includes(x)); const index = Object.values(TabBarPageRouterForCheck).findIndex((x) => option.url.includes(x)); console.log('index: ', index); systemStore.setTabIndex(index); Taro.switchTab(option); @@ -47,13 +49,26 @@ export function useTabRouteEnhance() { const appStore = useAppStore(); const { latestRoute } = storeToRefs(appStore); const { blLifeRecharge } = useLifeRechargeContext(); const router = Taro.useRouter(); const channelId = router.params?.channelId ?? ''; console.log('router.params: ', router); Taro.useDidShow(() => { const isTabbarPage = Object.values(TabBarPageRouter).some((x) => const isTabbarPage = Object.values(TabBarPageRouterForCheck).some((x) => latestRoute.value.toLowerCase().includes(x.toLowerCase()) ); // if (blLifeRecharge.accountModel.channlesNum && !channelId) { // Taro.reLaunch({ // // url: `${getRouterPath(router.path)}?channelId=${blLifeRecharge.accountModel.channlesNum}`, // url: `${router.path}&channelId=${blLifeRecharge.accountModel.channlesNum}`, // success() { // appStore.setLatestRoute(''); // }, // }); // } if (isTabbarPage && isInAlipay) { Taro.reLaunch({ url: router.path, apps/taro/src/utils/page.ts
@@ -20,6 +20,6 @@ const systemStore = useSystemStoreWithOut(); systemStore.setTabIndex(0); Taro.switchTab({ url: '/pages/home/index', url: TabBarPageRouter['Home'], }); } packages/components/src/styles/components.scss
@@ -145,6 +145,7 @@ font-size: 24px; color: boleGetCssVar('text-color', 'primary'); line-height: 32px; text-align: center; } .recharge-result-view-btn-wrapper { packages/components/src/views/Order/OrderRefundResultView.vue
@@ -1,6 +1,6 @@ <template> <LoadingLayout :loading="isLoading"> <div class="recharge-result-view"> <div class="recharge-result-view" v-bind="$attrs"> <div class="recharge-result-view-title">{{ title }}</div> <div class="recharge-result-view-subtitle">订单号:{{ orderNo }}</div> <div class="recharge-result-view-remark"> packages/utils/common.ts
@@ -16,6 +16,11 @@ ); } export function getRouterPath(path: string) { const pathList = path.split('?'); return pathList[0]; } export function formatTimeWithoutCurrentYear(date: string) { if (!date) return date; const targetDate = dayjs(date);