fix 修复 配置应用前缀路径书写问题

This commit is contained in:
疯狂的狮子li 2021-11-12 19:43:49 +08:00
parent 53cb0826bc
commit 874cf18566
5 changed files with 8 additions and 8 deletions

View File

@ -7,8 +7,8 @@ ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/dev-api'
# 应用访问路径 例如使用前缀 /admin/index # 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/index' VUE_APP_CONTEXT_PATH = '/'
# 监控地址 # 监控地址
VUE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/login' VUE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/login'

View File

@ -4,8 +4,8 @@ VUE_APP_TITLE = RuoYi-Vue-Plus后台管理系统
# 生产环境配置 # 生产环境配置
ENV = 'production' ENV = 'production'
# 应用访问路径 例如使用前缀 /admin/index # 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/index' VUE_APP_CONTEXT_PATH = '/'
# 监控地址 # 监控地址
VUE_APP_MONITRO_ADMIN = '/admin/login' VUE_APP_MONITRO_ADMIN = '/admin/login'

View File

@ -6,8 +6,8 @@ NODE_ENV = production
# 测试环境配置 # 测试环境配置
ENV = 'staging' ENV = 'staging'
# 应用访问路径 例如使用前缀 /admin/index # 应用访问路径 例如使用前缀 /admin/
VUE_APP_CONTEXT_PATH = '/index' VUE_APP_CONTEXT_PATH = '/'
# 监控地址 # 监控地址
VUE_APP_MONITRO_ADMIN = '/admin/login' VUE_APP_MONITRO_ADMIN = '/admin/login'

View File

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

View File

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