样式和代码结构调整
This commit is contained in:
@@ -90,16 +90,6 @@ export default function BillsPage(props: BillsPageProps) {
|
||||
</div>
|
||||
|
||||
<Form form={form} onSubmit={onSubmit} className="flex items-end gap-4 flex-wrap">
|
||||
{/* <FormField name="trade_id" label={<span className="text-sm">订单号</span>}>
|
||||
{({id, field}) => (
|
||||
<Input
|
||||
{...field}
|
||||
id={id}
|
||||
className="h-9 text-sm"
|
||||
placeholder="输入订单号"
|
||||
/>
|
||||
)}
|
||||
</FormField> */}
|
||||
<FormField name="type" label={<span className="text-sm">账单类型</span>}>
|
||||
{({id, field}) => (
|
||||
<Select value={field.value} onValueChange={field.onChange}>
|
||||
@@ -178,7 +168,7 @@ export default function BillsPage(props: BillsPageProps) {
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
{/* 类型展示 */}
|
||||
<div className="flex-shrink-0">
|
||||
<div className="shrink-0">
|
||||
{bill.type === 1 && (
|
||||
<div className="flex gap-2 items-center bg-orange-50 w-fit px-2 py-1 rounded-md">
|
||||
<CreditCard size={16}/>
|
||||
@@ -248,21 +238,13 @@ export default function BillsPage(props: BillsPageProps) {
|
||||
}
|
||||
const paymentMethod = trade ? paymentMethodMap[trade.method as keyof typeof paymentMethodMap] || '余额' : '余额'
|
||||
return (
|
||||
<div className="flex flex-col gap-1">
|
||||
<div className="flex gap-1">
|
||||
<span className="text-sm">
|
||||
{paymentMethod}
|
||||
</span>
|
||||
<span className={amount > 0 ? 'text-green-400' : 'text-orange-400'}>
|
||||
¥
|
||||
{amount.toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
{trade?.inner_no && (
|
||||
<div className="text-xs text-gray-500">
|
||||
订单号: {trade.inner_no}
|
||||
</div>
|
||||
)}
|
||||
<div className="flex gap-1">
|
||||
<span className="text-sm">
|
||||
{paymentMethod}
|
||||
</span>
|
||||
<span className={amount > 0 ? 'text-green-500' : 'text-orange-500'}>
|
||||
¥{amount.toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
|
||||
@@ -18,8 +18,16 @@ import personal from './_assets/personal.webp'
|
||||
import step1 from './_assets/step1.webp'
|
||||
import step2 from './_assets/step2.webp'
|
||||
import step3 from './_assets/step3.webp'
|
||||
import {Card, CardContent, CardDescription, CardHeader, CardTitle} from '@/components/ui/card'
|
||||
import {CheckCircle, CheckCircleIcon, WorkflowIcon} from 'lucide-react'
|
||||
import {Card, CardContent, CardHeader, CardTitle} from '@/components/ui/card'
|
||||
import {CheckCircleIcon, WorkflowIcon} from 'lucide-react'
|
||||
|
||||
const schema = zod.object({
|
||||
type: zod.enum([`personal`, `enterprise`], {errorMap: () => ({message: `请选择认证类型`})}).default('personal'),
|
||||
name: zod.string().min(2, {message: `姓名至少2个字符`}),
|
||||
iden_no: zod.string().length(18, {message: `身份证号码必须为18位`}),
|
||||
})
|
||||
|
||||
type Schema = zod.infer<typeof schema>
|
||||
|
||||
export type IdentifyPageProps = {}
|
||||
|
||||
@@ -28,13 +36,6 @@ export default function IdentifyPage(props: IdentifyPageProps) {
|
||||
// 填写信息
|
||||
// ======================
|
||||
|
||||
const schema = zod.object({
|
||||
type: zod.enum([`personal`, `enterprise`], {errorMap: () => ({message: `请选择认证类型`})}).default('personal'),
|
||||
name: zod.string().min(2, {message: `姓名至少2个字符`}),
|
||||
iden_no: zod.string().length(18, {message: `身份证号码必须为18位`}),
|
||||
})
|
||||
type Schema = zod.infer<typeof schema>
|
||||
|
||||
const form = useForm<Schema>({
|
||||
resolver: zodResolver(schema),
|
||||
defaultValues: {
|
||||
|
||||
Reference in New Issue
Block a user