接口调用时获取用户的x-data-ip和x-data-ua & 修改isp参数类型 & 使用教程初版 &后台用户名字段展示 &添加支付平台字段
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user