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"}