From a8f8ac802fe1b8a725b83b08b7c2843de3d14b8d Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Mon, 6 Nov 2023 03:03:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=85=E5=80=BCbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/SystemSetting.js | 2 ++ web/src/pages/TopUp/index.js | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/components/SystemSetting.js b/web/src/components/SystemSetting.js index ef067845..572f1d04 100644 --- a/web/src/components/SystemSetting.js +++ b/web/src/components/SystemSetting.js @@ -119,6 +119,7 @@ const SystemSetting = () => { name === 'ServerAddress' || name === 'EpayId' || name === 'EpayKey' || + name === 'MinCharge' || name === 'Price' || name === 'PayAddress' || name === 'GitHubClientId' || @@ -159,6 +160,7 @@ const SystemSetting = () => { await updateOption('EpayId', inputs.EpayId); await updateOption('EpayKey', inputs.EpayKey); await updateOption('Price', "" + inputs.Price); + await updateOption('MinCharge', "" + inputs.MinCharge); }; const submitSMTP = async () => { diff --git a/web/src/pages/TopUp/index.js b/web/src/pages/TopUp/index.js index a627fedc..0cec1c67 100644 --- a/web/src/pages/TopUp/index.js +++ b/web/src/pages/TopUp/index.js @@ -53,6 +53,9 @@ const TopUp = () => { if (amount === 0) { await getAmount(); } + if (amount === 0) { + return; + } setPayWay(payment) setOpen(true); } @@ -143,7 +146,8 @@ const TopUp = () => { if (message === 'success') { setAmount(parseInt(data)); } else { - showError(data); + showError(message); + setAmount(0) // setTopUpCount(parseInt(res.data.count)); // setAmount(parseInt(data)); }