1.15提交

This commit is contained in:
zoujiandong
2026-01-15 18:38:21 +08:00
parent 00d0ec8a9b
commit cf6df28e8c
16 changed files with 683 additions and 180 deletions
+6 -5
View File
@@ -16,7 +16,7 @@
<scroll-view scroll-y class="detail-scroll">
<!-- 商品主图轮播 -->
<view class="swiper-box">
<swiper class="detail-swiper" :indicator-dots="true" :autoplay="false" :interval="3000" :duration="400" indicator-color="#ccc" indicator-active-color="#8B2316">
<swiper class="detail-swiper" :indicator-dots="true" :autoplay="true" :interval="5000" :duration="400" indicator-color="#ccc" indicator-active-color="#8B2316">
<swiper-item v-for="(img, idx) in images" :key="idx">
<image class="swiper-image" :src="img" mode="aspectFit"></image>
</swiper-item>
@@ -25,7 +25,7 @@
<!-- 标题与价格、销量 -->
<view class="summary">
<view class="title">{{ product.title }}</view>
<view class="title">[包邮]{{ product.title }}</view>
<view class="price-row">
<text class="price">{{ product.price }}积分</text>
<text class="exchanged">已兑换{{ product.times }}件</text>
@@ -51,8 +51,8 @@
</scroll-view>
<!-- 底部兑换按钮 -->
<view class="bottom-bar">
<view class="redeem-btn" @click="goExchange">在线兑换</view>
<view class="bottom-bar" @click="goExchange">
<view class="redeem-btn" >在线兑换</view>
</view>
</view>
</template>
@@ -76,6 +76,7 @@ const fetchDetail = async (id) => {
if ((res.code === 200 || res.code === '200') && res.data) {
product.value = {
id,
type: res.data.type,
title: res.data.name || '',
price: res.data.bonuspoints || 0,
times: res.data.times || 0,
@@ -103,7 +104,7 @@ onLoad((opts) => {
const goExchange = () => {
uni.navigateTo({
url: `/pages_goods/exchange/index?id=${product.value.id}&title=${encodeURIComponent(product.value.title)}&price=${product.value.price}`
url: `/pages_goods/exchange/index?id=${product.value.id}&title=${encodeURIComponent(product.value.title)}&price=${product.value.price}&type=${product.value.type}`
})
}
</script>