|
@@ -7,7 +7,7 @@ export class AxiosRetry {
|
|
|
/**
|
|
|
* 重试
|
|
|
*/
|
|
|
- retry(AxiosInstance: AxiosInstance, error: AxiosError) {
|
|
|
+ retry(axiosInstance: AxiosInstance, error: AxiosError) {
|
|
|
// @ts-ignore
|
|
|
const { config } = error.response;
|
|
|
const { waitTime, count } = config?.requestOptions?.retryRequest;
|
|
@@ -18,7 +18,7 @@ export class AxiosRetry {
|
|
|
config.__retryCount += 1;
|
|
|
//请求返回后config的header不正确造成重试请求失败,删除返回headers采用默认headers
|
|
|
delete config.headers;
|
|
|
- return this.delay(waitTime).then(() => AxiosInstance(config));
|
|
|
+ return this.delay(waitTime).then(() => axiosInstance(config));
|
|
|
}
|
|
|
|
|
|
/**
|