Commit 2d46a836 by 展昭

interceptors

parent a081d73b
Showing with 5 additions and 2 deletions
......@@ -40,7 +40,6 @@ http.interceptors.response.use(
},
(error) => {
Toast.clear();
console.log('error=',error);
let info = {};
let { status } = error.response;
info = {
......@@ -49,7 +48,9 @@ http.interceptors.response.use(
msg: "系统出现未知错误"
};
console.log(info);
return info;
Toast.fail('授权失败!',0);
//return info;
}
);
......
......@@ -34,6 +34,8 @@ async function getToken(access_token, appid) {
if (res.status == 200) {
const accessToken = res.data.access_token;
localStorage.setItem("token", accessToken);
} else {
console.log('res=', res);
}
},
err => {
......
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 sign in to comment