|
|
@@ -1,27 +1,67 @@
|
|
|
<template>
|
|
|
- <app-view class="presale-details">
|
|
|
+ <app-view class="g-detail">
|
|
|
<template #header>
|
|
|
- <app-navbar title="挂牌详情" />
|
|
|
+ <app-navbar title="商品详情" />
|
|
|
</template>
|
|
|
- <div class="presale-details__content">
|
|
|
- <Swipe class="banner" :autoplay="5000" indicator-color="white" lazy-render>
|
|
|
- <SwipeItem v-for="(url, index) in detailBanners" :key="index">
|
|
|
- <img :src="url" />
|
|
|
- </SwipeItem>
|
|
|
- </Swipe>
|
|
|
- <div class="goods">
|
|
|
- <h4 class="goods-title">{{ detail.goodsname }}</h4>
|
|
|
+ <Swipe class="g-detail__banner" :autoplay="5000" indicator-color="white" lazy-render>
|
|
|
+ <SwipeItem v-for="(url, index) in detailBanners" :key="index">
|
|
|
+ <img :src="url" />
|
|
|
+ </SwipeItem>
|
|
|
+ </Swipe>
|
|
|
+ <div class="g-detail__info">
|
|
|
+ <div class="pricebar">
|
|
|
+ <div class="pricebar-left">
|
|
|
+ <span class="tag">起拍价</span>
|
|
|
+ <span class="unit">¥</span>
|
|
|
+ <span class="price">{{ detail.startprice?.toFixed(2) }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="pricebar-right">
|
|
|
+ <span>总量:{{ detail.presaleqty }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="gallery">
|
|
|
- <Divider>商品详情</Divider>
|
|
|
- <template v-for="(url, index) in detailImages" :key="index">
|
|
|
- <img :src="url" alt="" />
|
|
|
- </template>
|
|
|
+ <div class="tag">
|
|
|
+ <Tag type="danger" round>大宗竞拍</Tag>
|
|
|
</div>
|
|
|
+ <div class="titlebar">
|
|
|
+ <span>{{ detail.sellname }}</span>
|
|
|
+ <span>{{ detail.goodsname }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="timebar">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="g-detail__cell">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>预售定金</span>
|
|
|
+ <span>{{ earnest }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>转让比例</span>
|
|
|
+ <span>{{ parsePercent(detail.transferdepositratio) }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="g-detail__cell">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>开始时间</span>
|
|
|
+ <span>{{ detail.starttime }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>结束时间</span>
|
|
|
+ <span>{{ detail.endtime }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="g-detail__desc">
|
|
|
+ <template v-for="(url, index) in detailImages" :key="index">
|
|
|
+ <img :src="url" alt="" />
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
- <div class="g-form__footer">
|
|
|
- <Button type="primary" block round @click="openComponent('buy')">我要出价</Button>
|
|
|
+ <div class="g-detail__footer">
|
|
|
+ <Button type="primary" block round @click="openComponent('delisting')">我要出价</Button>
|
|
|
</div>
|
|
|
<component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ detail }" @closed="closeComponent"
|
|
|
v-if="componentId" />
|
|
|
@@ -31,19 +71,19 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { computed, defineAsyncComponent } from 'vue'
|
|
|
-import { Swipe, SwipeItem, Divider, Button } from 'vant'
|
|
|
-import { getFileUrl } from '@/filters'
|
|
|
+import { Swipe, SwipeItem, Button, Tag } from 'vant'
|
|
|
+import { getFileUrl, parsePercent } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
- ['buy', defineAsyncComponent(() => import('./components/buy/index.vue'))], // 挂牌
|
|
|
+ ['delisting', defineAsyncComponent(() => import('./components/delisting/index.vue'))], // 摘牌
|
|
|
])
|
|
|
|
|
|
const { getParamString } = useNavigation()
|
|
|
const { componentRef, componentId, openComponent, closeComponent } = useComponent()
|
|
|
-const aa = getParamString('item')
|
|
|
-const detail: Model.PresaleAuctionsRsp = JSON.parse(aa.toString() || '{}')
|
|
|
+const qs = getParamString('item')
|
|
|
+const detail: Model.PresaleAuctionsRsp = JSON.parse(qs.toString() || '{}')
|
|
|
|
|
|
// 商品banner
|
|
|
const detailBanners = computed(() => {
|
|
|
@@ -51,6 +91,18 @@ const detailBanners = computed(() => {
|
|
|
return bannerpicurl?.split(',').map((path) => getFileUrl(path))
|
|
|
})
|
|
|
|
|
|
+// 预售定金
|
|
|
+const earnest = computed(() => {
|
|
|
+ switch (detail.presaledepositalgorithm) {
|
|
|
+ case 1:
|
|
|
+ return (detail.presaledepositvalue * 100).toFixed(2)
|
|
|
+ case 2:
|
|
|
+ return detail.presaledepositvalue.toFixed(2)
|
|
|
+ default:
|
|
|
+ return '0.0'
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
// 商品图片列表
|
|
|
const detailImages = computed(() => {
|
|
|
const pictureurls = detail.pictureurls ?? ''
|