mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-09-16 01:29:50 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
89bfc69757
@ -9,6 +9,7 @@ import {
|
|||||||
requestTimeout,
|
requestTimeout,
|
||||||
successCode,
|
successCode,
|
||||||
tokenName,
|
tokenName,
|
||||||
|
loginInterception,
|
||||||
} from "@/config/settings";
|
} from "@/config/settings";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import qs from "qs";
|
import qs from "qs";
|
||||||
@ -43,7 +44,13 @@ const handleCode = (code, msg) => {
|
|||||||
switch (code) {
|
switch (code) {
|
||||||
case invalidCode:
|
case invalidCode:
|
||||||
Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, "error");
|
Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, "error");
|
||||||
store.dispatch("user/resetAll").catch(() => {});
|
|
||||||
|
store.dispatch("user/resetAccessToken").catch(() => {});
|
||||||
|
|
||||||
|
if (loginInterception) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case noRoleCode:
|
case noRoleCode:
|
||||||
router.push({ path: "/401" }).catch(() => {});
|
router.push({ path: "/401" }).catch(() => {});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user