From fc25858e72817940f9134f2ecd7e3095a9ae47d5 Mon Sep 17 00:00:00 2001
From: Eamon <17516219072@163.com>
Date: Mon, 18 May 2026 16:36:05 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AD=9B=E9=80=89=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E6=97=B6=E7=9A=84=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/(root)/balance/page.tsx | 16 ++++++++++------
src/app/(root)/billing/page.tsx | 14 +++++++++-----
src/app/(root)/channel/page.tsx | 30 +++++++++++++++++++-----------
3 files changed, 38 insertions(+), 22 deletions(-)
diff --git a/src/app/(root)/balance/page.tsx b/src/app/(root)/balance/page.tsx
index ac6ee03..31a3005 100644
--- a/src/app/(root)/balance/page.tsx
+++ b/src/app/(root)/balance/page.tsx
@@ -205,7 +205,7 @@ export default function BalancePage() {
{isPositive ? "+" : ""}
@@ -237,11 +237,15 @@ export default function BalancePage() {
{
header: "创建时间",
accessorKey: "created_at",
- cell: ({ row }) =>
- format(
- new Date(row.original.created_at),
- "yyyy-MM-dd HH:mm:ss",
- ),
+ cell: ({ row }) => {
+ const createdAt = row.original.created_at;
+ if (!createdAt) return -;
+
+ const date = new Date(createdAt);
+ if (isNaN(date.getTime())) return -;
+
+ return format(date, "yyyy-MM-dd HH:mm:ss");
+ },
},
]}
/>
diff --git a/src/app/(root)/billing/page.tsx b/src/app/(root)/billing/page.tsx
index 33b8536..899bd8c 100644
--- a/src/app/(root)/billing/page.tsx
+++ b/src/app/(root)/billing/page.tsx
@@ -352,11 +352,15 @@ export default function BillingPage() {
{
header: "创建时间",
accessorKey: "created_at",
- cell: ({ row }) =>
- format(
- new Date(row.original.created_at),
- "yyyy-MM-dd HH:mm:ss",
- ),
+ cell: ({ row }) => {
+ const createdAt = row.original.created_at;
+ if (!createdAt) return -;
+
+ const date = new Date(createdAt);
+ if (isNaN(date.getTime())) return -;
+
+ return format(date, "yyyy-MM-dd HH:mm:ss");
+ },
},
{
header: "套餐号",
diff --git a/src/app/(root)/channel/page.tsx b/src/app/(root)/channel/page.tsx
index 425daa3..f71318f 100644
--- a/src/app/(root)/channel/page.tsx
+++ b/src/app/(root)/channel/page.tsx
@@ -392,23 +392,31 @@ export default function ChannelPage() {
)
},
},
- {
+ {
header: "提取时间",
accessorKey: "created_at",
- cell: ({ row }) =>
- format(
- new Date(row.original.created_at),
- "yyyy-MM-dd HH:mm:ss",
- ),
+ cell: ({ row }) => {
+ const createdAt = row.original.created_at;
+ if (!createdAt) return -;
+
+ const date = new Date(createdAt);
+ if (isNaN(date.getTime())) return -;
+
+ return format(date, "yyyy-MM-dd HH:mm:ss");
+ },
},
{
header: "过期时间",
accessorKey: "expired_at",
- cell: ({ row }) =>
- format(
- new Date(row.original.expired_at),
- "yyyy-MM-dd HH:mm:ss",
- ),
+ cell: ({ row }) => {
+ const expiredAt = row.original.expired_at;
+ if (!expiredAt) return -;
+
+ const date = new Date(expiredAt);
+ if (isNaN(date.getTime())) return -;
+
+ return format(date, "yyyy-MM-dd HH:mm:ss");
+ },
},
]}
/>