修改提取ip时的传参方式

This commit is contained in:
Eamon-meng
2026-05-22 16:56:35 +08:00
parent 5c236c0b01
commit 3a2fbe29fb
4 changed files with 47 additions and 18 deletions

View File

@@ -23,7 +23,7 @@ import Link from 'next/link'
import {useProfileStore} from '@/components/stores/profile'
const schema = z.object({
resource: z.number({required_error: '请选择套餐'}),
resource: z.string({required_error: '请选择套餐'}),
prov: z.string().optional(),
city: z.string().optional(),
regionType: z.enum(['unlimited', 'specific']).default('unlimited'),
@@ -374,7 +374,7 @@ function SelectResource() {
{({field}) => (
<Select
value={field.value ? String(field.value) : undefined}
onValueChange={value => field.onChange(Number(value))}
onValueChange={value => field.onChange(value)}
>
<SelectTrigger className="min-h-10 h-auto w-full">
<SelectValue placeholder="选择套餐"/>
@@ -398,7 +398,7 @@ function SelectResource() {
{resources.map(resource => (
<SelectItem
key={resource.id}
value={String(resource.id)}
value={String(resource.resource_no)}
className="p-3">
<div className="flex flex-col gap-2 w-72">
{resource.type === 1 && resource.short.type === 1 && (