소스 검색

update 解决 logout 写死 无法扩展路径问题

疯狂的狮子li 3 년 전
부모
커밋
5df5e63afe
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 1
      ruoyi-ui/src/layout/components/Navbar.vue
  2. 1 1
      ruoyi-ui/src/views/index.vue
  3. 0 1
      ruoyi-ui/src/views/monitor/admin/index.vue

+ 2 - 1
ruoyi-ui/src/layout/components/Navbar.vue

@@ -56,6 +56,7 @@ import SizeSelect from '@/components/SizeSelect'
 import Search from '@/components/HeaderSearch'
 import RuoYiGit from '@/components/RuoYi/Git'
 import RuoYiDoc from '@/components/RuoYi/Doc'
+import config from '@/../vue.config'
 
 export default {
   components: {
@@ -102,7 +103,7 @@ export default {
         type: 'warning'
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          location.href = '/index';
+          location.href = config.publicPath + 'index';
         })
       }).catch(() => {});
     }

+ 1 - 1
ruoyi-ui/src/views/index.vue

@@ -381,7 +381,7 @@
 </template>
 
 <script>
-import config from '../../package.json'
+import config from '@/../package.json'
 
 export default {
   name: "Index",

+ 0 - 1
ruoyi-ui/src/views/monitor/admin/index.vue

@@ -7,7 +7,6 @@ export default {
   name: "Admin",
   components: { iFrame },
   data() {
-    console.log(process.env)
     return {
       url: process.env.VUE_APP_MONITRO_ADMIN
     };