Sfoglia il codice sorgente

Merge branch 'jobFair' of https://git.citupro.com/zhengnaiwen_citu/menduner into jobFair

Xiao_123 1 mese fa
parent
commit
75ef8620fa
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      src/permission.js

+ 5 - 2
src/permission.js

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