Commit 8ef05f78 by zhaochengxiang

修改超时时间

parent b6504df9
...@@ -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);
} }
} }
......
...@@ -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: 15000, timeout: 40000,
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: 15000, timeout: 40000,
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: 15000, timeout: 40000,
headers:{'Content-Type':'multipart/form-data'}, headers:{'Content-Type':'multipart/form-data'},
processData:false, processData:false,
validateStatus: (status) => { validateStatus: (status) => {
......
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