diff --git a/src/actions/user.ts b/src/actions/user.ts index 1f25bdc..a27d0b9 100644 --- a/src/actions/user.ts +++ b/src/actions/user.ts @@ -3,5 +3,5 @@ import type { User } from "@/models/user" import { callByUser } from "./base" export async function getPageUsers(params: { page: number; size: number }) { - return callByUser>("/api/user/list", params) + return callByUser>("/api/user/page", params) } diff --git a/src/app/(root)/user/page.tsx b/src/app/(root)/user/page.tsx index 9fefc0f..21b9967 100644 --- a/src/app/(root)/user/page.tsx +++ b/src/app/(root)/user/page.tsx @@ -1,6 +1,7 @@ "use client" import { getPageUsers } from "@/actions/user" import { DataTable, useDataTable } from "@/components/data-table" +import { Button } from "@/components/ui/button" import type { User } from "@/models/user" export default function UserPage() { @@ -10,13 +11,25 @@ export default function UserPage() { {...table} columns={[ - { header: "ID", accessorKey: "id" }, - { header: "姓名", accessorKey: "name" }, + { header: "账号", accessorKey: "username" }, + { header: "手机", accessorKey: "phone" }, { header: "邮箱", accessorKey: "email" }, - { header: "角色", accessorKey: "role" }, - { header: "状态", accessorKey: "status" }, - { header: "创建时间", accessorKey: "createdAt" }, - { header: "更新时间", accessorKey: "updatedAt" }, + { 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: () => ( +
+ +
+ ), + }, ]} />