Feat:抽奖2.0(中奖名单缺中奖等级,优惠券领取接口异常)

This commit is contained in:
LinCyJang
2026-04-29 00:52:34 +08:00
parent a14d89efff
commit 092ef55293
8 changed files with 662 additions and 405 deletions
+15 -19
View File
@@ -50,21 +50,28 @@
<view class="pool-desc">实付满{{ buyThresholdText }}元即可获得抽奖码,定时统一开奖</view>
</view>
<view class="pool-body">
<swiper class="pool-swiper" :autoplay="true" :circular="true" :interval="5000" :duration="500" v-if="chunkedPrizeList.length">
<swiper-item v-for="(group, gIndex) in chunkedPrizeList" :key="gIndex">
<swiper
class="pool-swiper"
:autoplay="prizeList.length > 3"
:circular="prizeList.length > 3"
:interval="3000"
:duration="500"
:display-multiple-items="prizeList.length >= 3 ? 3 : prizeList.length"
v-if="prizeList.length"
>
<swiper-item v-for="(prize, gIndex) in prizeList" :key="gIndex">
<view class="pool-list-group">
<view
v-for="(item, index) in group"
:key="index"
class="pool-item"
style="margin: 0 auto;"
>
<view class="item-inner">
<view class="item-dashed">
<image class="pool-image" :src="item.prizeImage" mode="aspectFit" />
<image class="pool-image" :src="prize.prizeImage" mode="aspectFit" />
</view>
</view>
<image class="prize-tag" :src="item.levelIcon" v-if="item.levelIcon" mode="aspectFit" />
<view class="pool-name one-t">{{ item.prizeName }}</view>
<image class="prize-tag" :src="prize.levelIcon" v-if="prize.levelIcon" mode="aspectFit" />
<view class="pool-name one-t">{{ prize.prizeName }}</view>
</view>
</view>
</swiper-item>
@@ -152,16 +159,6 @@ export default {
prizeList() {
return this.activityInfo.prizePool || []
},
chunkedPrizeList() {
const list = this.prizeList
if (!list || !list.length) return []
const chunkSize = 3
const result = []
for (let i = 0; i < list.length; i += chunkSize) {
result.push(list.slice(i, i + chunkSize))
}
return result
},
activityGoodsList() {
const list = this.activityInfo.products || []
if (list.length > 0) {
@@ -331,7 +328,7 @@ export default {
uniqueId: currentSelect.unique || ''
}
if (this.activityId) {
q.activityId = Number(this.activityId)
q.drawActivityId = Number(this.activityId)
}
postCartAdd(q).then(res => {
this.isOpen = false
@@ -608,7 +605,6 @@ export default {
.pool-list-group {
display: flex;
flex-wrap: nowrap;
width: 100%;
}
.pool-item {