//领取按钮
getCoupon(e){
const that = this;
if(this.disabled){
return false;
}
this.disabled = true;
const id = e.currentTarget.dataset.id;
App._post_form('user/getcoupon',{id:id},(res,obj)=>{
App.showSuccess('领取成功',()=>{
wx.navigateTo({
url: '/pages/user/coupon',
});
});
},null,()=>{
setTimeout(function(){
that.disabled = false;
},500);
});
},
disabled 在这里起作用.