未验证 提交 ce030d2d 编写于 作者: qiufeng9862's avatar qiufeng9862 提交者: GitHub

axiosRetry参数首字母小写 (#2419)

* feat(axiosSuccess): 操作成功后根据传入提示模式进行相应

* fix(axiosRetry): 解决get重试请求返回的headers造成无法成功请求的问题

* fix(axiosRetry): 参数首字母小写
上级 43c8bf0d
...@@ -7,7 +7,7 @@ export class AxiosRetry { ...@@ -7,7 +7,7 @@ export class AxiosRetry {
/** /**
* 重试 * 重试
*/ */
retry(AxiosInstance: AxiosInstance, error: AxiosError) { retry(axiosInstance: AxiosInstance, error: AxiosError) {
// @ts-ignore // @ts-ignore
const { config } = error.response; const { config } = error.response;
const { waitTime, count } = config?.requestOptions?.retryRequest; const { waitTime, count } = config?.requestOptions?.retryRequest;
...@@ -18,7 +18,7 @@ export class AxiosRetry { ...@@ -18,7 +18,7 @@ export class AxiosRetry {
config.__retryCount += 1; config.__retryCount += 1;
//请求返回后config的header不正确造成重试请求失败,删除返回headers采用默认headers //请求返回后config的header不正确造成重试请求失败,删除返回headers采用默认headers
delete config.headers; delete config.headers;
return this.delay(waitTime).then(() => AxiosInstance(config)); return this.delay(waitTime).then(() => axiosInstance(config));
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册