Commit 7c7bc230 authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/test_options' into 'master'

test: 测试options请求,暂时注释http重试

See merge request !241
parents 4f37ed26 79c99247
...@@ -116,15 +116,15 @@ axios.interceptors.response.use( ...@@ -116,15 +116,15 @@ axios.interceptors.response.use(
} }
// 提示网络错误时尝试重试 // 提示网络错误时尝试重试
if ( // if (
err.message === "Network Error" && // err.message === "Network Error" &&
(!err.config?.retryCount || err.config?.retryCount <= 3) // (!err.config?.retryCount || err.config?.retryCount <= 3)
) { // ) {
if (!err.config?.retryCount) err.config.retryCount = 1; // if (!err.config?.retryCount) err.config.retryCount = 1;
err.config.retryCount++; // err.config.retryCount++;
await wait(3000); // await wait(3000);
return axios.request(err.config); // return axios.request(err.config);
} // }
// 错误提示 // 错误提示
if (err.response) { if (err.response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment