绿满眶商城微信小程序-uniapp
zxl
2025-09-08 fd4dd7891b8d1301f6fb0b88e482e52426454a5e
Merge remote-tracking branch 'origin/dev_fix_sub' into dev_fix_sub
2个文件已修改
50 ■■■■■ 已修改文件
pages/commodity-square/commoditySquare.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/prize/PrizeDetail/PrizeDetail.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/commodity-square/commoditySquare.vue
@@ -518,6 +518,7 @@
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
        color: #e7c463;
    }
    .goodsPrice {
pages/prize/PrizeDetail/PrizeDetail.vue
@@ -61,14 +61,17 @@
                    <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>
@@ -150,7 +153,8 @@
                // 分享朋友圈尝试标记
                shareTimelineAttempt: false,
                activityCover:'',
                activityName:''
                activityName:'',
                couponId:''
            };
        },
        computed: {
@@ -215,23 +219,6 @@
                }
            }
        },
        /**
         * 立即使用优惠券
         */
        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()
        },
@@ -239,6 +226,18 @@
            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);
@@ -374,6 +373,7 @@
                });
            },
            async onClick() {
                this.couponId = ''
                // 检查剩余次数
                if (this.remainingTimes <= 0) {
                    uni.showToast({
@@ -383,6 +383,7 @@
                    return
                }
                const prizeDraw = await prize(this.activityId);
                console.log('---------------->',prizeDraw)
                let winId = 'notWIn'
                if (prizeDraw.data.code == 200) {
                    winId = prizeDraw.data.data.id
@@ -395,6 +396,10 @@
                // 奖品的索引
                this.$refs.dialer.run(findInfo)
                if(prizeDraw.data.data){
                    this.couponId = prizeDraw.data.data.couponId
                }
                await this.getGrantRecord(this.activityId)
            }
        }
@@ -1129,8 +1134,8 @@
    }
    .prize-img {
        width: 80rpx;
        height: 80rpx;
        width: 120rpx;
        height: 120rpx;
        border-radius: 10rpx;
    }