完善首页代理产品间距和布局 & 修复购买套餐请求参数获取

This commit is contained in:
Eamon-meng
2025-12-17 15:07:14 +08:00
parent 32a1b2a8b7
commit 03d00af418
8 changed files with 259 additions and 15 deletions

View File

@@ -26,8 +26,6 @@ export default function Right() {
const live = useWatch({control, name: 'live'})
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')
useEffect(() => {
@@ -58,7 +56,7 @@ export default function Right() {
}
}
price()
}, [dailyLimit, expire, live, quota, mode])
}, [expire, live, quota, mode])
return (
<Card className={merge(
`flex-none basis-90 p-6 flex flex-col gap-6 relative`,
@@ -99,7 +97,7 @@ export default function Right() {
<li className="flex justify-between items-center">
<span className="text-sm text-gray-500"></span>
<span className="text-sm">
{dailyLimit}
{quota}
</span>
</li>
@@ -115,7 +113,7 @@ export default function Right() {
</span>
</p>
<Suspense>
<BalanceOrLogin {...{method, price, mode, live, quota, expire, dailyLimit}}/>
<BalanceOrLogin {...{method, price, mode, live, quota, expire}}/>
</Suspense>
</Card>
)
@@ -128,7 +126,6 @@ function BalanceOrLogin(props: {
live: string
quota: number
expire: string
dailyLimit: number
}) {
const profile = use(useProfileStore(store => store.profile))
return profile ? (
@@ -189,7 +186,7 @@ function BalanceOrLogin(props: {
mode: Number(props.mode),
live: Number(props.live),
expire: Number(props.expire),
quota: props.mode === '1' ? props.dailyLimit : props.quota,
quota: props.quota,
},
}}/>
</>