index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view>
  3. <view v-if="list.length > 0">
  4. <uni-card v-for="(item,index) in list" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)" >
  5. <view class="f-horizon">
  6. <image class="avatar" :src="item.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
  7. <view class="f-straight" style="width:60vw;">
  8. <view class="title-des">{{ item.enterprise.name }}</view>
  9. <view class="s-word">
  10. <span class="dis">
  11. <view class="show-more" :style="{'width': item.enterprise.industryName == '' ? '15vw' : '30vw'}">
  12. {{ item.enterprise.industryName ? item.enterprise.industryName : '行业未知' }}
  13. </view>
  14. <span class="divider ss-m-10"> | </span>
  15. <span>{{ item.enterprise.scaleName || '规模未知' }}</span>
  16. </span>
  17. </view>
  18. </view>
  19. </view>
  20. <view style="border-bottom: 1px dashed #ccc;"></view>
  21. <view class="ss-m-t-20 d-flex align-center justify-end">
  22. <image class="r-avatar" :src="getUserAvatar(item.contact.avatar, item.contact.sex)"></image>
  23. <text class="ss-m-l-20">
  24. {{ item.contact.name }} | {{ item.post.nameCn }}
  25. </text>
  26. </view>
  27. </uni-card>
  28. </view>
  29. <view v-else class="nodata-img-parent">
  30. <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
  31. </view>
  32. </view>
  33. </template>
  34. <script setup>
  35. import { ref } from 'vue'
  36. import { getInterestedMePage } from '@/api/user'
  37. import { dealDictObjData } from '@/utils/position'
  38. import { getUserAvatar } from '@/utils/avatar'
  39. const queryParams = ref({
  40. pageNo: 1,
  41. pageSize: 10
  42. })
  43. const list = ref([])
  44. const getList = async () => {
  45. const res = await getInterestedMePage(queryParams.value)
  46. const { data } = res
  47. if (!data.list.length) return
  48. list.value = data.list.map(e => {
  49. e.enterprise = dealDictObjData({}, e.enterprise)
  50. e.active = false
  51. return e
  52. })
  53. }
  54. getList()
  55. </script>
  56. <style scoped lang="scss">
  57. </style>