Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
zhaochengxiang
szse
Commits
8ef05f78
Commit
8ef05f78
authored
Aug 11, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改超时时间
parent
b6504df9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
index.js
src/model/index.js
+1
-2
axios.js
src/util/axios.js
+3
-3
No files found.
src/model/index.js
View file @
8ef05f78
...
@@ -23,6 +23,7 @@ function* request(args) {
...
@@ -23,6 +23,7 @@ function* request(args) {
if
(
callback
)
if
(
callback
)
yield
call
(
callback
,
rs
)
yield
call
(
callback
,
rs
)
}
catch
(
ex
)
{
}
catch
(
ex
)
{
error
&&
error
(
ex
);
if
(
ex
)
{
if
(
ex
)
{
if
(
ex
?.
ApiError
?.
cnMessage
)
{
if
(
ex
?.
ApiError
?.
cnMessage
)
{
showErrorNotifaction
(
'系统异常'
,
ex
.
ApiError
.
cnMessage
,
5
);
showErrorNotifaction
(
'系统异常'
,
ex
.
ApiError
.
cnMessage
,
5
);
...
@@ -36,8 +37,6 @@ function* request(args) {
...
@@ -36,8 +37,6 @@ function* request(args) {
}
}
}
}
}
}
error
&&
error
(
ex
);
}
}
}
}
...
...
src/util/axios.js
View file @
8ef05f78
...
@@ -8,7 +8,7 @@ const baseURL = '/api/';
...
@@ -8,7 +8,7 @@ const baseURL = '/api/';
const
instance
=
axios
.
create
({
const
instance
=
axios
.
create
({
baseURL
,
baseURL
,
timeout
:
15
000
,
timeout
:
40
000
,
headers
:
{
headers
:
{
//'X-Custom-Header': 'rest',
//'X-Custom-Header': 'rest',
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
...
@@ -21,7 +21,7 @@ const instance = axios.create({
...
@@ -21,7 +21,7 @@ const instance = axios.create({
const
textplain
=
axios
.
create
({
const
textplain
=
axios
.
create
({
baseURL
,
baseURL
,
timeout
:
15
000
,
timeout
:
40
000
,
headers
:
{
headers
:
{
//'X-Custom-Header': 'rest',
//'X-Custom-Header': 'rest',
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
'Cache-Control'
:
'no-cache,no-store,must-revalidate,max-age=-1,private'
...
@@ -67,7 +67,7 @@ textplain.interceptors.request.use(
...
@@ -67,7 +67,7 @@ textplain.interceptors.request.use(
const
fileplain
=
axios
.
create
({
const
fileplain
=
axios
.
create
({
baseURL
,
baseURL
,
timeout
:
15
000
,
timeout
:
40
000
,
headers
:{
'Content-Type'
:
'multipart/form-data'
},
headers
:{
'Content-Type'
:
'multipart/form-data'
},
processData
:
false
,
processData
:
false
,
validateStatus
:
(
status
)
=>
{
validateStatus
:
(
status
)
=>
{
...
...
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