|
@@ -12,14 +12,14 @@ const { start, done } = useNProgress()
|
|
// 3.personalCommon: 无需登录也能访问的页面
|
|
// 3.personalCommon: 无需登录也能访问的页面
|
|
// 路由守卫
|
|
// 路由守卫
|
|
router.beforeEach(async (to, from, next) => {
|
|
router.beforeEach(async (to, from, next) => {
|
|
|
|
+ localStorage.setItem('routerTest', to.path) // 本地环境保存代码热更新会导致路径缺失问题
|
|
start()
|
|
start()
|
|
// loadStart()
|
|
// loadStart()
|
|
if (to.path === '/enterpriseVerification') {
|
|
if (to.path === '/enterpriseVerification') {
|
|
// 校验企业必填信息
|
|
// 校验企业必填信息
|
|
useUserStore().checkEnterpriseBaseInfo()
|
|
useUserStore().checkEnterpriseBaseInfo()
|
|
next()
|
|
next()
|
|
- }
|
|
|
|
- if (getToken(to?.meta?.loginType === 'enterprise' ? 1 : 0)) {
|
|
|
|
|
|
+ } else if (getToken()) {
|
|
if (to.path === '/login') {
|
|
if (to.path === '/login') {
|
|
next({ path: '/recruitHome' })
|
|
next({ path: '/recruitHome' })
|
|
} else {
|
|
} else {
|