瀏覽代碼

判断是否是企业路由

lifanagju_citu 8 月之前
父節點
當前提交
af6b376716
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/utils/auth.js

+ 5 - 5
src/utils/auth.js

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