优化支付防抖
This commit is contained in:
@@ -124,7 +124,6 @@
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e,'调试1')
|
||||
try {
|
||||
this.orderfood = e.orderfood //等于0扫码点餐下单
|
||||
this.amount = e.amount
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
以优惠¥{{emitorderfoodform.couponsPrice}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview_tow" @click="showpopupclick">
|
||||
<view class="fixedview_tow" @click="shopEvent">
|
||||
立即付款
|
||||
</view>
|
||||
</view>
|
||||
@@ -336,6 +336,10 @@
|
||||
orderId: this.listinfoid
|
||||
})
|
||||
},
|
||||
// 防抖去结算
|
||||
shopEvent(){
|
||||
uni.$u.throttle(this.showpopupclick, 500)
|
||||
},
|
||||
// 去结算
|
||||
showpopupclick() {
|
||||
if (this.numValue == 0) {
|
||||
@@ -365,7 +369,6 @@
|
||||
},
|
||||
|
||||
async showpopupclickdd(i) {
|
||||
console.log(this.radiovalue1, '调试121')
|
||||
|
||||
if (this.radiovalue1 == 1) {
|
||||
let res = await this.api.payorderPay({
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<view class="">
|
||||
共{{Quantity}}件 已优惠¥{{calculateEvent(info.save) }}
|
||||
</view>
|
||||
<button class="btnStyle" @click="sumbitFrom">提交订单</button>
|
||||
<button class="btnStyle" @click="sumbitFroms">提交订单</button>
|
||||
</view>
|
||||
<payPassword ref="payPwd" @accountPayevent="accountPayevent" v-show="ispws"></payPassword>
|
||||
</view>
|
||||
@@ -180,6 +180,10 @@
|
||||
shopId_id: this.info.shopId
|
||||
})
|
||||
},
|
||||
// 防抖
|
||||
sumbitFroms(){
|
||||
uni.$u.throttle(this.sumbitFrom, 500)
|
||||
},
|
||||
async sumbitFrom() {
|
||||
let payMoney = this.info.salePrice * this.Quantity
|
||||
let res = await this.api.creatGroupOrder({
|
||||
@@ -198,7 +202,6 @@
|
||||
} else {
|
||||
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
|
||||
let isVip = uni.cache.get('userInfo').isPwd
|
||||
console.log(isVip,'调试1')
|
||||
if (isVip == 0) {
|
||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
||||
shopId_id: uni.cache.get('shopUser')
|
||||
|
||||
Reference in New Issue
Block a user