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 @@ } }); }, + /** * 加载更多 */