|
@@ -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()
|