fix: 修改导航 在路由上强制增加channelId
| | |
| | | loginTipShowed.value = true; |
| | | Message.confirm({ message: '请前往登录' }) |
| | | .then(() => { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.loginByForm}?redirect=${url}`, |
| | | }); |
| | | }) |
| | |
| | | return; |
| | | } |
| | | system.setTabIndex(index); |
| | | Taro.switchTab({ url }); |
| | | RouteHelper.switchTab({ url }); |
| | | }; |
| | | |
| | | function goPublish() { |
| | |
| | | loginTipShowed.value = true; |
| | | Message.confirm({ message: '请前往登录' }) |
| | | .then(() => { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.loginByForm}?redirect=${RouterPath.home}`, |
| | | }); |
| | | }) |
| | |
| | | |
| | | return; |
| | | } |
| | | // Taro.navigateTo({ |
| | | // RouteHelper.navigateTo({ |
| | | // url: RouterPath.pulishCircleFriend, |
| | | // }); |
| | | } |
| | |
| | | const _fn = (...args2) => { |
| | | if (!isLogin.value) { |
| | | Message.confirm({ message: '请前往登录' }).then(() => { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | // url: `${RouterPath.authorization}`, |
| | | url: `${RouterPath.loginByForm}`, |
| | | }); |
| | |
| | | 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; |
| | | } |
| | |
| | | // userStore.getCurrentUserInfo(); |
| | | } |
| | | if (needAuth && !isLogin.value) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.loginByForm}?redirect=${router.path}&${object2query(router.params)}`, |
| | | }); |
| | | } |
| | |
| | | const router = Taro.useRouter(); |
| | | const { redirectParams } = useLoginedJump(); |
| | | function goLoginFn() { |
| | | // Taro.navigateTo({ |
| | | // RouteHelper.navigateTo({ |
| | | // url: `${RouterPath.authorization}?redirect=${router.path}&${object2query(router.params)}`, |
| | | // }); |
| | | |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.loginByForm}?redirect=${redirectParams.value}&tab=${LoginFormTabs.VerificationCodeLogin}`, |
| | | }); |
| | | } |
| | |
| | | const router = Taro.useRouter(); |
| | | |
| | | const goPhoneBillRecharge = useAccessLogin(() => { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.phoneBillRecharge}`, |
| | | }); |
| | | }); |
| | | const goElectricityBillRecharge = useAccessLogin(() => { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.electricBillRecharge}`, |
| | | }); |
| | | }); |
| | | const goGasBillRecharge = useAccessLogin(() => { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.gasBillRecharge}`, |
| | | }); |
| | | }); |
| | |
| | | () => { |
| | | const route = Taro.getCurrentInstance().router; |
| | | if (route.path !== RouterPath.authorization) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: RouterPath.authorization, |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | function goLoginByForm(tab = LoginFormTabs.VerificationCodeLogin) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.loginByForm}?redirect=${redirectParams.value}&tab=${tab}`, |
| | | }); |
| | | } |
| | |
| | | |
| | | function goRegister() { |
| | | console.log('RouterPath.registerForm: ', RouterPath.registerForm); |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: RouterPath.registerForm, |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | function goRegister() { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: RouterPath.registerForm, |
| | | }); |
| | | } |
| | |
| | | const isDev = process.env.NODE_ENV === 'development'; |
| | | |
| | | function goPay(orderNo: string) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.电费订单}`, |
| | | }); |
| | | } |
| | |
| | | const isDev = process.env.NODE_ENV === 'development'; |
| | | |
| | | function goPay(orderNo: string) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.燃气订单}`, |
| | | }); |
| | | } |
| | |
| | | const isDev = process.env.NODE_ENV === 'development'; |
| | | |
| | | function goPay(orderNo: string) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.话费订单}`, |
| | | }); |
| | | } |
| | |
| | | |
| | | function handleGoEdit(row: UserAccountListOutput) { |
| | | if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.话费订单) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.editPhoneUserAccount}?id=${row.id}`, |
| | | }); |
| | | } else if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.电费订单) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.editElectricUserAccount}?id=${row.id}`, |
| | | }); |
| | | } else if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单) { |
| | | Taro.navigateTo({ |
| | | RouteHelper.navigateTo({ |
| | | url: `${RouterPath.editGasUserAccount}?id=${row.id}`, |
| | | }); |
| | | } |
| | |
| | | if (pages.length > 1) { |
| | | Taro.navigateBack({ delta: delta }); |
| | | } else { |
| | | Taro.switchTab({ |
| | | RouteHelper.switchTab({ |
| | | url: Object.values(TabBarPageRouter)[systemStore.activeTab], |
| | | }); |
| | | } |
| | |
| | | export function goHome() { |
| | | const systemStore = useSystemStoreWithOut(); |
| | | systemStore.setTabIndex(0); |
| | | Taro.switchTab({ |
| | | RouteHelper.switchTab({ |
| | | url: TabBarPageRouter['Home'], |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | static navigateTo(option: Taro.navigateTo.Option) { |
| | | Taro.navigateTo({ |
| | | return Taro.navigateTo({ |
| | | ...option, |
| | | url: pathAddExtraParam(option.url, { channelId: blLifeRecharge.accountModel.channlesNum }), |
| | | }); |