购买页面 & IP提取页面样式调整
This commit is contained in:
@@ -81,6 +81,35 @@ export default function Center({skuData}: {
|
||||
return (
|
||||
<Card className="flex-auto p-6 flex flex-col gap-10 relative">
|
||||
<BillingMethodField modeList={modeList} timeDailyLimit={100}/>
|
||||
{/* 套餐时效 */}
|
||||
{type === '1' && (
|
||||
<FormField name="expire" label="套餐有效时间" description="有效时间内可用于提取 IP">
|
||||
{({id, field}) => (
|
||||
<RadioGroup
|
||||
id={id}
|
||||
value={field.value}
|
||||
onValueChange={(value) => {
|
||||
field.onChange(value)
|
||||
|
||||
const nextLiveList = getAvailablePurchaseLives(skuData, {mode: type, expire: value})
|
||||
if (!nextLiveList.includes(live) && nextLiveList[0]) {
|
||||
setValue('live', nextLiveList[0])
|
||||
}
|
||||
}}
|
||||
className="flex gap-4 flex-wrap">
|
||||
{expireList.map(day => (
|
||||
<FormOption
|
||||
key={day}
|
||||
id={`${id}-${day}`}
|
||||
value={day}
|
||||
label={`${day} 天`}
|
||||
compare={field.value}
|
||||
/>
|
||||
))}
|
||||
</RadioGroup>
|
||||
)}
|
||||
</FormField>
|
||||
)}
|
||||
|
||||
{/* IP 时效 */}
|
||||
<FormField<Schema, 'live'>
|
||||
@@ -129,36 +158,6 @@ export default function Center({skuData}: {
|
||||
)}
|
||||
</FormField>
|
||||
|
||||
{/* 套餐时效 */}
|
||||
{type === '1' && (
|
||||
<FormField name="expire" label="套餐有效时间" description="有效时间内可用于提取 IP">
|
||||
{({id, field}) => (
|
||||
<RadioGroup
|
||||
id={id}
|
||||
value={field.value}
|
||||
onValueChange={(value) => {
|
||||
field.onChange(value)
|
||||
|
||||
const nextLiveList = getAvailablePurchaseLives(skuData, {mode: type, expire: value})
|
||||
if (!nextLiveList.includes(live) && nextLiveList[0]) {
|
||||
setValue('live', nextLiveList[0])
|
||||
}
|
||||
}}
|
||||
className="flex gap-4 flex-wrap">
|
||||
{expireList.map(day => (
|
||||
<FormOption
|
||||
key={day}
|
||||
id={`${id}-${day}`}
|
||||
value={day}
|
||||
label={`${day} 天`}
|
||||
compare={field.value}
|
||||
/>
|
||||
))}
|
||||
</RadioGroup>
|
||||
)}
|
||||
</FormField>
|
||||
)}
|
||||
|
||||
{/* 每日提取上限/购买数量 */}
|
||||
{type === '1' ? (
|
||||
<NumberStepperField
|
||||
|
||||
Reference in New Issue
Block a user