- 移除 goodStore 的使用,改为直接调用 userArtwork API - 通过路由参数获取艺术品 UUID,动态加载详情数据 - 更新模板,使用新获取的数据渲染页面 - 修改 profile 页面跳转到艺术品详情的方式,传递 UUID 参数
37 lines
1.1 KiB
Vue
37 lines
1.1 KiB
Vue
<script setup>
|
|
import itemDetail from '@/components/itemDetail/index.vue'
|
|
import {userArtwork} from "~/api/goods/index.js";
|
|
const route = useRoute()
|
|
const detail=ref({})
|
|
const uuid = route.query.uuid
|
|
const initData=async ()=>{
|
|
const res=await userArtwork({uuid})
|
|
if (res.status===0){
|
|
detail.value=res.data
|
|
console.log('detail.value',detail.value)
|
|
}
|
|
}
|
|
initData()
|
|
</script>
|
|
|
|
<template>
|
|
<div class="relative h-screen-nav flex flex-col">
|
|
<itemDetail class="grow-1" :detail-info="detail.auctionArtworkInfo"/>
|
|
<div v-if="[1,3,4].includes(detail.status)" class="h-81px bg-#fff flex justify-center pt-7px">
|
|
<van-button class="w-213px van-btn-h-38px" type="primary">
|
|
<span class="text-#fff text-14px">去支付 RMB10,000</span>
|
|
</van-button>
|
|
</div>
|
|
<div class="w-108px h-137px absolute bottom-240px right-6px">
|
|
<img src="@/static/images/zd5530@2x.png" class="w-full h-full" alt="">
|
|
<div class="flex flex-col items-center absolute bottom-25px text-14px text-#B58047 left-1/2 transform translate-x--1/2 whitespace-nowrap">
|
|
<div>恭喜您</div>
|
|
<div>竞拍成功</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style> |