From aec615d75aebc29b3ab7c1516392d3d93247bdc8 Mon Sep 17 00:00:00 2001 From: wangxiaowei <1121133807@qq.com> Date: Wed, 11 Dec 2024 09:33:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=94=E8=A1=A5=E6=8F=90?= =?UTF-8?q?=E7=8E=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bundle_b/pages/local_shop/local_pay.vue | 17 ++++++++++++++++- bundle_b/pages/subsidy_shop/subsidy_shop.vue | 16 +++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/bundle_b/pages/local_shop/local_pay.vue b/bundle_b/pages/local_shop/local_pay.vue index a75bef5..ed960d6 100644 --- a/bundle_b/pages/local_shop/local_pay.vue +++ b/bundle_b/pages/local_shop/local_pay.vue @@ -418,7 +418,22 @@ post_station_time: this.post_station_time, local_goods_id: this.goods_id, } - + // huifu(pay_data).then((result) => { + // if (result.code == 1) { + // const pay = { + // nonceStr: result.data.nonceStr, + // package: result.data.package, + // paySign: result.data.paySign, + // signType: result.data.signType, + // timeStamp: result.data.timeStamp, + // } + + // pay_data.id = result.data.id + // pay_data.acc_cust_id = acc_cust_id + // this.handleWechatPay(pay, pay_data); + // } + // }) + // return false const acc_cust_id = parseInt(this.info.acc_cust_id) if (acc_cust_id > 0) { gtpay(pay_data).then((result) => { diff --git a/bundle_b/pages/subsidy_shop/subsidy_shop.vue b/bundle_b/pages/subsidy_shop/subsidy_shop.vue index 94fda2b..e229afa 100644 --- a/bundle_b/pages/subsidy_shop/subsidy_shop.vue +++ b/bundle_b/pages/subsidy_shop/subsidy_shop.vue @@ -194,6 +194,7 @@ setTimeout(() => { this.getBillionsWithdrawConfigFun() uni.hideLoading() + this.isWithdrawl = false }, 200) }, // 准备支付 @@ -223,13 +224,13 @@ return; } - if (Number(data.withdrawl_money) > Number(this.widthDrawConfig.able_withdraw)) { + if (Number(data.withdrawl_money) > Number(this.widthDrawConfig.able_withdraw) && this.isWithdrawl == false) { this.$toast({ title: '可提现金额不足' }); return; } - + const regex = /^[1-9]\d*(,\d{3})*(\.\d{1})?$|^0\.\d{1}$/; if (!regex.test(data.withdrawl_money)) return this.$toast({ title: '提现金额只保留一位小数' @@ -296,6 +297,7 @@ this.currentTab = 1 const price = data.withdrawal_amount.split('.') this.form.withdrawl_money = price[0] + this.withdrawlMoney = price[0] this.withdrawlBillionId = data.billions_id }, @@ -321,7 +323,15 @@ if (this.currentTab == 1) { // 补贴提现 setTimeout(() => { - this.form.withdrawl_money = value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); + const val = value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3') + if (this.isWithdrawl && val > this.withdrawlMoney) { + this.form.withdrawl_money = this.withdrawlMoney + return this.$toast({ + title: '输入的金额不能大于可提现金额' + }) + } + + this.form.withdrawl_money = val }, 0) } else if (this.currentTab == 2) { // 充值到余额