接口调用时获取用户的x-data-ip和x-data-ua & 修改isp参数类型 & 使用教程初版 &后台用户名字段展示 &添加支付平台字段

This commit is contained in:
Eamon-meng
2025-12-01 19:11:53 +08:00
parent b91de82bc2
commit b0a0b37b19
13 changed files with 300 additions and 43 deletions

View File

@@ -26,7 +26,7 @@ async function UserCenter() {
<Card className="h-full">
<CardContent className="flex-auto flex flex-col justify-between gap-4">
<div className="flex flex-col gap-1">
<p>{profile.phone}</p>
<p>{profile.username?.trim() || profile.email || profile.phone}</p>
<p className="text-sm text-weak">{`最后登录:${format(profile.last_login, 'yyyy-MM-dd HH:mm')}`}</p>
</div>
<div className={merge(

View File

@@ -65,6 +65,7 @@ export default function BillsPage(props: BillsPageProps) {
const res = await listBills({
page, size, type, create_after, create_before, trade_id,
})
console.log(res, 'res')
if (res.success) {
setData(res.data)
@@ -249,6 +250,29 @@ export default function BillsPage(props: BillsPageProps) {
)
},
},
{
accessorKey: 'platform',
header: '支付平台',
cell: ({row}) => {
const trade = row.original.trade
if (!trade) return <span>-</span>
return (
<div className="flex items-center gap-2">
{trade.platform === 1 ? (
<>
<span></span>
</>
) : trade.platform === 2 ? (
<>
<span></span>
</>
) : (
<span>-</span>
)}
</div>
)
},
},
{
accessorKey: 'created_at', header: '创建时间', cell: ({row}) => (
format(new Date(row.original.created_at), 'yyyy-MM-dd HH:mm')