优化 vue2 的前端,登出系统时,拼接 BASE PATH

This commit is contained in:
YunaiV
2022-04-18 21:15:01 +08:00
parent d9a129d317
commit 4944f65905
43 changed files with 1025 additions and 879 deletions

View File

@ -4,7 +4,7 @@ import store from '@/store'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import Cookies from "js-cookie";
import {getTenantEnable} from "@/utils/ruoyi";
import {getPath, getTenantEnable} from "@/utils/ruoyi";
// 是否显示重新登录
export let isRelogin = { show: false };
@ -76,7 +76,7 @@ service.interceptors.response.use(res => {
).then(() => {
isRelogin.show = false;
store.dispatch('LogOut').then(() => {
location.href = '/index';
location.href = getPath('/index');
})
}).catch(() => {
isRelogin.show = false;