|
@@ -1,57 +1,94 @@
|
|
|
<template>
|
|
<template>
|
|
|
<app-view class="presale-list">
|
|
<app-view class="presale-list">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
- <app-navbar title="预售竞拍" :show-back-button="false" />
|
|
|
|
|
|
|
+ <app-navbar title="预售竞拍" :show-back-button="false" >
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <Icon name="bars" size=".4rem" @click="isWaterfall = !isWaterfall"/>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </app-navbar>
|
|
|
</template>
|
|
</template>
|
|
|
<Banner :data-list="bannerList" @click="onBannerClick" v-if="bannerList.length" />
|
|
<Banner :data-list="bannerList" @click="onBannerClick" v-if="bannerList.length" />
|
|
|
- <Waterfall class="g-goods-list" :data-list="startList">
|
|
|
|
|
- <template #default="{ item }">
|
|
|
|
|
- <div class="goods" @click="toDetail(item)">
|
|
|
|
|
- <div class="goods-image">
|
|
|
|
|
- <img :src="getFileUrl(item.attachmenturl)" />
|
|
|
|
|
|
|
+ <template v-if="isWaterfall">
|
|
|
|
|
+ <Waterfall class="g-goods-waterfall" :data-list="startList">
|
|
|
|
|
+ <template #default="{ item }">
|
|
|
|
|
+ <div class="goods" @click="toDetail(item)">
|
|
|
|
|
+ <div class="goods-image">
|
|
|
|
|
+ <img :src="getFileUrl(item.attachmenturl)" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="goods-info">
|
|
|
|
|
+ <div class="goods-info__title">{{ item.goodsname }}</div>
|
|
|
|
|
+ <div class="goods-info__price">
|
|
|
|
|
+ <Tag type="danger" plain>起拍价</Tag>
|
|
|
|
|
+ <span class="unit">¥</span>
|
|
|
|
|
+ <span class="integer">{{ item.startprice }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </Waterfall>
|
|
|
|
|
+ <Divider>发售历史</Divider>
|
|
|
|
|
+ <Waterfall class="g-goods-waterfall" :data-list="endList">
|
|
|
|
|
+ <template #default="{ item }">
|
|
|
|
|
+ <div class="goods" @click="toDetail(item)">
|
|
|
|
|
+ <div class="goods-image">
|
|
|
|
|
+ <img :src="getFileUrl(item.attachmenturl)" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="goods-info">
|
|
|
|
|
+ <div class="goods-info__title">{{ item.goodsname }}</div>
|
|
|
|
|
+ <div class="goods-info__price">
|
|
|
|
|
+ <Tag type="danger" plain>预售价</Tag>
|
|
|
|
|
+ <span class="unit">¥</span>
|
|
|
|
|
+ <span class="integer">{{ item.tradeprice }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="goods-info">
|
|
|
|
|
- <div class="goods-info__title">{{ item.goodsname }}</div>
|
|
|
|
|
- <div class="goods-info__price">
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </Waterfall>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <ul class="lg-goods-list">
|
|
|
|
|
+ <li class="list-item g-block--bg" v-for="(item, index) in startList" :key="index" @click="toDetail(item)">
|
|
|
|
|
+ <div class="img"><img :src="getFirstImage(item.attachmenturl)" /></div>
|
|
|
|
|
+ <div class="info">
|
|
|
|
|
+ <div class="title">{{ item.goodsname }}</div>
|
|
|
|
|
+ <div class="desc">开始:{{ formatDate(item.starttime) }}-结束:{{ formatDate(item.endtime) }}</div>
|
|
|
|
|
+ <div class="price">
|
|
|
<Tag type="danger" plain>起拍价</Tag>
|
|
<Tag type="danger" plain>起拍价</Tag>
|
|
|
<span class="unit">¥</span>
|
|
<span class="unit">¥</span>
|
|
|
<span class="integer">{{ item.startprice }}</span>
|
|
<span class="integer">{{ item.startprice }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </Waterfall>
|
|
|
|
|
- <Divider>发售历史</Divider>
|
|
|
|
|
- <Waterfall class="g-goods-list" :data-list="endList">
|
|
|
|
|
- <template #default="{ item }">
|
|
|
|
|
- <div class="goods" @click="toDetail(item)">
|
|
|
|
|
- <div class="goods-image">
|
|
|
|
|
- <img :src="getFileUrl(item.attachmenturl)" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="goods-info">
|
|
|
|
|
- <div class="goods-info__title">{{ item.goodsname }}</div>
|
|
|
|
|
- <div class="goods-info__price">
|
|
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <Divider>发售历史</Divider>
|
|
|
|
|
+ <ul class="g-goods-list">
|
|
|
|
|
+ <li class="list-item g-block--bg" v-for="(item, index) in endList" :key="index" @click="toDetail(item)">
|
|
|
|
|
+ <div class="img"><img :src="getFirstImage(item.attachmenturl)" /></div>
|
|
|
|
|
+ <div class="info">
|
|
|
|
|
+ <div class="title">{{ item.goodsname }}</div>
|
|
|
|
|
+ <div class="price">
|
|
|
<Tag type="danger" plain>预售价</Tag>
|
|
<Tag type="danger" plain>预售价</Tag>
|
|
|
<span class="unit">¥</span>
|
|
<span class="unit">¥</span>
|
|
|
<span class="integer">{{ item.tradeprice }}</span>
|
|
<span class="integer">{{ item.tradeprice }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </Waterfall>
|
|
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </template>
|
|
|
</app-view>
|
|
</app-view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from 'vue'
|
|
import { shallowRef } from 'vue'
|
|
|
-import { Tag, Divider } from 'vant'
|
|
|
|
|
-import { getFileUrl } from '@/filters'
|
|
|
|
|
|
|
+import { Tag, Divider, Icon } from 'vant'
|
|
|
|
|
+import { formatDate, getFileUrl, getFirstImage } from '@/filters'
|
|
|
import { useNavigation } from '../../../router/navigation'
|
|
import { useNavigation } from '../../../router/navigation'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { queryPresaleAuctions } from '@/services/api/presale'
|
|
import { queryPresaleAuctions } from '@/services/api/presale'
|
|
|
import Banner from '../../../components/base/banner/index.vue'
|
|
import Banner from '../../../components/base/banner/index.vue'
|
|
|
import Waterfall from '../../../components/base/waterfall/index.vue'
|
|
import Waterfall from '../../../components/base/waterfall/index.vue'
|
|
|
|
|
|
|
|
|
|
+const isWaterfall = shallowRef(false)
|
|
|
const { router } = useNavigation()
|
|
const { router } = useNavigation()
|
|
|
const bannerList = shallowRef<string[]>([])
|
|
const bannerList = shallowRef<string[]>([])
|
|
|
|
|
|