Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mongo-ui
Commits
79c99247
Commit
79c99247
authored
Sep 08, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: 测试options请求,暂时注释http重试
parent
4f37ed26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
http.js
src/service/http.js
+9
-9
No files found.
src/service/http.js
View file @
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment