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