Selaa lähdekoodia

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

lifanagju_citu 1 kuukausi sitten
vanhempi
commit
144144f45c
1 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 4 3
      src/permission.js

+ 4 - 3
src/permission.js

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