Commit 241a1eea authored by youjie's avatar youjie

no message

parent ce21753a
......@@ -1502,6 +1502,7 @@ export default {
};
},
created() {
this.isTerminate = -1
let userinfo = this.getLocalStorage();
let ActionMenuCode = userinfo.ActionMenuCode;
if (ActionMenuCode.indexOf("F_AccountantFinanceMerge") != -1) {
......
......@@ -345,6 +345,20 @@ export default {
}
}
}
if(isTerminate>0){
this.$http.interceptors.request.use(config => {
removePending(config); //在一个axios发送前执行一下取消操作
config.cancelToken = new cancelToken((c)=>{
// 这里的axios标识我是用请求地址&请求方式拼接的字符串,当然你可以选择其他的一些方式
pending.push({ u: config.url + '&' + config.method, f: c });
});
return Promise.resolve(config)
}, error => {
return Promise.reject(error)
})
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
......@@ -362,20 +376,7 @@ export default {
successCall(res);
}
}, faildCall)
if(isTerminate&&isTerminate>0){
this.$http.interceptors.request.use(config => {
removePending(config); //在一个axios发送前执行一下取消操作
config.cancelToken = new cancelToken((c)=>{
// 这里的axios标识我是用请求地址&请求方式拼接的字符串,当然你可以选择其他的一些方式
pending.push({ u: config.url + '&' + config.method, f: c });
});
return Promise.resolve(config)
}, error => {
return Promise.reject(error)
})
}
},
......
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