2025-01-15 08:45:29 +00:00
|
|
|
<script setup>
|
2025-02-06 07:43:23 +00:00
|
|
|
import {liveStore} from "@/stores/live/index.js";
|
|
|
|
import {authStore} from "~/stores/auth/index.js";
|
2025-02-12 06:34:05 +00:00
|
|
|
import {useI18n} from 'vue-i18n'
|
2025-02-06 07:43:23 +00:00
|
|
|
const {auctionData} = liveStore()
|
|
|
|
const {userInfo}= authStore()
|
2025-02-19 13:03:54 +00:00
|
|
|
function formatThousands(num) {
|
|
|
|
|
|
|
|
return Number(num).toLocaleString();
|
|
|
|
}
|
2025-02-10 07:47:26 +00:00
|
|
|
const headList=[
|
2025-01-15 08:45:29 +00:00
|
|
|
{
|
2025-02-12 06:34:05 +00:00
|
|
|
label:useI18n().t('live_room.head'),
|
2025-02-10 07:47:26 +00:00
|
|
|
color:'#D03050',
|
|
|
|
value:'head'
|
|
|
|
},
|
|
|
|
{
|
2025-02-12 06:34:05 +00:00
|
|
|
label:useI18n().t('live_room.out'),
|
2025-02-10 07:47:26 +00:00
|
|
|
color:'#939393',
|
|
|
|
value:'out'
|
|
|
|
},
|
|
|
|
{
|
2025-02-12 06:34:05 +00:00
|
|
|
label:useI18n().t('live_room.success'),
|
2025-02-10 07:47:26 +00:00
|
|
|
color:'#34B633',
|
|
|
|
value:'success'
|
2025-01-15 08:45:29 +00:00
|
|
|
}
|
2025-02-10 07:47:26 +00:00
|
|
|
]
|
|
|
|
const headItem=(statusCode)=>{
|
|
|
|
return headList.find(x=>x.value===statusCode)
|
|
|
|
}
|
2025-01-15 08:45:29 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
id="list-container"
|
2025-02-06 07:43:23 +00:00
|
|
|
class="w-344px h-86px overflow-y-auto bg-#fff rounded-4px text-14px text-#939393 pt-7px pb-7px px-11px flex flex-col justify-between"
|
2025-01-15 08:45:29 +00:00
|
|
|
>
|
|
|
|
<transition-group name="list" tag="div">
|
2025-02-06 07:43:23 +00:00
|
|
|
<template v-if="auctionData.wsType==='stopArtwork'">
|
2025-02-12 06:34:05 +00:00
|
|
|
<div class="text-#939393 text-14px">{{ $t('live_room.next_lot') }}</div>
|
2025-02-06 07:43:23 +00:00
|
|
|
</template>
|
|
|
|
<template v-else-if="auctionData.auctionPriceList?.buys?.length>0">
|
2025-03-06 07:49:31 +00:00
|
|
|
<div v-for="(item, index) in auctionData.auctionPriceList?.buys" :key="index" class="flex flex-shrink-0 break-words whitespace-normal">
|
2025-02-11 06:55:25 +00:00
|
|
|
<div class="text-start shrink-0 w-60px" :style="`color: ${headItem(item.statusCode).color}`" >{{ headItem(item.statusCode).label }}</div>
|
2025-02-12 06:34:05 +00:00
|
|
|
<div class="text-start shrink-0 w-80px">{{ item.auctionType==='local'? $t('live_room.spot'):$t('live_room.network') }}</div>
|
2025-02-11 06:55:25 +00:00
|
|
|
<div class="text-start shrink-0 w-80px">{{ item.createdAt }}</div>
|
2025-03-06 07:49:31 +00:00
|
|
|
<div class="text-start shrink-0 w-80px ">
|
|
|
|
{{item.baseCurrency}}{{ formatThousands(item.baseMoney) }}
|
|
|
|
</div>
|
2025-03-07 01:35:48 +00:00
|
|
|
<div class="text-end text-#2B53AC shrink-0 w-20px">{{ item.userId===userInfo.ID?$t('live_room.me'):'' }}</div>
|
2025-02-06 07:43:23 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<template v-if="auctionData.wsType==='newArtwork'">
|
2025-02-12 06:34:05 +00:00
|
|
|
<div class="text-#939393 text-14px">{{ $t('live_room.start') }}</div>
|
2025-02-06 07:43:23 +00:00
|
|
|
</template>
|
|
|
|
|
2025-01-15 08:45:29 +00:00
|
|
|
</transition-group>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.list-enter-active, .list-leave-active {
|
|
|
|
transition: all 0.5s ease;
|
|
|
|
}
|
|
|
|
.list-enter-from, .list-leave-to {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateY(20px);
|
|
|
|
}
|
|
|
|
</style>
|