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 + }, } }