zhengyiming
2025-03-13 9c680ea2c5938d26065232d3a658a9a615e1f827
fix: 修改导航 在路由上强制增加channelId
14个文件已修改
50 ■■■■ 已修改文件
apps/taro/src/custom-tab-bar/index.tsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/hooks/access.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/hooks/router.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/hooks/user.ts 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/pages/home/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/stores/modules/user.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/login/authorization/authorization.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/login/loginByForm/accountLoginForm.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/recharge/electricBillRecharge/InnerPage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/subpackages/userAccount/userAccountList/InnerPage.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/utils/page.ts 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
apps/taro/src/custom-tab-bar/index.tsx
@@ -72,7 +72,7 @@
          loginTipShowed.value = true;
          Message.confirm({ message: '请前往登录' })
            .then(() => {
              Taro.navigateTo({
              RouteHelper.navigateTo({
                url: `${RouterPath.loginByForm}?redirect=${url}`,
              });
            })
@@ -83,7 +83,7 @@
        return;
      }
      system.setTabIndex(index);
      Taro.switchTab({ url });
      RouteHelper.switchTab({ url });
    };
    function goPublish() {
@@ -92,7 +92,7 @@
          loginTipShowed.value = true;
          Message.confirm({ message: '请前往登录' })
            .then(() => {
              Taro.navigateTo({
              RouteHelper.navigateTo({
                url: `${RouterPath.loginByForm}?redirect=${RouterPath.home}`,
              });
            })
@@ -103,7 +103,7 @@
        return;
      }
      // Taro.navigateTo({
      // RouteHelper.navigateTo({
      //   url: RouterPath.pulishCircleFriend,
      // });
    }
apps/taro/src/hooks/access.ts
@@ -13,7 +13,7 @@
  const _fn = (...args2) => {
    if (!isLogin.value) {
      Message.confirm({ message: '请前往登录' }).then(() => {
        Taro.navigateTo({
        RouteHelper.navigateTo({
          // url: `${RouterPath.authorization}`,
          url: `${RouterPath.loginByForm}`,
        });
apps/taro/src/hooks/router.ts
@@ -14,7 +14,7 @@
    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;
}
apps/taro/src/hooks/user.ts
@@ -65,7 +65,7 @@
      // userStore.getCurrentUserInfo();
    }
    if (needAuth && !isLogin.value) {
      Taro.navigateTo({
      RouteHelper.navigateTo({
        url: `${RouterPath.loginByForm}?redirect=${router.path}&${object2query(router.params)}`,
      });
    }
@@ -117,11 +117,11 @@
  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}`,
    });
  }
apps/taro/src/pages/home/index.vue
@@ -23,17 +23,17 @@
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}`,
  });
});
apps/taro/src/stores/modules/user.ts
@@ -45,7 +45,7 @@
  () => {
    const route = Taro.getCurrentInstance().router;
    if (route.path !== RouterPath.authorization) {
      Taro.navigateTo({
      RouteHelper.navigateTo({
        url: RouterPath.authorization,
      });
    }
apps/taro/src/subpackages/login/authorization/authorization.vue
@@ -174,7 +174,7 @@
}
function goLoginByForm(tab = LoginFormTabs.VerificationCodeLogin) {
  Taro.navigateTo({
  RouteHelper.navigateTo({
    url: `${RouterPath.loginByForm}?redirect=${redirectParams.value}&tab=${tab}`,
  });
}
apps/taro/src/subpackages/login/loginByForm/accountLoginForm.vue
@@ -95,7 +95,7 @@
function goRegister() {
  console.log('RouterPath.registerForm: ', RouterPath.registerForm);
  Taro.navigateTo({
  RouteHelper.navigateTo({
    url: RouterPath.registerForm,
  });
}
apps/taro/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue
@@ -122,7 +122,7 @@
}
function goRegister() {
  Taro.navigateTo({
  RouteHelper.navigateTo({
    url: RouterPath.registerForm,
  });
}
apps/taro/src/subpackages/recharge/electricBillRecharge/InnerPage.vue
@@ -16,7 +16,7 @@
const isDev = process.env.NODE_ENV === 'development';
function goPay(orderNo: string) {
  Taro.navigateTo({
  RouteHelper.navigateTo({
    url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.电费订单}`,
  });
}
apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue
@@ -16,7 +16,7 @@
const isDev = process.env.NODE_ENV === 'development';
function goPay(orderNo: string) {
  Taro.navigateTo({
  RouteHelper.navigateTo({
    url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.燃气订单}`,
  });
}
apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue
@@ -16,7 +16,7 @@
const isDev = process.env.NODE_ENV === 'development';
function goPay(orderNo: string) {
  Taro.navigateTo({
  RouteHelper.navigateTo({
    url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.话费订单}`,
  });
}
apps/taro/src/subpackages/userAccount/userAccountList/InnerPage.vue
@@ -13,15 +13,15 @@
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}`,
    });
  }
apps/taro/src/utils/page.ts
@@ -12,7 +12,7 @@
  if (pages.length > 1) {
    Taro.navigateBack({ delta: delta });
  } else {
    Taro.switchTab({
    RouteHelper.switchTab({
      url: Object.values(TabBarPageRouter)[systemStore.activeTab],
    });
  }
@@ -21,7 +21,7 @@
export function goHome() {
  const systemStore = useSystemStoreWithOut();
  systemStore.setTabIndex(0);
  Taro.switchTab({
  RouteHelper.switchTab({
    url: TabBarPageRouter['Home'],
  });
}
@@ -49,7 +49,7 @@
  }
  static navigateTo(option: Taro.navigateTo.Option) {
    Taro.navigateTo({
    return Taro.navigateTo({
      ...option,
      url: pathAddExtraParam(option.url, { channelId: blLifeRecharge.accountModel.channlesNum }),
    });