🎨401跳转回登陆
This commit is contained in:
parent
e51d4445cf
commit
7c3410831b
@ -163,6 +163,14 @@ class PureHttp {
|
|||||||
resolve(response);
|
resolve(response);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
if (error.response.status === 401) {
|
||||||
|
router.replace({
|
||||||
|
path: "/login",
|
||||||
|
query: {
|
||||||
|
redirect: router.currentRoute.value.fullPath
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
if (error.response === null || error.response === undefined) {
|
if (error.response === null || error.response === undefined) {
|
||||||
message(error.message, { type: "error" });
|
message(error.message, { type: "error" });
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user