From b3a62a1875b98ae6bbce009beef49a2146748894 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期二, 10 十二月 2024 10:43:56 +0800
Subject: [PATCH] 1.供应商子账号:工作台、个人中心下拉
---
sub_pages/supplier/wallet/wallet-withdrao-deposit.vue | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue b/sub_pages/supplier/wallet/wallet-withdrao-deposit.vue
index 0c983f5..d5b1e34 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', {
@@ -91,12 +94,18 @@
setTimeout(() => {
uni.navigateBack()
}, 1000)
- } else {
- this.$message.showToast(resp.msg)
+ }else{
+ // if(resp&&resp.data&&resp.data[0]){
+ // this.$message.showToast(resp.data[0].msg)
+ // }
+ this.$message.showToast("提现失败")
}
-
}).catch(err => {
+
console.log(err)
+
+ }).finally(() => {
+ this.$message.hideLoading() // 关闭加载提示
})
},
@@ -107,12 +116,23 @@
if (!value) {
return callback(new Error('请输入提现金额'));
}
+
+
if (!decimalRegex.test(value)) {
return callback(new Error('提现金额必须是有效的数字(最多两位小数)'));
}
+ // 提现金额要大于0
+ if (value < 0.1) {
+ return callback(new Error('提现金额必须大于0.1'));
+ }
if (value > this.wallet.withdrawableAmount) {
return callback(new Error('提现金额不能大于可提现金额'));
+ }
+ // 提现金额不能大于500
+ if (value > 500) {
+ return callback(new Error('提现金额不能大于500'));
}
+
callback();
},
--
Gitblit v1.9.3