zhengyiming
2025-06-10 e47c70d32e6fa7c9cb16ca19a79338ea36a83e94
apps/taro/src/utils/page.ts
@@ -3,16 +3,16 @@
import { useSystemStoreWithOut } from '@/stores/modules/system';
import { query2object, object2query } from '@life-payment/utils';
import { blLifeRecharge } from './blLifeRecharge';
import { isInAlipay } from '@/utils/env';
export function goBack(delta = 1) {
  const pages = Taro.getCurrentPages();
  const systemStore = useSystemStoreWithOut();
  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,14 @@
  }
  static navigateTo(option: Taro.navigateTo.Option) {
    Taro.navigateTo({
    return Taro.navigateTo({
      ...option,
      url: pathAddExtraParam(option.url, { channelId: blLifeRecharge.accountModel.channlesNum }),
    });
  }
  static redirectTo(option: Taro.redirectTo.Option) {
    return Taro.redirectTo({
      ...option,
      url: pathAddExtraParam(option.url, { channelId: blLifeRecharge.accountModel.channlesNum }),
    });