Jelajahi Sumber

已登录账号点击去登录,刷新当前页面或前往个人首页

lifanagju_citu 1 bulan lalu
induk
melakukan
29c18ef5ef
1 mengubah file dengan 6 tambahan dan 4 penghapusan
  1. 6 4
      src/permission.js

+ 6 - 4
src/permission.js

@@ -127,10 +127,12 @@ router.beforeEach(async (to, from, next) => {
         }
       }
     }
-    if (from.path !== '/login' && from.path !== '/') {
-      window.location.reload()
-    } else {
-      next({ path: '/recruitHome' })
+    if (to.fullPath === '/login') {
+      if (from.path !== '/login' && from.path !== '/') {
+        window.location.reload()
+      } else {
+        next({ path: '/recruitHome' })
+      }
     }
     // 获取字典信息
     // const dictStore = useDictStore()