From 511f4b0720775d318bd43df9c1488dfb228ab45b Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 23 Jun 2026 15:29:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=85=E5=80=BC=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E7=94=A8rules=E6=A0=A1=E9=AA=8C(min+number)=E6=9B=BF=E4=BB=A3?= =?UTF-8?q?=E6=97=A0=E6=95=88=E7=9A=84min=E5=B1=9E=E6=80=A7=20+=20?= =?UTF-8?q?=E5=90=8E=E7=AB=AFNaN=E9=98=B2=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/proxy_recharge.ui | 5 ++++- wwwroot/proxy_recharge_submit.dspy | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wwwroot/proxy_recharge.ui b/wwwroot/proxy_recharge.ui index dd22810..00aba13 100644 --- a/wwwroot/proxy_recharge.ui +++ b/wwwroot/proxy_recharge.ui @@ -52,7 +52,10 @@ "uitype": "float", "required": true, "placeholder": "输入充值金额", - "min": 0.01, + "rules": [ + {"type": "number", "message": "充值金额必须是有效数字"}, + {"type": "min", "value": 0.01, "message": "充值金额必须大于0"} + ], "cwidth": 20 } ] diff --git a/wwwroot/proxy_recharge_submit.dspy b/wwwroot/proxy_recharge_submit.dspy index 9dafe66..2376b17 100644 --- a/wwwroot/proxy_recharge_submit.dspy +++ b/wwwroot/proxy_recharge_submit.dspy @@ -57,7 +57,7 @@ except (ValueError, TypeError): "options": {"text": "❌ 充值金额格式错误", "color": "#EF4444"} } -if amount <= 0: +if amount != amount or amount <= 0: return { "widgettype": "Text", "options": {"text": "❌ 充值金额必须大于0", "color": "#EF4444"}