瀏覽代碼

是否展示完善个人信息弹窗

lifanagju_citu 4 月之前
父節點
當前提交
e416cf8ffe
共有 3 個文件被更改,包括 10 次插入2 次删除
  1. 1 2
      src/permission.js
  2. 4 0
      src/plugins/dialogExtend/index.js
  3. 5 0
      src/utils/whiteList.js

+ 1 - 2
src/permission.js

@@ -2,7 +2,6 @@ import router from './router'
 import { useNProgress } from '@/hooks/web/useNProgress'
 import { useTitle } from '@/hooks/web/useTitle'
 import { getToken, getIsEnterprise } from '@/utils/auth'
-import { showImprovePersonaInfo } from '@/utils/whiteList'
 // import { useDictStore } from '@/store/dict'
 import { useUserStore } from '@/store/user'
 import Confirm from '@/plugins/confirm'
@@ -35,7 +34,7 @@ router.beforeEach(async (to, from, next) => {
     // 强制修改密码
     if (localStorage.getItem('entUpdatePassword') === 'needChange') fullScreen('entUpdatePassword')
     // 强制填写个人信息
-    else if (localStorage.getItem('necessaryInfoReady') === 'fddeaddc47868b' && tokenIndex === 2 && !showImprovePersonaInfo(to.path)) dialogExtend('necessaryInfoDialog')
+    else if (localStorage.getItem('necessaryInfoReady') === 'fddeaddc47868b' && tokenIndex === 2) dialogExtend('necessaryInfoDialog')
     // 企业登录免费职位广告提示
     else if (localStorage.getItem('positionAd')) {
       localStorage.setItem('positionAd', '')

+ 4 - 0
src/plugins/dialogExtend/index.js

@@ -2,8 +2,12 @@ import { createApp } from 'vue'
 import necessaryInfoDialog from './components/necessaryInfoDialog.vue'
 import positionAd from './components/positionAd.vue'
 import vuetify from '@/plugins/vuetify'
+// import { showImprovePersonaInfo } from '@/utils/whiteList'
+// import router from '@/router'
 
 const toastMessage = (type, option = {})  => {
+  // debugger
+  // if (type === 'necessaryInfoDialog' && router && showImprovePersonaInfo(router.path)) return
   return new Promise((resolve, reject) => {
     const componentName = type === 'necessaryInfoDialog' ?
       necessaryInfoDialog : type === 'positionAd' ?

+ 5 - 0
src/utils/whiteList.js

@@ -3,6 +3,7 @@
 const isInWhiteList = (url, whiteList)=> {
   const path = url.split('?')[0]
   for (const item of whiteList) {
+    debugger
     if (path.startsWith(item)) {
       return true
     }
@@ -12,10 +13,14 @@ const isInWhiteList = (url, whiteList)=> {
 
 // 是否展示完善个人信息弹窗
 export const showImprovePersonaInfo = (url) => {
+  if (!url) return
   const list = [
     '/recruit/entRegister',
+    '/enterpriseInvite',
+    '/invite',
     '/recruit/entRegister/joiningEnterprise',
     '/recruit/entRegister/inReview',
   ]
+  debugger
   return isInWhiteList(url, list)
 }