Explorar o código

区分判断令牌类型

lifanagju_citu hai 8 meses
pai
achega
63dbf9bf0a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/permission.js

+ 1 - 1
src/permission.js

@@ -19,7 +19,7 @@ router.beforeEach(async (to, from, next) => {
     useUserStore().checkEnterpriseBaseInfo()
     next()
   }
-  if (getToken()) {
+  if (getToken(to?.meta?.loginType === 'enterprise' ? 1 : 2)) {
     if (to.path === '/login') {
       next({ path: '/recruitHome' })
     } else {