whiteList.js 732 B

1234567891011121314151617181920212223242526272829
  1. // 查询是否在白名单内
  2. const checkWhiteListFun = (url, whiteList)=> {
  3. const path = url.split('?')[0]
  4. // console.log('path:', path)
  5. // console.log('whiteList:', whiteList)
  6. for (const item of whiteList) {
  7. if (path.startsWith(item)) {
  8. // console.log('在白名单内')
  9. return true
  10. }
  11. }
  12. return false
  13. }
  14. // 是否展示完善个人信息弹窗
  15. export const showImprovePersonaInfo = (url) => {
  16. if (!url) return false
  17. const list = [
  18. '/recruit/entRegister',
  19. '/invite',
  20. '/enterpriseInvite',
  21. '/register/company',
  22. '/register/selectedPersonRole',
  23. // '/recruit/entRegister/joiningEnterprise',
  24. // '/recruit/entRegister/inReview',
  25. ]
  26. return checkWhiteListFun(url, list)
  27. }