|
@@ -2,15 +2,15 @@ import router from '@/router'
|
|
|
|
|
|
const isEnterprise = () => {
|
|
const isEnterprise = () => {
|
|
const currentRoute = router.currentRoute.value
|
|
const currentRoute = router.currentRoute.value
|
|
- // let bool = currentRoute?.meta?.loginType === 'enterprise'
|
|
|
|
const substr = '/recruit/enterprise'
|
|
const substr = '/recruit/enterprise'
|
|
|
|
+
|
|
|
|
+ // 判断是否是企业路由
|
|
let bool = currentRoute?.path?.includes(substr)
|
|
let bool = currentRoute?.path?.includes(substr)
|
|
if (currentRoute?.path === '/enterpriseVerification') bool = true
|
|
if (currentRoute?.path === '/enterpriseVerification') bool = true
|
|
|
|
+
|
|
|
|
+ // 本地环境保存代码热更新会导致路径缺失问题
|
|
const testUsePath = localStorage.getItem('routerTest')
|
|
const testUsePath = localStorage.getItem('routerTest')
|
|
- if (currentRoute?.path === '/' && testUsePath?.includes(substr)) bool = true // 本地环境保存代码热更新会导致路径缺失问题
|
|
|
|
- //
|
|
|
|
- console.log('isEnterprise', bool)
|
|
|
|
- console.log('currentRoute.path', currentRoute.path)
|
|
|
|
|
|
+ if (currentRoute?.path === '/' && testUsePath?.includes(substr)) bool = true
|
|
return bool
|
|
return bool
|
|
}
|
|
}
|
|
|
|
|