单独对某个请求设置网络超时(亲测有效):
let timeout = parseInt(paramsTimeout);
this.$http.post(url, params, {timeout: timeout})
.then(res => {
console.log('response='+response);
})
.catch(reason => {
console.log('reason'+reason);
})
})
参考自:https://www.cnblogs.com/webSnow/p/16033370.html
网友评论