Преглед на файлове

登录情况下可以访问登录页

lifanagju_citu преди 5 месеца
родител
ревизия
f124171480
променени са 1 файла, в които са добавени 8 реда и са изтрити 16 реда
  1. 8 16
      src/permission.js

+ 8 - 16
src/permission.js

@@ -48,22 +48,14 @@ router.beforeEach(async (to, from, next) => {
         }
       }
     }
-    if (to.path === '/login') {
-      next({ path: '/recruitHome' })
-    } else {
-      // 获取字典信息
-      const dictStore = useDictStore()
-      dictStore.getDictTypeData()
-      next()
-      // const type = localStorage.getItem('loginType')
-      // // 判断企业路由和个人路由,防止互串
-      // if (!type) { removeToken(); next(`/login?redirect=${to.fullPath}`) }
-      // else if (to.meta?.loginType === 'common' || to.meta?.loginType === 'personalCommon') next()
-      // // else if (type === 'enterprise' && to.meta?.loginType === 'personalCommon') next({ path: `/${type}` }) // 企业端不能访问任何个人端路由
-      // // else if (type === 'personal' && to.meta?.loginType === 'personalCommon') next()
-      // else if (to.meta?.loginType === type) next()
-      // else next({ path: `/${type}` })
-    }
+    // if (to.path === '/login') {
+    //   next({ path: '/recruitHome' })
+    // } else {
+    // }
+    // 获取字典信息
+    const dictStore = useDictStore()
+    dictStore.getDictTypeData()
+    next()
   } else {
     if (to.meta?.loginType === 'personalCommon' || to.meta?.loginType === 'common') { // 路由不重定向
       next()