lifanagju_citu 10 месяцев назад
Родитель
Сommit
b662e83092
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      src/permission.js

+ 1 - 0
src/permission.js

@@ -34,6 +34,7 @@ router.beforeEach(async (to, from, next) => {
       const type = localStorage.getItem('loginType')
       // 判断企业路由和个人路由,防止互串
       if (!type) { removeToken(); next(`/login?redirect=${to.fullPath}`) }
+      else if (to.path === '/mall') next()
       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()