Browse Source

充值设置表单验证修改

shizhongqi 3 months ago
parent
commit
dacfe48568
1 changed files with 10 additions and 1 deletions
  1. 10 1
      hdApp/src/admin/recharge/rechargeSetting.vue

+ 10 - 1
hdApp/src/admin/recharge/rechargeSetting.vue

@@ -344,7 +344,16 @@ export default {
 		saveSetting() {
 			if (this.form.isVipMember == 1) {
 				const amount = parseFloat(this.form.vipAmount);
-				if ((!amount && amount !== 0) || amount <= -1) {
+				if (amount <= 0) {
+					this.$msg('成为VIP的充值金额不能小于等于0');
+					return;
+				}
+				// 最小为 0.01
+				if (amount < 0.01) {
+					this.$msg('成为VIP的充值金额不能小于0.01');
+					return;
+				}
+				if (!amount) {
 					this.$msg('请输入成为VIP的充值金额');
 					return;
 				}