@@ -308,6 +308,22 @@ export default function TradePage() {
)
},
+ },{
+ header:"订单金额",
+ accessorKey:"amount",
+ cell: ({ row }) => {
+ const amount =
+ typeof row.original.amount === "string"
+ ? parseFloat(row.original.amount)
+ : row.original.amount || 0
+ return (
+
+
+ ¥{amount.toFixed(2)}
+
+
+ )
+ },
},
{
header: "支付状态",
@@ -418,7 +434,6 @@ function CheckOrder(props: { trade: Trade }) {
method: Number(props.trade.method),
})
- console.log(res, "res")
if (res.success) {
setData(res.data)
} else {
diff --git a/src/models/trade.ts b/src/models/trade.ts
index 90364a8..0b1b468 100644
--- a/src/models/trade.ts
+++ b/src/models/trade.ts
@@ -16,4 +16,5 @@ export type Trade = {
updated_at: Date
user?: User
remark: string
+ amount:string
}