From 35cbf6f8682265f6ebf39c2283680afe079aac74 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Mon, 20 Oct 2025 16:59:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E9=A2=86=E5=8F=96=E3=80=81?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subPackages/activity/dzxConSeason.vue | 48 +++++++++++++++++++++++++-- subPackages/techan/order.vue | 21 ++++++------ 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/subPackages/activity/dzxConSeason.vue b/subPackages/activity/dzxConSeason.vue index d717bd1..b48d34a 100644 --- a/subPackages/activity/dzxConSeason.vue +++ b/subPackages/activity/dzxConSeason.vue @@ -6,10 +6,14 @@ - - + + + + + 一键领取 + @@ -195,6 +199,30 @@ }) }, + getAllCoupon() { + if (!this.isReceive) { + uni.showToast({ + title: "短时间内请勿重复点击!", + icon: 'none' + }) + return; + } + this.isReceive = false + setTimeout(() => {this.isReceive = true}, 3000) + let ids = this.couponList.map(x=>x.id).join(',') + this.Post({ + ids: ids, + is_all: 1, + },"/api/coupon/getNewCouponsByActivitiesIds").then(res => { + if (res) { + uni.showToast({ + title: res.data, + icon: 'none' + }) + } + }) + }, + viewDetail(item) { this.gotoDetailByType(item) @@ -452,4 +480,18 @@ bottom: 66rpx; right: 26rpx; } + + .getAllCoupon{ + width: 347rpx; + height: 67rpx; + background: linear-gradient( 92deg, #FFB86C 0%, #FE9D09 100%); + border-radius: 13rpx 13rpx 13rpx 13rpx; + font-family: Alibaba PuHuiTi, Alibaba PuHuiTi; + font-weight: 500; + font-size: 32rpx; + color: #FFFFFF; + text-align: center; + line-height: 67rpx; + margin: 24rpx auto 30rpx; + } \ No newline at end of file diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue index bb7dc93..f67e030 100644 --- a/subPackages/techan/order.vue +++ b/subPackages/techan/order.vue @@ -243,11 +243,11 @@ export default { uni.$off("updateDataByConnect",this.getDataByConnect) }, onReady () { - // this.$nextTick(()=>{ - // setTimeout(()=>{ - // this.getMaxCouponData() - // },1000) - // }) + this.$nextTick(()=>{ + setTimeout(()=>{ + this.getMaxCouponData() + },1000) + }) }, methods: { submitAgreeAdress (val) { @@ -639,13 +639,14 @@ export default { // 获取最大优惠券 async getMaxCouponData () { + console.log("enter") let allPrice =0 let skuIds = [] - if (this.info && Array.isArray(this.info.goods)) { - this.info.goods.forEach(v=>{ - allPrice += v.skuInfo.money*v.skuInfo.buyNum - if (v.skuInfo.buyNum>0) { - skuIds.push(v.skuInfo.id) + if (this.orderList && Array.isArray(this.orderList)) { + this.orderList.forEach(v=>{ + allPrice += v.sInfo.price*v.sInfo.buyNum + if (v.sInfo.buyNum>0) { + skuIds.push(v.sInfo.id) } }) }