mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 07:55:53 +08:00
feat: ✨ 领取优惠券新增节流功能
This commit is contained in:
@@ -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 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 加载更多
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user