|
@@ -20,8 +20,6 @@ axios.interceptors.request.use(
|
|
|
"Content-type":"application/x-www-from-urlencoded"
|
|
|
};
|
|
|
console.log(config.headers);
|
|
|
- // alert('111')
|
|
|
-
|
|
|
}
|
|
|
// console.log(config);
|
|
|
// config.data=qs.stringify(config.data) //序列化post参数
|
|
@@ -43,7 +41,8 @@ axios.interceptors.response.use(
|
|
|
sessionStorage.setItem("assess_token",newToken)
|
|
|
}
|
|
|
return res;
|
|
|
- },(error)=>{
|
|
|
+ },
|
|
|
+ (error)=>{
|
|
|
if(error.res.data.status=="401"){
|
|
|
this.$router.push('/login')
|
|
|
}
|
|
@@ -52,7 +51,6 @@ axios.interceptors.response.use(
|
|
|
|
|
|
function post(url,params){
|
|
|
return new Promise((resolve,reject)=>{
|
|
|
- console.log(params);
|
|
|
axios
|
|
|
.post(url,params)
|
|
|
.then(
|