position.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view class="box">
  3. <uni-search-bar
  4. class="ss-flex-1 white-bgc"
  5. radius="8"
  6. placeholder="请输入关键字"
  7. cancelButton="none"
  8. :focus="false"
  9. @confirm="onSearch($event.value)"
  10. />
  11. <view class="block">
  12. <SwiperAd class="pb-10" :list="swiperAdList"></SwiperAd>
  13. <FilterList class="pb-10" :list="filterList" idValue="label"></FilterList>
  14. </view>
  15. </view>
  16. </template>
  17. <script setup>
  18. import SwiperAd from '@/components/SwiperAd'
  19. // import SearchBar from '@/components/SearchBar'
  20. import FilterList from '@/components/FilterList'
  21. import { ref } from 'vue'
  22. const swiperAdList = ref([
  23. 'https://img.bosszhipin.com/beijin/activity/img/20240829/488f35070cc7d0b615328d1e05fe62df4b7d0ebc36568cfb80c0fe17b37418f00945b742138a9e17.jpg.webp',
  24. 'https://img.bosszhipin.com/beijin/activity/img/20240829/488f35070cc7d0b615328d1e05fe62df4b7d0ebc36568cfb80c0fe17b37418f00945b742138a9e17.jpg.webp',
  25. 'https://img.bosszhipin.com/beijin/activity/img/20240829/488f35070cc7d0b615328d1e05fe62df4b7d0ebc36568cfb80c0fe17b37418f00945b742138a9e17.jpg.webp',
  26. ])
  27. const filterList = ref([
  28. { label: '行业' },
  29. { label: '城市' },
  30. { label: '工作性质' },
  31. { label: '月薪范围' },
  32. { label: '工作经验' },
  33. ])
  34. const onSearch = (val) => {
  35. console.log('onSearch', val)
  36. }
  37. </script>
  38. <style scoped lang="scss">
  39. .pb-10 { padding-bottom: 10px; }
  40. .box {
  41. height: 100vh;
  42. background-color: #f2f4f7;
  43. // background-color: var(--default-bgc);
  44. .block{
  45. margin-bottom: 10px;
  46. padding: 0 10px;
  47. background-color: #fff;
  48. }
  49. }
  50. </style>