feat: 领取优惠券新增节流功能

This commit is contained in:
Yer
2023-07-28 10:49:20 +08:00
parent fcc99b61e8
commit 02812a9128

View File

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