mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 16:06:38 +08:00
feat: 在线支付限制输入金额
This commit is contained in:
parent
81167c4322
commit
05beade3ad
@ -4,6 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@douyinfe/semi-ui": "^2.46.1",
|
"@douyinfe/semi-ui": "^2.46.1",
|
||||||
|
"@douyinfe/semi-icons": "^2.46.1",
|
||||||
"@visactor/vchart": "~1.8.8",
|
"@visactor/vchart": "~1.8.8",
|
||||||
"@visactor/react-vchart": "~1.8.8",
|
"@visactor/react-vchart": "~1.8.8",
|
||||||
"@visactor/vchart-semi-theme": "~1.8.8",
|
"@visactor/vchart-semi-theme": "~1.8.8",
|
||||||
|
@ -8,8 +8,10 @@ const TopUp = () => {
|
|||||||
const [redemptionCode, setRedemptionCode] = useState('');
|
const [redemptionCode, setRedemptionCode] = useState('');
|
||||||
const [topUpCode, setTopUpCode] = useState('');
|
const [topUpCode, setTopUpCode] = useState('');
|
||||||
const [topUpCount, setTopUpCount] = useState(10);
|
const [topUpCount, setTopUpCount] = useState(10);
|
||||||
|
const [minTopupCount, setMinTopUpCount] = useState(1);
|
||||||
const [amount, setAmount] = useState(0.0);
|
const [amount, setAmount] = useState(0.0);
|
||||||
const [topUpLink, setTopUpLink] = useState('');
|
const [topUpLink, setTopUpLink] = useState('');
|
||||||
|
const [enableOnlineTopUp, setEnableOnlineTopUp] = useState(false);
|
||||||
const [userQuota, setUserQuota] = useState(0);
|
const [userQuota, setUserQuota] = useState(0);
|
||||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
@ -233,7 +235,16 @@ const TopUp = () => {
|
|||||||
name='redemptionCount'
|
name='redemptionCount'
|
||||||
type={'number'}
|
type={'number'}
|
||||||
value={topUpCount}
|
value={topUpCount}
|
||||||
|
suffix={'$'}
|
||||||
|
min={1}
|
||||||
|
max={100000}
|
||||||
onChange={async (value) => {
|
onChange={async (value) => {
|
||||||
|
if (value < 1) {
|
||||||
|
value = 1;
|
||||||
|
}
|
||||||
|
if (value > 100000) {
|
||||||
|
value = 100000;
|
||||||
|
}
|
||||||
setTopUpCount(value);
|
setTopUpCount(value);
|
||||||
await getAmount(value);
|
await getAmount(value);
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user