feat: 管理后台订单列表显示来源域名(srcHost)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
erio
2026-03-03 00:19:01 +08:00
co-authored by Claude Opus 4.6
parent d952942627
commit c9462f4f14
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ interface AdminOrder {
completedAt: string | null;
failedReason: string | null;
expiresAt: string;
srcHost: string | null;
}
interface AdminOrderDetail extends AdminOrder {
+1
View File
@@ -42,6 +42,7 @@ export async function GET(request: NextRequest) {
completedAt: true,
failedReason: true,
expiresAt: true,
srcHost: true,
},
}),
prisma.order.count({ where }),
+5
View File
@@ -15,6 +15,7 @@ interface Order {
completedAt: string | null;
failedReason: string | null;
expiresAt: string;
srcHost: string | null;
rechargeRetryable?: boolean;
}
@@ -49,6 +50,7 @@ export default function OrderTable({ orders, onRetry, onCancel, onViewDetail }:
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">金额</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">状态</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">支付方式</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">来源</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">创建时间</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500">操作</th>
</tr>
@@ -79,6 +81,9 @@ export default function OrderTable({ orders, onRetry, onCancel, onViewDetail }:
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
{order.paymentType === 'alipay' ? '支付宝' : '微信支付'}
</td>
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
{order.srcHost || '-'}
</td>
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
{new Date(order.createdAt).toLocaleString('zh-CN')}
</td>