zhengyiming
2025-03-13 84e2009fdc067e8d0a7d9ce18ef0fa0d7e43d495
apps/taro/src/utils/request/index.ts
@@ -3,7 +3,7 @@
import qs from 'qs';
import Taro from '@tarojs/taro';
import { getToken, Message } from '@/utils';
import { isWeb } from '@/utils/env';
import { isWeb, isWeChat } from '@/utils/env';
import { tokenIsExpired, SensitiveManage } from '@life-payment/utils';
import { useUserStoreWithOut } from '@/stores/modules/user';
@@ -24,7 +24,9 @@
}
export function endLoading() {
  Taro.hideNavigationBarLoading();
  if (isWeChat) {
    Taro.hideNavigationBarLoading();
  }
  Taro.hideLoading();
}
@@ -47,7 +49,7 @@
  REDIRECT = 9,
}
// 与后端约定的响应数据格式
interface ResponseStructure {
export interface ResponseStructure {
  success: boolean;
  data: any;
  /**
@@ -92,7 +94,7 @@
  withCredentials: true,
};
const config: RequestConfig<ResponseStructure, IRequestOptions> = {
export const config: RequestConfig<ResponseStructure, IRequestOptions> = {
  ...AxiosOptions,
  errorConfig: {