position.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="box defaultBgc">
  3. <uni-segmented-control :current="current" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00897B" style="background-color: #fff"></uni-segmented-control>
  4. <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore">
  5. <view v-if="position.length"></view>
  6. <view v-else class="text-center">
  7. <view class="nodata-img-parent">
  8. <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
  9. </view>
  10. <view class="color-999">暂无职位</view>
  11. </view>
  12. <uni-fab ref="fab" :pattern="{ iconColor: '#fff', buttonColor : '#00897B' }" :popMenu="false" vertical="bottom" horizontal="right" @fabClick="fabClick" />
  13. </scroll-view>
  14. </view>
  15. </template>
  16. <script setup>
  17. import { ref } from 'vue'
  18. import { onShow } from '@dcloudio/uni-app'
  19. // 设置自定义tabbar选中值
  20. onShow(() => {
  21. const currentPage = getCurrentPages()[0] // 获取当前页面实例
  22. const currentTabBar = currentPage?.getTabBar?.()
  23. // 设置当前tab页的下标index
  24. currentTabBar?.setData({ selected: 1 })
  25. })
  26. const current = ref(0)
  27. const controlList = ['招聘中', '已关闭']
  28. const position = ref([])
  29. const fab = ref()
  30. const handleChange = (e) => {
  31. current.value = e.currentIndex
  32. }
  33. const loadingMore = () => {}
  34. // 发布职位
  35. const fabClick = () => {
  36. }
  37. </script>
  38. <style scoped lang="scss">
  39. .box {
  40. height: 100vh;
  41. overflow: hidden;
  42. padding-bottom: 120rpx;
  43. box-sizing: border-box;
  44. display: flex;
  45. flex-direction: column;
  46. }
  47. </style>