Commit 7b46ecdc by 宋毅

tj

parent 988c8976
...@@ -58,13 +58,13 @@ class APIBase { ...@@ -58,13 +58,13 @@ class APIBase {
} }
} }
} }
axios.default.timeout = timeOut;
let result = await axios({ let result = await axios({
// headers: {'Content-Type': 'application/x-www-form-urlencoded'}, // headers: {'Content-Type': 'application/x-www-form-urlencoded'},
headers: headers, headers: headers,
method: 'POST', method: 'POST',
url: url, url: url,
data: JSON.stringify(params), data: JSON.stringify(params)
timeout: timeOut
}); });
if (result.status == 200 && result.data) { if (result.status == 200 && result.data) {
return result.data; return result.data;
......
...@@ -121,13 +121,13 @@ class ConsumerBase { ...@@ -121,13 +121,13 @@ class ConsumerBase {
} }
} }
} }
axios.default.timeout = timeOut;
let result = await axios({ let result = await axios({
// headers: {'Content-Type': 'application/x-www-form-urlencoded'}, // headers: {'Content-Type': 'application/x-www-form-urlencoded'},
headers: headers, headers: headers,
method: 'POST', method: 'POST',
url: url, url: url,
data: JSON.stringify(params), data: JSON.stringify(params)
timeout: timeOut
}); });
if (result.status == 200 && result.data) { if (result.status == 200 && result.data) {
return result.data; return result.data;
......
...@@ -32,13 +32,13 @@ class AppServiceBase { ...@@ -32,13 +32,13 @@ class AppServiceBase {
} }
} }
} }
axios.default.timeout = timeOut;
let result = await axios({ let result = await axios({
// headers: {'Content-Type': 'application/x-www-form-urlencoded'}, // headers: {'Content-Type': 'application/x-www-form-urlencoded'},
headers: headers, headers: headers,
method: 'POST', method: 'POST',
url: url, url: url,
data: JSON.stringify(params), data: JSON.stringify(params)
timeout: timeOut
}); });
if (result.status == 200 && result.data) { if (result.status == 200 && result.data) {
return result.data; return result.data;
......
...@@ -39,13 +39,13 @@ class ServiceBase { ...@@ -39,13 +39,13 @@ class ServiceBase {
} }
} }
} }
axios.default.timeout = timeOut;
let result = await axios({ let result = await axios({
// headers: {'Content-Type': 'application/x-www-form-urlencoded'}, // headers: {'Content-Type': 'application/x-www-form-urlencoded'},
headers: headers, headers: headers,
method: 'POST', method: 'POST',
url: url, url: url,
data: JSON.stringify(params), data: JSON.stringify(params)
timeout: timeOut
}); });
if (result.status == 200 && result.data) { if (result.status == 200 && result.data) {
return result.data; return result.data;
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
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