Commit 89bfc697 by good luck Committed by GitHub

Merge branch 'master' into master

parents 02e60649 6c4593c3
......@@ -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(() => {});
......
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 to comment