123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <view class="defaultBgc" style="height: 100vh;">
- <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore">
- <view v-if="list.length > 0">
- <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)" >
- <view class="f-horizon">
- <image class="avatar" :src="item.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
- <view class="f-straight" style="width:60vw;">
- <view class="title-des">{{ item.enterprise.name }}</view>
- <view class="s-word">
- <span class="dis">
- <view class="show-more" :style="{'width': item.enterprise.industryName == '' ? '15vw' : '30vw'}">
- {{ item.enterprise.industryName ? item.enterprise.industryName : '行业未知' }}
- </view>
- <span class="divider ss-m-10"> | </span>
- <span>{{ item.enterprise.scaleName || '规模未知' }}</span>
- </span>
- </view>
- </view>
- </view>
- <view style="border-bottom: 1px dashed #ccc;"></view>
- <view class="ss-m-t-20 d-flex align-center justify-end">
- <image class="r-avatar" :src="getUserAvatar(item.contact.avatar, item.contact.sex)"></image>
- <text class="ss-m-l-20">
- {{ item.contact.name }} | {{ item.post.nameCn }}
- </text>
- </view>
- </uni-card>
- <uni-load-more :status="status" />
- </view>
- <view v-else class="nodata-img-parent">
- <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
- </view>
- </scroll-view>
- </view>
- </template>
- <script setup>
- import { ref } from 'vue'
- import { getInterestedMePage } from '@/api/user'
- import { dealDictObjData } from '@/utils/position'
- import { getUserAvatar } from '@/utils/avatar'
- const status = ref('more')
- const queryParams = ref({
- pageNo: 1,
- pageSize: 10
- })
- const list = ref([])
- const getList = async () => {
- const res = await getInterestedMePage(queryParams.value)
- const arr = res?.data?.list || []
- if (arr?.length) {
- arr.forEach(e => {
- e.enterprise = dealDictObjData({}, e.enterprise)
- })
- list.value = list.value.concat(arr)
- }
- status.value = arr?.length < queryParams.value.pageSize ? 'noMore' : 'more'
- }
- getList()
- // 加载跟多
- const loadingMore = () => {
- status.value = 'loading'
- queryParams.value.pageNo++
- getList()
- }
- </script>
- <style scoped lang="scss">
- </style>
|