修复购买套餐Input框和计算数量传参的问题 &

This commit is contained in:
Eamon-meng
2025-12-18 12:28:29 +08:00
parent 4288b0de10
commit 375a6f30c0
6 changed files with 41 additions and 15 deletions

View File

@@ -27,7 +27,7 @@ export default function Right() {
const quota = useWatch({control, name: 'quota'})
const expire = useWatch({control, name: 'expire'})
const dailyLimit = useWatch({control, name: 'daily_limit'})
const [price, setPrice] = useState<string>('0.00')
const [price, setPrice] = useState<string>('')
useEffect(() => {
const price = async () => {
@@ -36,7 +36,7 @@ export default function Right() {
long: {
live: Number(live),
mode: Number(mode),
quota: Number(mode) === 1 ? dailyLimit : quota,
quota: Number(mode) === 1 ? Number(dailyLimit) : Number(quota),
expire: Number(mode) === 1 ? Number(expire) : undefined,
},
}
@@ -45,9 +45,6 @@ export default function Right() {
if (priceValue.success && priceValue.data?.price) {
setPrice(priceValue.data.price)
}
else {
setPrice('0.00')
}
}
catch (error) {
console.error('获取价格失败:', error)