2025-01-22 07:44:50 +00:00
|
|
|
|
<script setup>
|
|
|
|
|
import xPopup from '@/components/x-popup/index.vue'
|
2025-01-23 11:43:45 +00:00
|
|
|
|
import {goodStore} from "@/stores/goods/index.js";
|
2025-01-22 08:23:48 +00:00
|
|
|
|
import xImage from '@/components/x-image/index.vue'
|
2025-01-23 11:29:29 +00:00
|
|
|
|
import DetailPopup from '@/pages/home/components/DetailPopup/index.vue'
|
2025-02-06 07:43:23 +00:00
|
|
|
|
import {liveStore} from "~/stores/live/index.js";
|
2025-02-06 08:29:17 +00:00
|
|
|
|
import {ref} from "vue";
|
|
|
|
|
const {pageRef,itemList,getArtworkList, loading: storeLoading,} = goodStore();
|
2025-02-06 07:43:23 +00:00
|
|
|
|
const {auctionData} = liveStore()
|
2025-01-23 11:29:29 +00:00
|
|
|
|
const showDetail=ref(false)
|
2025-02-06 08:29:17 +00:00
|
|
|
|
const localState = ref({
|
|
|
|
|
finished: false,
|
|
|
|
|
refreshing: false,
|
|
|
|
|
showDetail: false,
|
|
|
|
|
showHeight: ''
|
|
|
|
|
})
|
|
|
|
|
const onRefresh = async () => {
|
|
|
|
|
try {
|
|
|
|
|
localState.value.refreshing = true
|
|
|
|
|
localState.value.finished = false
|
|
|
|
|
const { finished } = await getArtworkList(true)
|
|
|
|
|
localState.value.finished = finished
|
|
|
|
|
} finally {
|
|
|
|
|
localState.value.refreshing = false
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-01-22 07:44:50 +00:00
|
|
|
|
const props = defineProps({
|
|
|
|
|
show: Boolean,
|
|
|
|
|
title: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const emit = defineEmits(['update:show'])
|
2025-02-05 09:00:22 +00:00
|
|
|
|
const showDetailInfo=ref(null)
|
2025-01-22 07:44:50 +00:00
|
|
|
|
const close = () => emit('update:show', false);
|
2025-02-05 09:00:22 +00:00
|
|
|
|
const openShow=(item)=>{
|
|
|
|
|
showDetailInfo.value=item
|
2025-01-23 11:29:29 +00:00
|
|
|
|
showDetail.value=true
|
|
|
|
|
}
|
2025-02-06 08:29:17 +00:00
|
|
|
|
const loadMore = async () => {
|
|
|
|
|
pageRef.value.page++
|
|
|
|
|
const { finished } = await getArtworkList()
|
|
|
|
|
localState.value.finished = finished
|
|
|
|
|
}
|
2025-01-22 07:44:50 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-02-05 09:00:22 +00:00
|
|
|
|
<div>
|
|
|
|
|
<x-popup :show="show" @update:show="close">
|
|
|
|
|
<template #title>
|
|
|
|
|
<div class="text-#000 text-16px">拍品列表</div>
|
|
|
|
|
<div class="text-#939393 text-16px ml-14px">共{{ pageRef.itemCount }}个拍品</div>
|
|
|
|
|
</template>
|
|
|
|
|
<div>
|
2025-02-06 08:29:17 +00:00
|
|
|
|
<van-pull-refresh
|
|
|
|
|
v-model="localState.refreshing"
|
|
|
|
|
success-text="刷新成功"
|
|
|
|
|
:success-duration="700"
|
|
|
|
|
@refresh="onRefresh"
|
2025-01-22 07:44:50 +00:00
|
|
|
|
>
|
2025-02-06 08:29:17 +00:00
|
|
|
|
<template #success>
|
|
|
|
|
<van-icon name="success" /> <span>刷新成功</span>
|
|
|
|
|
</template>
|
|
|
|
|
<van-list
|
|
|
|
|
v-model:loading="storeLoading"
|
|
|
|
|
:finished="localState.finished"
|
|
|
|
|
finished-text="没有更多了"
|
|
|
|
|
@load="loadMore"
|
2025-02-05 09:00:22 +00:00
|
|
|
|
>
|
2025-02-06 08:29:17 +00:00
|
|
|
|
<div
|
|
|
|
|
v-for="(item,index) of itemList"
|
|
|
|
|
:key="item.uuid"
|
|
|
|
|
class="flex mb-21px"
|
|
|
|
|
@click="openShow(item)"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="mr-10px flex-shrink-0 rounded-4px overflow-hidden cursor-pointer relative"
|
|
|
|
|
>
|
|
|
|
|
<xImage
|
|
|
|
|
:preview="false"
|
|
|
|
|
class="w-80px h-80px"
|
|
|
|
|
:src="item.artwork?.hdPic"
|
|
|
|
|
:alt="item?.artworkTitle"
|
|
|
|
|
loading="lazy"
|
|
|
|
|
/>
|
|
|
|
|
<div class="w-45px h-17px bg-#2B53AC text-12px line-height-none flex justify-center items-center absolute top-2px left-2px text-#fff">LOT{{item.index}}</div>
|
2025-02-08 07:31:02 +00:00
|
|
|
|
<div v-if="auctionData.artwork.index===item?.index" class="w-80px h-20px bg-#B58047 flex line-height-none justify-center items-center text-#fff text-12px bottom-0 absolute blink">竞拍中</div>
|
2025-02-06 08:29:17 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="ellipsis line-height-20px text-16px font-600 min-h-40px">
|
|
|
|
|
{{ item.artworkTitle }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text-14px text-#575757">起拍价:RMB 1,000</div>
|
|
|
|
|
<div class="text-14px text-#B58047">成交价:等待更新</div>
|
|
|
|
|
</div>
|
2025-02-05 09:00:22 +00:00
|
|
|
|
</div>
|
2025-02-06 08:29:17 +00:00
|
|
|
|
</van-list>
|
|
|
|
|
</van-pull-refresh>
|
|
|
|
|
|
2025-01-22 07:44:50 +00:00
|
|
|
|
</div>
|
2025-02-05 09:00:22 +00:00
|
|
|
|
</x-popup>
|
|
|
|
|
<DetailPopup v-model:show="showDetail" :detail-info="showDetailInfo"></DetailPopup>
|
|
|
|
|
</div>
|
2025-01-22 07:44:50 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.ellipsis {
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
2025-02-08 07:31:02 +00:00
|
|
|
|
.blink {
|
|
|
|
|
animation: fade 1s linear infinite;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes fade {
|
|
|
|
|
0%, 100% { opacity: 1; }
|
|
|
|
|
50% { opacity: 0.4; }
|
|
|
|
|
}
|
2025-01-22 07:44:50 +00:00
|
|
|
|
</style>
|