优化代码

This commit is contained in:
duan
2024-05-27 16:58:04 +08:00
parent d67ab4d9b6
commit 91d22d5e7d
9 changed files with 521 additions and 28 deletions

View File

@@ -171,7 +171,7 @@
以优惠¥{{emitorderfoodform.couponsPrice}}
</view>
</view>
<view class="fixedview_tow" @click="shopEvent">
<view class="fixedview_tow" @tap="fangdouevent">
立即付款
</view>
</view>
@@ -255,7 +255,11 @@
})
},
methods: {
fangdouevent() {
this.$u.debounce(() => {
this.showpopupclick()
}, 1000)
},
async getcoupon() {
let res = await this.api.userCoupon({
"orderNum": this.listinfo.amount,
@@ -336,10 +340,7 @@
orderId: this.listinfoid
})
},
// 防抖去结算
shopEvent(){
uni.$u.throttle(this.showpopupclick, 500)
},
// 去结算
showpopupclick() {
if (this.numValue == 0) {