2025-01-09 11:01:35 +00:00
|
|
|
|
<script setup>
|
2025-01-17 03:06:19 +00:00
|
|
|
|
import {useRect} from '@vant/use';
|
2025-01-16 03:23:46 +00:00
|
|
|
|
import LiveRoom from '@/pages/LiveRoom/index.client.vue';
|
|
|
|
|
import itemDetail from '@/components/itemDetail/index.vue';
|
2025-01-17 08:56:13 +00:00
|
|
|
|
import {homeStore} from "@/stores/goods/index.js";
|
2025-01-17 03:06:19 +00:00
|
|
|
|
import Column from './components/Column/index.vue'
|
2025-01-17 02:19:01 +00:00
|
|
|
|
|
2025-01-20 03:42:25 +00:00
|
|
|
|
const {fullLive,getAuctionDetail,getArtworkList,itemList} = homeStore();
|
2025-01-17 03:06:19 +00:00
|
|
|
|
definePageMeta({
|
|
|
|
|
layout: 'default',
|
|
|
|
|
i18n: 'menu.home',
|
|
|
|
|
})
|
2025-01-16 03:23:46 +00:00
|
|
|
|
const liveRef = ref(null);
|
|
|
|
|
const loading = ref(false);
|
|
|
|
|
const finished = ref(false);
|
|
|
|
|
const refreshing = ref(false);
|
|
|
|
|
const page = ref(1);
|
|
|
|
|
const show = ref(false);
|
|
|
|
|
const showHeight = ref('');
|
2025-01-17 03:06:19 +00:00
|
|
|
|
const list = ref([{
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
2025-01-17 08:56:13 +00:00
|
|
|
|
title: '张天赐 | 日出而作,日落而息1',
|
2025-01-17 03:06:19 +00:00
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: 'RMB 10,000',
|
|
|
|
|
}, {
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/f7b65e23-ce21-41b4-8e58-9e6dc6950727.png',
|
2025-01-17 08:56:13 +00:00
|
|
|
|
title: '张天赐 | 日出而作,日落而息2',
|
2025-01-17 03:06:19 +00:00
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: '',
|
|
|
|
|
}, {
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/41eceb23-d168-4049-ae8e-48c5328b192f.png',
|
2025-01-17 08:56:13 +00:00
|
|
|
|
title: '张天赐 | 日出而作,日落而息3',
|
2025-01-17 03:06:19 +00:00
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: '',
|
|
|
|
|
}, {
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
|
|
|
|
title: '张天赐 | 日出而作,日落而息',
|
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: '',
|
|
|
|
|
}, {
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
|
|
|
|
title: '张天赐 | 日出而作,日落而息',
|
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: '',
|
|
|
|
|
}, {
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png',
|
|
|
|
|
title: '张天赐 | 日出而作,日落而息',
|
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: '',
|
|
|
|
|
}, {
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
|
|
|
|
title: '张天赐 | 日出而作,日落而息',
|
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: 'RMB 10,000',
|
|
|
|
|
}, {
|
|
|
|
|
image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png',
|
|
|
|
|
title: '张天赐 | 日出而作,日落而息',
|
|
|
|
|
startingPrice: 'RMB 1,000',
|
|
|
|
|
transactionPrice: 'RMB 10,000',
|
|
|
|
|
}])
|
|
|
|
|
|
2025-01-16 03:23:46 +00:00
|
|
|
|
const loadData = async () => {
|
|
|
|
|
// 加载数据逻辑...
|
|
|
|
|
};
|
2025-01-09 11:01:35 +00:00
|
|
|
|
|
2025-01-16 03:23:46 +00:00
|
|
|
|
const onRefresh = () => {
|
|
|
|
|
finished.value = false;
|
|
|
|
|
page.value = 1;
|
|
|
|
|
refreshing.value = true;
|
|
|
|
|
loadData();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const columns = computed(() => {
|
|
|
|
|
const result = [[], []];
|
2025-01-20 03:42:25 +00:00
|
|
|
|
itemList.value.forEach((item, index) => {
|
2025-01-17 08:56:13 +00:00
|
|
|
|
result[index % 2].push({ ...item, index });
|
2025-01-16 03:23:46 +00:00
|
|
|
|
});
|
|
|
|
|
return result;
|
|
|
|
|
});
|
2025-01-13 03:12:11 +00:00
|
|
|
|
|
|
|
|
|
const openShow = () => {
|
2025-01-10 06:59:54 +00:00
|
|
|
|
const rect = useRect(liveRef.value.$el);
|
2025-01-16 03:23:46 +00:00
|
|
|
|
showHeight.value = rect.height;
|
2025-01-13 03:12:11 +00:00
|
|
|
|
nextTick(() => {
|
2025-01-16 03:23:46 +00:00
|
|
|
|
show.value = true;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-01-17 03:06:19 +00:00
|
|
|
|
const changeLive = () => {
|
|
|
|
|
fullLive.value = true;
|
2025-01-16 03:23:46 +00:00
|
|
|
|
};
|
2025-01-20 03:42:25 +00:00
|
|
|
|
const initData=async ()=>{
|
|
|
|
|
await getAuctionDetail()
|
|
|
|
|
await getArtworkList()
|
|
|
|
|
}
|
|
|
|
|
initData()
|
2025-01-09 11:01:35 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-01-15 01:32:25 +00:00
|
|
|
|
<div class="flex-grow-1">
|
2025-01-17 03:06:19 +00:00
|
|
|
|
<div @click="changeLive" :class="['changeLive', fullLive ? 'expanded' : 'collapsed']">
|
2025-01-13 12:59:25 +00:00
|
|
|
|
<client-only>
|
2025-01-16 03:23:46 +00:00
|
|
|
|
<LiveRoom ref="liveRef" :fullLive="fullLive"/>
|
2025-01-13 12:59:25 +00:00
|
|
|
|
</client-only>
|
|
|
|
|
</div>
|
2025-01-17 03:06:19 +00:00
|
|
|
|
<transition name="fade">
|
2025-01-16 03:23:46 +00:00
|
|
|
|
<div v-show="!fullLive" class="bg-#fff">
|
|
|
|
|
<van-tabs sticky animated>
|
|
|
|
|
<van-tab title="拍品列表">
|
|
|
|
|
<div class="px-[16px] pt-[16px]">
|
|
|
|
|
<van-pull-refresh>
|
|
|
|
|
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="loadData">
|
|
|
|
|
<div class="w-full flex gap-[16px]">
|
2025-01-17 08:56:13 +00:00
|
|
|
|
<Column v-for="(column, colIndex) in columns" :key="colIndex" :colIndex="colIndex" :items="column" @openShow="openShow"/>
|
2025-01-09 11:37:03 +00:00
|
|
|
|
</div>
|
2025-01-16 03:23:46 +00:00
|
|
|
|
</van-list>
|
|
|
|
|
</van-pull-refresh>
|
|
|
|
|
</div>
|
|
|
|
|
</van-tab>
|
|
|
|
|
<van-tab title="拍卖说明">
|
|
|
|
|
<div class="px-16px pt-14px">
|
|
|
|
|
<div class="text-#575757 text-14px">
|
|
|
|
|
这里是后台富文本配置的说明,啊即可打开三等奖撒度老师的湿答答是快乐的阿四大皆空
|
|
|
|
|
</div>
|
2025-01-13 12:59:25 +00:00
|
|
|
|
</div>
|
2025-01-16 03:23:46 +00:00
|
|
|
|
</van-tab>
|
|
|
|
|
</van-tabs>
|
|
|
|
|
<van-back-top right="15vw" bottom="10vh"/>
|
|
|
|
|
<van-action-sheet :round="false" v-model:show="show" title="拍品详情">
|
|
|
|
|
<div class="content bg-[#F0F0F0]" :style="`height: calc(100vh - ${showHeight + 85}px)`">
|
|
|
|
|
<itemDetail/>
|
2025-01-13 03:12:11 +00:00
|
|
|
|
</div>
|
2025-01-16 03:23:46 +00:00
|
|
|
|
</van-action-sheet>
|
|
|
|
|
</div>
|
2025-01-15 02:55:22 +00:00
|
|
|
|
</transition>
|
2025-01-13 03:12:11 +00:00
|
|
|
|
</div>
|
2025-01-09 11:37:03 +00:00
|
|
|
|
</template>
|
2025-01-16 03:27:12 +00:00
|
|
|
|
<style>
|
|
|
|
|
:root:root {
|
2025-01-10 06:59:54 +00:00
|
|
|
|
--van-action-sheet-header-height: 39px;
|
|
|
|
|
}
|
2025-01-16 03:27:12 +00:00
|
|
|
|
</style>
|
|
|
|
|
<style scoped lang="scss">
|
2025-01-13 03:12:11 +00:00
|
|
|
|
:deep(.van-swipe__indicator) {
|
2025-01-10 06:59:54 +00:00
|
|
|
|
width: 8px;
|
|
|
|
|
height: 8px;
|
|
|
|
|
}
|
2025-01-16 03:23:46 +00:00
|
|
|
|
|
2025-01-15 02:55:22 +00:00
|
|
|
|
.fade-enter-active, .fade-leave-active {
|
|
|
|
|
transition: opacity 1s;
|
|
|
|
|
}
|
2025-01-16 03:23:46 +00:00
|
|
|
|
|
|
|
|
|
.fade-enter, .fade-leave-to {
|
2025-01-15 02:55:22 +00:00
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
2025-01-16 03:23:46 +00:00
|
|
|
|
|
|
|
|
|
:deep(.van-swipe__indicator:not(.van-swipe__indicator--active)) {
|
2025-01-13 03:12:11 +00:00
|
|
|
|
background: rgba(0, 0, 0, 0.8);
|
2025-01-10 06:59:54 +00:00
|
|
|
|
}
|
2025-01-16 03:23:46 +00:00
|
|
|
|
|
2025-01-15 02:55:22 +00:00
|
|
|
|
.changeLive {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
transition: height 0.5s ease, transform 0.5s ease;
|
|
|
|
|
}
|
2025-01-13 12:59:25 +00:00
|
|
|
|
|
2025-01-15 02:55:22 +00:00
|
|
|
|
.changeLive.collapsed {
|
|
|
|
|
height: 188px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.changeLive.expanded {
|
2025-01-15 04:00:19 +00:00
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 10;
|
2025-01-15 02:55:22 +00:00
|
|
|
|
height: calc(100vh - var(--van-nav-bar-height));
|
2025-01-17 02:19:01 +00:00
|
|
|
|
}
|
2025-01-16 03:23:46 +00:00
|
|
|
|
</style>
|