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)); }