瀏覽代碼

mall跳处理

lifanagju_citu 10 月之前
父節點
當前提交
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()