Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
93b4a288
Commit
93b4a288
authored
Feb 19, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改超时提示
parent
d1edda7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
sample-form-manager-ui/admin/src/utils/request.js
sample-form-manager-ui/admin/src/utils/request.js
+6
-6
No files found.
sample-form-manager-ui/admin/src/utils/request.js
View file @
93b4a288
...
@@ -6,7 +6,7 @@ import { Message } from "element-ui";
...
@@ -6,7 +6,7 @@ import { Message } from "element-ui";
import
local
from
"
@/utils/local
"
;
import
local
from
"
@/utils/local
"
;
// import router from "@/router"
// import router from "@/router"
// 请求超时时间
// 请求超时时间
axios
.
defaults
.
timeout
=
10
*
1000
;
//
axios.defaults.timeout = 10 * 1000;
// 设置统一服务器地址
// 设置统一服务器地址
axios
.
defaults
.
baseURL
=
process
.
env
.
VUE_APP_API_BASE_URL
;
axios
.
defaults
.
baseURL
=
process
.
env
.
VUE_APP_API_BASE_URL
;
...
@@ -47,11 +47,11 @@ axios.interceptors.response.use(
...
@@ -47,11 +47,11 @@ axios.interceptors.response.use(
return
response
;
return
response
;
},
},
(
err
)
=>
{
(
err
)
=>
{
if
(
err
.
message
.
includes
(
"
timeout
"
))
{
//
if (err.message.includes("timeout")) {
Message
.
error
({
//
Message.error({
message
:
"
请求超时,请稍后再试
"
,
//
message: "请求超时,请稍后再试",
});
//
});
}
//
}
return
Promise
.
reject
(
err
);
return
Promise
.
reject
(
err
);
}
}
);
);
...
...
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