소스 검색

无需登录也能访问的页面(personal里面的一种特殊类型,企业相关路由都需要登录)

lifanagju_citu 11 달 전
부모
커밋
f7e519a607
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/permission.js

+ 1 - 0
src/permission.js

@@ -35,6 +35,7 @@ router.beforeEach(async (to, from, next) => {
       // 判断企业路由和个人路由,防止互串
       if (!type) { removeToken(); next(`/login?redirect=${to.fullPath}`) }
       else if (type === 'enterprise' && to.meta?.loginType === 'noLogin') next({ path: `/${type}` })
+      else if (type === 'personal' && to.meta?.loginType === 'noLogin') next()
       else if (to.meta?.loginType === type) next()
       else next({ path: `/${type}` })
       // next()