fix 修复 ruoyi 关于 配置应用前缀路径的bug 改为配置文件统一配置

This commit is contained in:
疯狂的狮子Li
2021-11-08 18:17:29 +08:00
parent 57df7f8dfe
commit 4d5048435c
7 changed files with 12 additions and 5 deletions

View File

@ -102,7 +102,7 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = this.$router.options.base + '/index';
location.href = process.env.VUE_APP_CONTEXT_PATH;
})
}).catch(() => {});
}

View File

@ -167,7 +167,6 @@ export const constantRoutes = [
]
export default new Router({
base: "", // 项目前缀 与 publicPath 同步 例如 /api
mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes

View File

@ -65,7 +65,7 @@ service.interceptors.response.use(res => {
}
).then(() => {
store.dispatch('LogOut').then(() => {
location.href = this.$router.options.base + '/index';
location.href = process.env.VUE_APP_CONTEXT_PATH;
})
}).catch(() => {});
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')