From 90d1cb8c98c996de2f03217f85a4edf79d826a93 Mon Sep 17 00:00:00 2001 From: 1332987 <13329870472@163.com> Date: Thu, 14 Mar 2024 23:48:36 +0800 Subject: [PATCH] perf: test --- src/utils/http/index.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/utils/http/index.ts b/src/utils/http/index.ts index d2513db..d82b589 100644 --- a/src/utils/http/index.ts +++ b/src/utils/http/index.ts @@ -38,25 +38,12 @@ class PureHttp { /** token过期后,暂存待执行的请求 */ private static requests = []; - /** 防止重复刷新token */ - private static isRefreshing = false; - /** 初始化配置对象 */ private static initConfig: PureHttpRequestConfig = {}; /** 保存当前Axios实例对象 */ private static axiosInstance: AxiosInstance = Axios.create(defaultConfig); - /** 重连原始请求 */ - private static retryOriginalRequest(config: PureHttpRequestConfig) { - return new Promise(resolve => { - PureHttp.requests.push((token: string) => { - config.headers["Authorization"] = formatToken(token); - resolve(config); - }); - }); - } - /** 请求拦截 */ private httpInterceptorsRequest(): void { PureHttp.axiosInstance.interceptors.request.use(