From 874cf18566e3071a335250a716858c3da9180463 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 12 十一月 2021 19:43:49 +0800 Subject: [PATCH] fix 修复 配置应用前缀路径书写问题 --- ruoyi-ui/src/utils/request.js | 2 +- ruoyi-ui/.env.production | 4 ++-- ruoyi-ui/.env.staging | 4 ++-- ruoyi-ui/.env.development | 4 ++-- ruoyi-ui/src/layout/components/Navbar.vue | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 4addbcd..232d907 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -7,8 +7,8 @@ # 鑻ヤ緷绠$悊绯荤粺/寮�鍙戠幆澧� 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 45f4ad1..928000b 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -4,8 +4,8 @@ # 鐢熶骇鐜閰嶇疆 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 ed147ca..903abe6 100644 --- a/ruoyi-ui/.env.staging +++ b/ruoyi-ui/.env.staging @@ -6,8 +6,8 @@ # 娴嬭瘯鐜閰嶇疆 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 8f73e7c..9de102c 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -102,7 +102,7 @@ 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 5ce0d00..31944e2 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -65,7 +65,7 @@ } ).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('鏃犳晥鐨勪細璇濓紝鎴栬�呬細璇濆凡杩囨湡锛岃閲嶆柊鐧诲綍銆�') -- Gitblit v1.9.3