From 874cf18566e3071a335250a716858c3da9180463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 12 Nov 2021 19:43:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E5=89=8D=E7=BC=80=E8=B7=AF=E5=BE=84=E4=B9=A6?= =?UTF-8?q?=E5=86=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/.env.development | 4 ++-- ruoyi-ui/.env.production | 4 ++-- ruoyi-ui/.env.staging | 4 ++-- ruoyi-ui/src/layout/components/Navbar.vue | 2 +- ruoyi-ui/src/utils/request.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 4addbcd8d..232d9077b 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -7,8 +7,8 @@ ENV = 'development' # 若依管理系统/开发环境 VUE_APP_BASE_API = '/dev-api' -# 应用访问路径 例如使用前缀 /admin/index -VUE_APP_CONTEXT_PATH = '/index' +# 应用访问路径 例如使用前缀 /admin/ +VUE_APP_CONTEXT_PATH = '/' # 监控地址 VUE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/login' diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index 45f4ad1ef..928000bda 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -4,8 +4,8 @@ VUE_APP_TITLE = RuoYi-Vue-Plus后台管理系统 # 生产环境配置 ENV = 'production' -# 应用访问路径 例如使用前缀 /admin/index -VUE_APP_CONTEXT_PATH = '/index' +# 应用访问路径 例如使用前缀 /admin/ +VUE_APP_CONTEXT_PATH = '/' # 监控地址 VUE_APP_MONITRO_ADMIN = '/admin/login' diff --git a/ruoyi-ui/.env.staging b/ruoyi-ui/.env.staging index ed147ca48..903abe658 100644 --- a/ruoyi-ui/.env.staging +++ b/ruoyi-ui/.env.staging @@ -6,8 +6,8 @@ NODE_ENV = production # 测试环境配置 ENV = 'staging' -# 应用访问路径 例如使用前缀 /admin/index -VUE_APP_CONTEXT_PATH = '/index' +# 应用访问路径 例如使用前缀 /admin/ +VUE_APP_CONTEXT_PATH = '/' # 监控地址 VUE_APP_MONITRO_ADMIN = '/admin/login' diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 8f73e7cab..9de102c16 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -102,7 +102,7 @@ export default { type: 'warning' }).then(() => { this.$store.dispatch('LogOut').then(() => { - location.href = process.env.VUE_APP_CONTEXT_PATH; + location.href = process.env.VUE_APP_CONTEXT_PATH + "index"; }) }).catch(() => {}); } diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index 5ce0d0063..31944e2a2 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -65,7 +65,7 @@ service.interceptors.response.use(res => { } ).then(() => { store.dispatch('LogOut').then(() => { - location.href = process.env.VUE_APP_CONTEXT_PATH; + location.href = process.env.VUE_APP_CONTEXT_PATH + "index"; }) }).catch(() => {}); return Promise.reject('无效的会话,或者会话已过期,请重新登录。')