소스 검색

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

lifanagju_citu 1 개월 전
부모
커밋
144144f45c
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  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()