소스 검색

已经登录的情况下不能去往登录页

Xiao_123 5 달 전
부모
커밋
4102ce1849
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      src/permission.js

+ 3 - 4
src/permission.js

@@ -48,10 +48,9 @@ router.beforeEach(async (to, from, next) => {
         }
       }
     }
-    // if (to.path === '/login') {
-    //   next({ path: '/recruitHome' })
-    // } else {
-    // }
+    if (to.path === '/login') {
+      next({ path: '/recruitHome' })
+    }
     // 获取字典信息
     const dictStore = useDictStore()
     dictStore.getDictTypeData()