From 02812a91281f4279d664b66c5d4b86b1cc496530 Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Fri, 28 Jul 2023 10:49:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E6=96=B0=E5=A2=9E=E8=8A=82=E6=B5=81?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cart/coupon/couponCenter.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/cart/coupon/couponCenter.vue b/pages/cart/coupon/couponCenter.vue index 627e389..b303378 100644 --- a/pages/cart/coupon/couponCenter.vue +++ b/pages/cart/coupon/couponCenter.vue @@ -119,8 +119,15 @@ /** * 领取优惠券 */ - receive(item) { - receiveCoupons(item.id).then((res) => { + receive(val) { + this.$u.throttle(()=>{ + this.fetchCoupon(val) + }, 1500) + + }, + + fetchCoupon(val){ + receiveCoupons(val.id).then((res) => { if (res.data.code == 200) { uni.showToast({ title: "领取成功", @@ -134,6 +141,7 @@ } }); }, + /** * 加载更多 */