index.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div>
  3. <headCarousel></headCarousel>
  4. <div class="stickyBox py-5">
  5. <headSearch text="职位类型" @handleSearch="handleSearch"></headSearch>
  6. </div>
  7. <hotJobs></hotJobs>
  8. <div class="default-width">
  9. <!-- <jobTypeCard class="mb-5" page @handleJobClick="handleJobClick" isSingle></jobTypeCard> -->
  10. <homeJobTypeCard></homeJobTypeCard>
  11. <advertisementPage class="my-3"></advertisementPage>
  12. <hotPromotedPositions></hotPromotedPositions>
  13. <PopularEnterprises class="mt-10"></PopularEnterprises>
  14. </div>
  15. </div>
  16. <!-- 快速填写简易人才信息-弹窗 -->
  17. <simplePage v-if="showSimplePage" :closeable="true" closeText="暂时跳过" @simpleInfoReady="handleUpdateInfo"></simplePage>
  18. </template>
  19. <script setup>
  20. defineOptions({ name:'personal-index'})
  21. import simplePage from '@/views/recruit/personal/shareJob/sendResume/simple.vue'
  22. import headCarousel from './components/headCarousel.vue'
  23. import headSearch from '@/components/headSearch'
  24. import hotJobs from './components/hotJobs.vue'
  25. // import jobTypeCard from '@/components/jobTypeCard'
  26. import homeJobTypeCard from './components/homeJobTypeCard'
  27. import hotPromotedPositions from './components/hotPromotedPositions.vue'
  28. import PopularEnterprises from './components/popularEnterprises.vue'
  29. import advertisementPage from './components/advertisement.vue'
  30. import { useRouter } from 'vue-router'
  31. import { nextTick, ref } from 'vue'
  32. import { useUserStore } from '@/store/user'
  33. const store = useUserStore()
  34. const updateBaseInfo = async () => {
  35. await store.getUserBaseInfos()
  36. }
  37. updateBaseInfo()
  38. const router = useRouter()
  39. const simple = localStorage.getItem('simpleCompleteDialogHaveBeenShow')
  40. const showSimplePage = ref(simple? false : true) // 只提示一次
  41. nextTick(() => {
  42. localStorage.setItem('simpleCompleteDialogHaveBeenShow', true)
  43. })
  44. const handleSearch = (val) => {
  45. if (val) router.push(`/recruit/personal/position?content=${val}`)
  46. }
  47. // 更新用户基本信息
  48. const handleUpdateInfo = async () => {
  49. await store.getUserBaseInfos(null)
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .stickyBox {
  54. position: sticky;
  55. top: 48px;
  56. z-index: 999;
  57. background-color: var(--default-bgc);
  58. }
  59. </style>