From d4682d9bae7308c75823cce8d0e632f5dc3da33a Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Sat, 7 Sep 2024 11:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bundle_b/pages/local_shop/local_pay.vue | 55 ++++++++++++++++++------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/bundle_b/pages/local_shop/local_pay.vue b/bundle_b/pages/local_shop/local_pay.vue index 53816d3..e314c0b 100644 --- a/bundle_b/pages/local_shop/local_pay.vue +++ b/bundle_b/pages/local_shop/local_pay.vue @@ -21,7 +21,7 @@ - @@ -78,6 +78,8 @@ + + @@ -108,7 +110,10 @@ lstore_id: 0, info: [], goods_id: 0, - goods: [] + goods: [], + showPay: false, + payInfo: '', + payMoney: '' }; }, @@ -225,22 +230,18 @@ // 余额支付 if (this.payway == 3) { - localBalance({ - money: this.money, - lid: this.lstore_id, - user_id: this.user_id - }).then((result) => { - let status = 'fail' - if (result.code == 1) { - status = 'success' - } - this.handPayResult(status) - }) + this.showPay = true + this.payInfo = '向商家支付 ¥' + this.money + this.payMoney = this.money } // 微信支付 if (this.payway == 1) { + uni.showLoading({ + title: '支付中', + mask: true + }) localShopPayWeixin({ money: this.money, lid: this.lstore_id, @@ -257,8 +258,9 @@ this.handleWechatPay(pay); } }) + + uni.hideLoading() } - }, // 微信支付 @@ -284,6 +286,8 @@ this.cancelPopup = true } + + this.showPay = false }, onShowSuccessPopup() { @@ -297,7 +301,28 @@ onShowFailPopup() { this.cancelPopup = !this.cancelPopup - } + }, + onBalancePay() { + uni.showLoading({ + title: '支付中', + mask: true + }) + localBalance({ + money: this.money, + lid: this.lstore_id, + user_id: this.user_id + }).then((result) => { + let status = 'fail' + if (result.code == 1) { + status = 'success' + } + this.handPayResult(status) + }) + uni.hideLoading() + }, + closeKeyboard() { + this.showPay = false + }, } }