2025-01-15 08:10:28 +00:00
|
|
|
<script setup>
|
2025-03-05 11:59:48 +00:00
|
|
|
import { ref, computed } from "vue"
|
2025-02-14 09:00:34 +00:00
|
|
|
import lockClosed from "@/static/images/lockdfd@2x.png"
|
|
|
|
import lockOpen from "@/static/images/lock4@2x.png"
|
|
|
|
import { liveStore } from "@/stores/live/index.js"
|
2025-01-22 07:44:50 +00:00
|
|
|
import xButton from '@/components/x-button/index.vue'
|
|
|
|
import tangPopup from './tangPopup.vue'
|
2025-02-14 09:00:34 +00:00
|
|
|
import { goodStore } from "@/stores/goods/index.js"
|
|
|
|
import { authStore } from "~/stores/auth/index.js"
|
2025-02-17 07:18:55 +00:00
|
|
|
import {showMinWindow} from "~/components/liveMinWindow/createMinWindow.js";
|
2025-02-20 06:47:57 +00:00
|
|
|
import {hideMinWindow1, showMinWindow1} from "~/components/floatingBubble/floating.js";
|
2025-02-10 09:02:58 +00:00
|
|
|
|
2025-02-17 07:18:55 +00:00
|
|
|
const { quoteStatus, changeStatus, show, auctionData, getSocketData ,lastSnapshot,fullLive} = liveStore()
|
2025-02-14 09:00:34 +00:00
|
|
|
const { pageRef } = goodStore()
|
2025-02-19 13:03:54 +00:00
|
|
|
const { userInfo ,payment} = authStore()
|
2025-02-10 09:02:58 +00:00
|
|
|
const showTang = ref(false)
|
2025-02-17 07:18:55 +00:00
|
|
|
const router = useRouter()
|
2025-02-17 11:54:11 +00:00
|
|
|
|
2025-02-17 07:18:55 +00:00
|
|
|
const captureVideoFrame = () => {
|
|
|
|
try {
|
|
|
|
const video = document.querySelector('#J_prismPlayer video')
|
|
|
|
if (!video) {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
|
|
|
|
const canvas = document.createElement('canvas')
|
|
|
|
canvas.width = video.videoWidth
|
|
|
|
canvas.height = video.videoHeight
|
|
|
|
|
|
|
|
const ctx = canvas.getContext('2d')
|
|
|
|
ctx.drawImage(video, 0, 0, canvas.width, canvas.height)
|
|
|
|
return canvas.toDataURL('image/jpeg', 0.9)
|
|
|
|
} catch (error) {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
}
|
2025-02-17 11:54:11 +00:00
|
|
|
|
2025-02-17 07:18:55 +00:00
|
|
|
const handleCapture = () => {
|
2025-02-20 06:47:57 +00:00
|
|
|
showMinWindow1({
|
|
|
|
onClick:()=>{
|
|
|
|
router.replace('/')
|
|
|
|
fullLive.value=true
|
|
|
|
hideMinWindow1()
|
|
|
|
}
|
|
|
|
})
|
2025-02-17 07:18:55 +00:00
|
|
|
}
|
2025-02-17 11:54:11 +00:00
|
|
|
|
2025-02-10 09:02:58 +00:00
|
|
|
const openOne = () => {
|
|
|
|
showTang.value = true
|
2025-01-22 07:44:50 +00:00
|
|
|
}
|
2025-02-10 09:02:58 +00:00
|
|
|
|
|
|
|
const paySide = computed(() => {
|
2025-02-20 06:47:57 +00:00
|
|
|
//当前是否已成交
|
2025-03-05 11:59:48 +00:00
|
|
|
return auctionData.value.needPayBuys?.length>0
|
2025-02-10 08:26:54 +00:00
|
|
|
})
|
2025-02-14 09:00:34 +00:00
|
|
|
|
2025-02-10 09:02:58 +00:00
|
|
|
const goPay = () => {
|
2025-02-20 06:47:57 +00:00
|
|
|
payment.value.leftCurrency=auctionData.value.needPayBuys?.[0]?.leftCurrency
|
2025-03-07 11:23:52 +00:00
|
|
|
payment.value.leftPrice=auctionData.value.needPayBuys?.[0]?.leftCnyPrice
|
2025-02-20 06:47:57 +00:00
|
|
|
payment.value.buyUid=auctionData.value.needPayBuys?.[0]?.uuid
|
2025-02-20 10:53:53 +00:00
|
|
|
payment.value.auctionArtworkUuid=auctionData.value.needPayBuys?.[0]?.auctionArtworkUuid
|
2025-02-17 07:18:55 +00:00
|
|
|
handleCapture()
|
|
|
|
router.push('/signature/protocol')
|
2025-02-10 09:02:58 +00:00
|
|
|
}
|
2025-01-15 08:10:28 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2025-03-05 11:59:48 +00:00
|
|
|
<div class="bg-white w-60px rounded-4px overflow-hidden">
|
2025-01-15 08:10:28 +00:00
|
|
|
<!-- 拍品信息 -->
|
2025-02-14 09:00:34 +00:00
|
|
|
<van-button
|
|
|
|
class="w-60px !h-60px"
|
2025-02-24 06:05:49 +00:00
|
|
|
@click.stop="openOne"
|
2025-02-14 09:00:34 +00:00
|
|
|
style="border: none;border-radius: 0"
|
|
|
|
>
|
2025-02-10 09:02:58 +00:00
|
|
|
<div class="text-center flex flex-col justify-center items-center text-#7D7D7F text-12px">
|
2025-02-12 06:34:05 +00:00
|
|
|
<div>{{ $t('live_room.lots') }}</div>
|
2025-02-10 09:02:58 +00:00
|
|
|
<div>({{ auctionData?.artwork?.index }}/{{ pageRef.itemCount ?? 0 }})</div>
|
2025-01-15 08:10:28 +00:00
|
|
|
</div>
|
2025-02-10 08:26:54 +00:00
|
|
|
</van-button>
|
2025-02-14 09:00:34 +00:00
|
|
|
|
2025-01-22 07:44:50 +00:00
|
|
|
<tangPopup v-model:show="showTang"></tangPopup>
|
2025-02-14 09:00:34 +00:00
|
|
|
|
2025-01-15 08:10:28 +00:00
|
|
|
<!-- 出价开关 -->
|
2025-02-14 09:00:34 +00:00
|
|
|
<van-button
|
|
|
|
class="w-60px !h-60px"
|
2025-02-24 06:05:49 +00:00
|
|
|
@click.stop="changeStatus"
|
2025-02-14 09:00:34 +00:00
|
|
|
style="border-right: none;border-left: none;border-radius: 0;padding: 0"
|
|
|
|
>
|
|
|
|
<div class="text-center flex flex-col justify-center items-center">
|
2025-02-10 08:26:54 +00:00
|
|
|
<div class="mb-4px">
|
2025-01-15 08:10:28 +00:00
|
|
|
<img
|
|
|
|
:src="quoteStatus ? lockClosed : lockOpen"
|
|
|
|
class="w-16px h-21px"
|
|
|
|
alt="锁图标"
|
|
|
|
/>
|
|
|
|
</div>
|
2025-02-14 09:00:34 +00:00
|
|
|
<div
|
|
|
|
:class="quoteStatus ? 'text-gray-500' : 'text-blue-600'"
|
|
|
|
class="text-10px transition-colors duration-200"
|
|
|
|
>
|
2025-02-12 06:34:05 +00:00
|
|
|
{{ quoteStatus ? $t('live_room.colse_bid') : $t('live_room.start_bid') }}
|
2025-01-15 08:10:28 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2025-02-10 08:26:54 +00:00
|
|
|
</van-button>
|
2025-02-14 09:00:34 +00:00
|
|
|
|
2025-01-15 08:10:28 +00:00
|
|
|
<!-- 支付 -->
|
2025-02-14 09:00:34 +00:00
|
|
|
<van-button
|
|
|
|
v-if="paySide"
|
|
|
|
class="w-60px !h-60px"
|
|
|
|
style="border: none;border-radius: 0"
|
2025-02-24 06:05:49 +00:00
|
|
|
@click.stop="goPay"
|
2025-02-14 09:00:34 +00:00
|
|
|
>
|
|
|
|
<div class="text-center flex flex-col justify-center items-center text-yellow-600">
|
2025-02-20 11:12:53 +00:00
|
|
|
<div class="text-10px">{{auctionData.needPayBuys?.[0]?.leftCurrency}}</div>
|
|
|
|
<div class="text-12px">{{auctionData.needPayBuys?.[0]?.leftPrice}}</div>
|
2025-02-12 06:34:05 +00:00
|
|
|
<div class="text-10px">{{ $t('art_detail_page.button') }}</div>
|
2025-01-15 08:10:28 +00:00
|
|
|
</div>
|
2025-02-10 08:26:54 +00:00
|
|
|
</van-button>
|
2025-01-15 08:10:28 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2025-02-14 09:00:34 +00:00
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
</style>
|