2025-02-08 02:06:21 +00:00
|
|
|
<script setup>
|
|
|
|
import itemDetail from '@/components/itemDetail/index.vue'
|
2025-02-08 02:16:54 +00:00
|
|
|
import {userArtwork} from "~/api/goods/index.js";
|
2025-02-19 13:03:54 +00:00
|
|
|
import {useRouter} from "#vue-router";
|
2025-02-24 01:41:21 +00:00
|
|
|
import {authStore} from "~/stores/auth/index.js";
|
2025-02-13 07:35:16 +00:00
|
|
|
definePageMeta({
|
|
|
|
i18n: 'detail.text8'
|
|
|
|
})
|
2025-02-24 01:41:21 +00:00
|
|
|
const { userInfo, payment } = authStore()
|
2025-02-08 02:16:54 +00:00
|
|
|
const route = useRoute()
|
2025-02-10 07:47:26 +00:00
|
|
|
const detail = ref({})
|
2025-02-08 02:16:54 +00:00
|
|
|
const uuid = route.query.uuid
|
2025-02-08 08:24:26 +00:00
|
|
|
|
2025-02-10 07:47:26 +00:00
|
|
|
const initData = async () => {
|
|
|
|
const res = await userArtwork({uuid})
|
|
|
|
if (res.status === 0) {
|
|
|
|
detail.value = res.data
|
2025-03-07 08:38:02 +00:00
|
|
|
detail.value.auctionArtworkInfo.userId=detail.value.userID
|
2025-03-02 03:09:06 +00:00
|
|
|
}
|
2025-02-10 07:47:26 +00:00
|
|
|
}
|
2025-02-19 13:03:54 +00:00
|
|
|
const router = useRouter();
|
2025-02-10 07:47:26 +00:00
|
|
|
|
2025-02-19 13:03:54 +00:00
|
|
|
const goPay=()=>{
|
2025-03-07 11:23:52 +00:00
|
|
|
payment.value.leftPrice=detail.value.leftCnyPrice
|
2025-02-24 01:41:21 +00:00
|
|
|
payment.value.leftCurrency=detail.value.leftCurrency
|
|
|
|
payment.value.buyUid=detail.value.uuid
|
|
|
|
payment.value.auctionArtworkUuid=detail.value?.auctionArtworkUuid
|
|
|
|
if (detail.value.status===1){
|
|
|
|
router.push('/signature/protocol')
|
|
|
|
}else if (detail.value.status===4){
|
|
|
|
router.push('/payment')
|
|
|
|
}
|
2025-03-02 03:09:06 +00:00
|
|
|
//router.push('/payment')
|
2025-02-19 13:03:54 +00:00
|
|
|
}
|
2025-03-07 08:38:02 +00:00
|
|
|
|
2025-02-19 13:03:54 +00:00
|
|
|
function formatThousands(num) {
|
|
|
|
|
|
|
|
return Number(num).toLocaleString();
|
|
|
|
}
|
2025-02-08 02:16:54 +00:00
|
|
|
initData()
|
2025-02-08 02:06:21 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2025-02-10 07:47:26 +00:00
|
|
|
<div class="relative h-screen-nav flex flex-col">
|
|
|
|
<itemDetail class="grow-1" :detail-info="detail.auctionArtworkInfo"/>
|
2025-02-24 01:41:21 +00:00
|
|
|
<div v-if="[1,3,4].includes(detail.status)" class="h-81px bg-#fff flex justify-center pt-7px shrink-0">
|
2025-02-19 13:03:54 +00:00
|
|
|
<van-button class="w-213px !h-38px" type="primary" @click="goPay">
|
|
|
|
<span class="text-#fff text-14px">{{ $t('art_detail_page.button') }} {{detail.leftCurrency}}{{formatThousands(detail.leftPrice)}}</span>
|
2025-02-10 07:47:26 +00:00
|
|
|
</van-button>
|
|
|
|
</div>
|
2025-03-07 08:38:02 +00:00
|
|
|
|
2025-02-08 02:06:21 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
2025-02-10 07:47:26 +00:00
|
|
|
.cursor-move {
|
|
|
|
touch-action: none;
|
|
|
|
user-select: none;
|
|
|
|
}
|
2025-02-08 02:06:21 +00:00
|
|
|
</style>
|