修复购买到支付流程的接口和页面&数据展示

This commit is contained in:
Eamon
2025-12-30 18:35:37 +08:00
parent 419bc8bc3d
commit 69da682b49
17 changed files with 343 additions and 30 deletions

View File

@@ -1,4 +1,5 @@
"use client"
import { Suspense } from "react"
import { getPageUsers } from "@/actions/user"
import { DataTable, useDataTable } from "@/components/data-table"
import { Button } from "@/components/ui/button"
@@ -6,32 +7,35 @@ import type { User } from "@/models/user"
export default function UserPage() {
const table = useDataTable<User>((page, size) => getPageUsers({ page, size }))
return (
<div>
<DataTable<User>
{...table}
columns={[
{ header: "账号", accessorKey: "username" },
{ header: "手机", accessorKey: "phone" },
{ header: "邮箱", accessorKey: "email" },
{ header: "姓名", accessorKey: "name" },
{ header: "余额", accessorKey: "balance" },
{ header: "认证状态", accessorKey: "id_type" },
{ header: "账号状态", accessorKey: "status" },
{ header: "联系方式", accessorKey: "contact_wechat" },
{ header: "管理员", accessorKey: "admin_id" },
{ header: "最后登录时间", accessorKey: "last_login" },
{ header: "创建时间", accessorKey: "created_at" },
{
header: "操作",
cell: () => (
<div>
<Button></Button>
</div>
),
},
]}
/>
<Suspense>
<DataTable<User>
{...table}
columns={[
{ header: "账号", accessorKey: "username" },
{ header: "手机", accessorKey: "phone" },
{ header: "邮箱", accessorKey: "email" },
{ header: "姓名", accessorKey: "name" },
{ header: "余额", accessorKey: "balance" },
{ header: "认证状态", accessorKey: "id_type" },
{ header: "账号状态", accessorKey: "status" },
{ header: "联系方式", accessorKey: "contact_wechat" },
{ header: "管理员", accessorKey: "admin_id" },
{ header: "最后登录时间", accessorKey: "last_login" },
{ header: "创建时间", accessorKey: "created_at" },
{
header: "操作",
cell: () => (
<div>
<Button></Button>
</div>
),
},
]}
/>
</Suspense>
</div>
)
}