修复购买到支付流程的接口和页面&数据展示
This commit is contained in:
32
src/app/(root)/trade/page.tsx
Normal file
32
src/app/(root)/trade/page.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
"use client"
|
||||
import { Suspense } from "react"
|
||||
import { getPageTrade } from "@/actions/trade"
|
||||
import { DataTable, useDataTable } from "@/components/data-table"
|
||||
import type { User } from "@/models/user"
|
||||
|
||||
export default function UserPage() {
|
||||
const table = useDataTable<User>((page, size) => getPageTrade({ page, size }))
|
||||
console.log(table, "table")
|
||||
|
||||
return (
|
||||
<Suspense>
|
||||
<DataTable<User>
|
||||
{...table}
|
||||
columns={[
|
||||
{ header: "ID", accessorKey: "id" },
|
||||
{ header: "套餐号", accessorKey: "inner_no" },
|
||||
{ header: "支付方式", accessorKey: "method" },
|
||||
{ header: "支付金额", accessorKey: "payment" },
|
||||
{ header: "支付平台", accessorKey: "platform" },
|
||||
{ header: "已退款", accessorKey: "refunded" },
|
||||
{ header: "支付状态", accessorKey: "status" },
|
||||
{ header: "购买套餐", accessorKey: "subject" },
|
||||
{ header: "类型", accessorKey: "type" },
|
||||
{ header: "创建时间", accessorKey: "created_at" },
|
||||
{ header: "更新时间", accessorKey: "updated_at" },
|
||||
{ header: "过期时间", accessorKey: "canceled_at" },
|
||||
]}
|
||||
/>
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user