@@ -3,5 +3,5 @@ import type { User } from "@/models/user"
|
|||||||
import { callByUser } from "./base"
|
import { callByUser } from "./base"
|
||||||
|
|
||||||
export async function getPageUsers(params: { page: number; size: number }) {
|
export async function getPageUsers(params: { page: number; size: number }) {
|
||||||
return callByUser<PageRecord<User>>("/api/user/list", params)
|
return callByUser<PageRecord<User>>("/api/user/page", params)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"use client"
|
"use client"
|
||||||
import { getPageUsers } from "@/actions/user"
|
import { getPageUsers } from "@/actions/user"
|
||||||
import { DataTable, useDataTable } from "@/components/data-table"
|
import { DataTable, useDataTable } from "@/components/data-table"
|
||||||
|
import { Button } from "@/components/ui/button"
|
||||||
import type { User } from "@/models/user"
|
import type { User } from "@/models/user"
|
||||||
|
|
||||||
export default function UserPage() {
|
export default function UserPage() {
|
||||||
@@ -10,13 +11,25 @@ export default function UserPage() {
|
|||||||
<DataTable<User>
|
<DataTable<User>
|
||||||
{...table}
|
{...table}
|
||||||
columns={[
|
columns={[
|
||||||
{ header: "ID", accessorKey: "id" },
|
{ header: "账号", accessorKey: "username" },
|
||||||
{ header: "姓名", accessorKey: "name" },
|
{ header: "手机", accessorKey: "phone" },
|
||||||
{ header: "邮箱", accessorKey: "email" },
|
{ header: "邮箱", accessorKey: "email" },
|
||||||
{ header: "角色", accessorKey: "role" },
|
{ header: "姓名", accessorKey: "name" },
|
||||||
{ header: "状态", accessorKey: "status" },
|
{ header: "余额", accessorKey: "balance" },
|
||||||
{ header: "创建时间", accessorKey: "createdAt" },
|
{ header: "认证状态", accessorKey: "id_type" },
|
||||||
{ header: "更新时间", accessorKey: "updatedAt" },
|
{ 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>
|
||||||
|
),
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user