From 6d2ed02113ca14df030522264d68ac4fec369b3f Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期一, 04 十一月 2024 09:52:15 +0800
Subject: [PATCH] 1.微信支付
---
sub_pages/supplier/wallet/wallet-withdrao-deposit.vue | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue b/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue
index 0c983f5..a10245a 100644
--- a/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue
+++ b/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue
@@ -80,6 +80,9 @@
},
methods: {
submitWithdraw(){
+ this.$message.showLoading()
+ // 防止多次重复点击
+ this.protocal=false
// 判断输入的金额是否是数字,需要真正则表达式,两位小数点
this.$refs.uForm.validate().then(async res => {
const resp = await this.$http.request('post', '/v2/withdraw-record', {
@@ -97,6 +100,8 @@
}).catch(err => {
console.log(err)
+ }).finally(() => {
+ this.$message.hideLoading() // 关闭加载提示
})
},
@@ -107,12 +112,18 @@
if (!value) {
return callback(new Error('请输入提现金额'));
}
+
+
if (!decimalRegex.test(value)) {
return callback(new Error('提现金额必须是有效的数字(最多两位小数)'));
}
+ // 提现金额要大于0
+ if (value <= 0) {
+ return callback(new Error('提现金额必须大于0'));
+ }
if (value > this.wallet.withdrawableAmount) {
return callback(new Error('提现金额不能大于可提现金额'));
- }
+ }
callback();
},
--
Gitblit v1.9.3