From 02ea472748e4134566f5e7ec0e5150e231105b88 Mon Sep 17 00:00:00 2001 From: PY Date: Tue, 3 Jan 2023 15:54:46 +0800 Subject: [PATCH] fix: remove axios ignoreRepeatRequest config (#389) --- src/utils/request/Axios.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/utils/request/Axios.ts b/src/utils/request/Axios.ts index ca7c1ed..0984b7a 100644 --- a/src/utils/request/Axios.ts +++ b/src/utils/request/Axios.ts @@ -64,10 +64,7 @@ export class VAxios { // 请求配置处理 this.instance.interceptors.request.use((config: AxiosRequestConfig) => { - const { - headers: { ignoreRepeatRequest }, - } = config; - const ignoreRepeat = ignoreRepeatRequest ?? this.options.requestOptions?.ignoreRepeatRequest; + const ignoreRepeat = this.options.requestOptions?.ignoreRepeatRequest; if (!ignoreRepeat) axiosCanceler.addPending(config); if (requestInterceptors && isFunction(requestInterceptors)) {