瀏覽代碼

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 8 月之前
父節點
當前提交
8164679690
共有 3 個文件被更改,包括 5 次插入5 次删除
  1. 1 2
      src/permission.js
  2. 1 2
      src/store/user.js
  3. 3 1
      src/utils/auth.js

+ 1 - 2
src/permission.js

@@ -17,11 +17,10 @@ router.beforeEach(async (to, from, next) => {
   start()
   // loadStart()
   if (to.path === '/enterpriseVerification') {
-    // 校验企业必填信息
-    // useUserStore().checkEnterpriseBaseInfo()
     useUserStore().changeRole()
     next()
   } else if (getToken()) {
+    // 企业信息完成度提示
     if (localStorage.getItem('checkEnterpriseBaseInfoFalseHref')) {
       const href = localStorage.getItem('checkEnterpriseBaseInfoFalseHref')
       localStorage.setItem('checkEnterpriseBaseInfoFalseHref', '')

+ 1 - 2
src/store/user.js

@@ -137,7 +137,7 @@ export const useUserStore = defineStore('user',
         await this.getEnterpriseUserAccountInfo()
         updateEventList(false)
         Snackbar.success('切换成功')
-        await this.checkEnterpriseBaseInfo()
+        await this.checkEnterpriseBaseInfo() // 校验企业必填信息
         window.location.href = '/enterprise'
       },
       // 获取当前登录的企业用户信息
@@ -179,7 +179,6 @@ export const useUserStore = defineStore('user',
         } catch (error) {
           // console.log(error)
         }
-        // return valid
       },
 
       // 获取用户账户信息

+ 3 - 1
src/utils/auth.js

@@ -11,10 +11,12 @@ const isEnterprise = () => {
   // 本地环境保存代码热更新会导致路径缺失问题
   const testUsePath = localStorage.getItem('routerTest')
   if (currentRoute?.path === '/' && (testUsePath?.includes(substr) || testUsePath?.includes('/enterpriseVerification'))) bool = true
+  // console.log('currentRoute', currentRoute.path)
+  // console.log('isEnterprise-bool', bool)
   return bool
 }
 
-export const getIsEnterprise = () => { isEnterprise() }
+export const getIsEnterprise = () => { return isEnterprise() }
 
 // 获取token
 export const getToken = (index) => { // index=1: 使用招聘token; index=2: 使用求职token