重新计算价格显示
This commit is contained in:
@@ -9,7 +9,7 @@ import {zodResolver} from '@hookform/resolvers/zod'
|
||||
// 定义表单验证架构
|
||||
const schema = z.object({
|
||||
type: z.enum(['1', '2']).default('2'),
|
||||
live: z.enum(['180', '300', '600', '1200', '1800']),
|
||||
live: z.enum(['3', '5', '10', '15', '30']),
|
||||
quota: z.number().min(10000, '购买数量不能少于10000个'),
|
||||
expire: z.enum(['7', '15', '30', '90', '180', '365']),
|
||||
daily_limit: z.number().min(2000, '每日限额不能少于2000个'),
|
||||
@@ -24,7 +24,7 @@ export default function ShortForm() {
|
||||
resolver: zodResolver(schema),
|
||||
defaultValues: {
|
||||
type: '2', // 默认为包量套餐
|
||||
live: '180', // 分钟
|
||||
live: '3', // 分钟
|
||||
quota: 10_000, // >= 10000
|
||||
expire: '30', // 天
|
||||
daily_limit: 2_000, // >= 2000
|
||||
|
||||
Reference in New Issue
Block a user