| | |
| | | <text class="modal-prize-name">{{ currentPrize.name }}</text> |
| | | </view> |
| | | |
| | | <view class="prize-result-text" v-if="currentPrize.id !== 'thanks'"> |
| | | <view class="prize-result-text" v-if="currentPrize.id !== 'notWIn'"> |
| | | 获得了 {{ currentPrize.name }} |
| | | </view> |
| | | <view class="prize-result-text" v-else> |
| | | {{ currentPrize.name }},再接再厉! |
| | | </view> |
| | | |
| | | <view class="modal-buttons"> |
| | | <view class="modal-buttons" v-if="currentPrize.id !== 'notWIn'"> |
| | | <button class="confirm-btn" @tap="useItNow">去购物</button> |
| | | </view> |
| | | <view class="modal-buttons" v-else> |
| | | <button class="confirm-btn" @tap="closePrizeModal">确定</button> |
| | | </view> |
| | | </view> |
| | |
| | | // 分享朋友圈尝试标记 |
| | | shareTimelineAttempt: false, |
| | | activityCover:'', |
| | | activityName:'' |
| | | activityName:'', |
| | | couponId:'' |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | /** |
| | | * 立即使用优惠券 |
| | | */ |
| | | useItNow(item) { |
| | | |
| | | console.log('优惠卷详情--------------------->',JSON.stringify(item)) |
| | | // uni.navigateTo({ |
| | | // url: `/pages/navigation/search/searchPage?promotionsId=${item.couponId}&promotionType=COUPON`, |
| | | // }); |
| | | if(item.scopeType ==='PORTION_GOODS'){ |
| | | //获取优惠卷对应的商品 |
| | | //指定跳转到商品详情页面进行购买 |
| | | } |
| | | uni.navigateTo({ |
| | | url: `/pages/commodity-square/coups-goods-list?promotionsId=${item.couponId}&promotionType=COUPON` |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | this.stopAutoScroll() |
| | | }, |
| | |
| | | async getUnmber(id) { |
| | | const prizeNums = await prizeNum(id); |
| | | this.remainingTimes = prizeNums.data.data |
| | | }, |
| | | /** |
| | | * 立即使用优惠券 |
| | | */ |
| | | useItNow() { |
| | | |
| | | // uni.navigateTo({ |
| | | // url: `/pages/navigation/search/searchPage?promotionsId=${item.couponId}&promotionType=COUPON`, |
| | | // }); |
| | | uni.navigateTo({ |
| | | url: `/pages/commodity-square/coups-goods-list?promotionsId=${this.couponId}&promotionType=COUPON` |
| | | }); |
| | | }, |
| | | async getGrantRecord(id) { |
| | | const record = await grantRecord(id); |
| | |
| | | }); |
| | | }, |
| | | async onClick() { |
| | | this.couponId = '' |
| | | // 检查剩余次数 |
| | | if (this.remainingTimes <= 0) { |
| | | uni.showToast({ |
| | |
| | | return |
| | | } |
| | | const prizeDraw = await prize(this.activityId); |
| | | console.log('---------------->',prizeDraw) |
| | | let winId = 'notWIn' |
| | | if (prizeDraw.data.code == 200) { |
| | | winId = prizeDraw.data.data.id |
| | |
| | | |
| | | // 奖品的索引 |
| | | this.$refs.dialer.run(findInfo) |
| | | if(prizeDraw.data.data){ |
| | | this.couponId = prizeDraw.data.data.couponId |
| | | } |
| | | |
| | | await this.getGrantRecord(this.activityId) |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | .prize-img { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border-radius: 10rpx; |
| | | } |
| | | |