解决我的账单页面报错 & 提交记录添加套餐号筛选
This commit is contained in:
@@ -93,7 +93,6 @@ export default function ChannelsPage(props: ChannelsPageProps) {
|
||||
// ======================
|
||||
// render
|
||||
// ======================
|
||||
console.log(data.list, 'data.listdata.list')
|
||||
|
||||
return (
|
||||
<Page>
|
||||
@@ -215,11 +214,35 @@ export default function ChannelsPage(props: ChannelsPageProps) {
|
||||
},
|
||||
{
|
||||
header: '提取时间',
|
||||
cell: ({row}) => format(row.original.created_at, 'yyyy-MM-dd HH:mm:ss'),
|
||||
cell: ({row}) => {
|
||||
const timeValue = row.original.created_at
|
||||
if (!timeValue) return <div>-</div>
|
||||
|
||||
try {
|
||||
const date = new Date(timeValue)
|
||||
if (isNaN(date.getTime())) return <div>-</div>
|
||||
return <div>{format(date, 'yyyy-MM-dd HH:mm:ss')}</div>
|
||||
}
|
||||
catch {
|
||||
return <div>-</div>
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
header: '过期时间',
|
||||
cell: ({row}) => format(row.original.expired_at, 'yyyy-MM-dd HH:mm:ss'),
|
||||
cell: ({row}) => {
|
||||
const timeValue = row.original.expired_at
|
||||
if (!timeValue) return <div>-</div>
|
||||
|
||||
try {
|
||||
const date = new Date(timeValue)
|
||||
if (isNaN(date.getTime())) return <div>-</div>
|
||||
return <div>{format(date, 'yyyy-MM-dd HH:mm:ss')}</div>
|
||||
}
|
||||
catch {
|
||||
return <div>-</div>
|
||||
}
|
||||
},
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user