This commit is contained in:
parent
92f5f26ad5
commit
d1bb49c208
@ -135,6 +135,14 @@ class PureHttp {
|
||||
$error.isCancelRequest = Axios.isCancel($error);
|
||||
// 关闭进度条动画
|
||||
NProgress.done();
|
||||
if ($error.response.status === 401) {
|
||||
router.replace({
|
||||
path: "/login",
|
||||
query: {
|
||||
redirect: router.currentRoute.value.fullPath
|
||||
}
|
||||
});
|
||||
}
|
||||
// 所有的响应异常 区分来源为取消请求/非取消请求
|
||||
return Promise.reject($error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user