Commit b6e2c236 by zhaochengxiang

请求问题

parent acc89857
...@@ -22,8 +22,10 @@ function* request(args) { ...@@ -22,8 +22,10 @@ function* request(args) {
if (callback) if (callback)
yield call(callback, rs) yield call(callback, rs)
} catch (ex) { } catch (ex) {
if (ex) {
ex.ApiError && ex.ApiError.cnMessage && showMessage('error', ex.ApiError.cnMessage); ex.ApiError && ex.ApiError.cnMessage && showMessage('error', ex.ApiError.cnMessage);
error && error(ex); error && error(ex);
}
}finally { }finally {
if (yield cancelled()) { if (yield cancelled()) {
yield Cancel('cancel request'); yield Cancel('cancel request');
......
...@@ -22,7 +22,7 @@ const instance = axios.create({ ...@@ -22,7 +22,7 @@ const instance = axios.create({
const textplain = axios.create({ const textplain = axios.create({
baseURL, baseURL,
timeout: 600000, timeout: 5000,
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'
......
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