Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e5e9e0b4
authored
Aug 28, 2020
by
Denglingling
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整请求超时时间5分钟
(cherry picked from commit
e77570fa
)
parent
4bbcb5c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
app/network/RequestUtils.js
app/network/RequestUtils.js
View file @
e5e9e0b4
...
@@ -9,7 +9,7 @@ export const PostRequest = (BaseUrl, url, paramsObject) => {
...
@@ -9,7 +9,7 @@ export const PostRequest = (BaseUrl, url, paramsObject) => {
'Accept'
:
'application/json'
,
'Accept'
:
'application/json'
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
},
},
timeout
:
20000
//20s
超时
timeout
:
300000
//5min
超时
};
};
if
(
paramsObject
)
{
if
(
paramsObject
)
{
opts
.
body
=
JSON
.
stringify
(
paramsObject
)
opts
.
body
=
JSON
.
stringify
(
paramsObject
)
...
@@ -30,7 +30,7 @@ export const GetRequest = (BaseUrl, url) => {
...
@@ -30,7 +30,7 @@ export const GetRequest = (BaseUrl, url) => {
headers
:
{
headers
:
{
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
},
},
timeout
:
20000
//20s
超时
timeout
:
300000
//5min
超时
};
};
return
fetch
(
BaseUrl
+
VERSION
+
url
,
opts
)
return
fetch
(
BaseUrl
+
VERSION
+
url
,
opts
)
.
then
(
response
=>
response
.
json
())
.
then
(
response
=>
response
.
json
())
...
@@ -48,7 +48,7 @@ export const UploadRequest = (BaseUrl, url,datas) => {
...
@@ -48,7 +48,7 @@ export const UploadRequest = (BaseUrl, url,datas) => {
headers
:
{
headers
:
{
'Content-Type'
:
'multipart/form-data'
'Content-Type'
:
'multipart/form-data'
},
},
timeout
:
20000
//20s
超时
timeout
:
300000
//5min
超时
};
};
return
fetch
(
`
${
BaseUrl
}${
VERSION
}${
url
}
`
,
opts
)
return
fetch
(
`
${
BaseUrl
}${
VERSION
}${
url
}
`
,
opts
)
.
then
(
response
=>
response
.
json
())
.
then
(
response
=>
response
.
json
())
...
...
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