diff --git a/apps/frontend-react/src/pages/admin/platform/AdminPlatformShopsPage.tsx b/apps/frontend-react/src/pages/admin/platform/AdminPlatformShopsPage.tsx index 3578a4b3..2faaa117 100644 --- a/apps/frontend-react/src/pages/admin/platform/AdminPlatformShopsPage.tsx +++ b/apps/frontend-react/src/pages/admin/platform/AdminPlatformShopsPage.tsx @@ -25,7 +25,7 @@ import { Typography, } from 'antd' import type { TableColumnsType } from 'antd' -import { useEffect, useMemo, useState } from 'react' +import { useEffect, useState } from 'react' import { useSearchParams } from 'react-router' import PageHeader from '@/components/admin/PageHeader' @@ -58,7 +58,6 @@ import { validateAdminCloudtentaclesSession, } from '@/services/admin' import type { - AdminCloudtentaclesSessionsMap, AdminCloudtentaclesSourceConfigResponse, AdminCloudtentaclesSourceItem, AdminKuaishouEticketDetailResult, @@ -131,28 +130,6 @@ export default function AdminPlatformShopsPage() { useState(null) const [ninetyoneData, setNinetyoneData] = useState(null) - const overviewCards = useMemo( - () => - buildOverviewCards({ - notificationConfig, - scheduledJobs, - eticketConfig, - feifeiConfig, - cloudtentaclesConfig, - ninetyoneData, - }), - [ - cloudtentaclesConfig, - eticketConfig, - feifeiConfig, - ninetyoneData, - notificationConfig, - scheduledJobs, - ], - ) - const activeOverview = - overviewCards.find((card) => card.key === activeTab) || overviewCards[0] - useEffect(() => { void loadConfigs() }, []) @@ -225,22 +202,6 @@ export default function AdminPlatformShopsPage() { ) : ( <> - -
-
{activeOverview.tag}
- {activeOverview.label} -

{activeOverview.meta}

-
- - - {activeOverview.status} - -
- source.enabled !== false && cloudSessions[source.key]?.hasToken).length - - return [ - { - key: 'notifications', - label: '内部通知', - tag: '通知与监控', - value: barkRecipients.filter((item) => item.enabled !== false).length + wpushRecipients.filter((item) => item.enabled !== false).length, - unit: '启用接收人', - meta: `Bark ${barkRecipients.length} 人 · WPush ${wpushRecipients.length} 人 · 任务 ${scheduledJobs?.source.jobs.length || 0} 个`, - status: notificationConfig?.source.enabled ? '已启用' : '待配置', - statusColor: notificationConfig?.source.enabled ? 'green' : 'orange', - }, - { - key: 'ninetyone', - label: '91卡券', - tag: '来源订单', - value: ninetyoneData?.total || 0, - unit: '当前订单', - meta: `当前页 ${ninetyoneData?.items.length || 0} 条 · 用于补全订单和生成任务`, - status: (ninetyoneData?.total || 0) > 0 ? '可查看' : '正常', - statusColor: 'blue', - }, - { - key: 'kuaishouEticket', - label: '快手小店核销', - tag: '店铺凭据', - value: eticketShops.length, - unit: '已配置店铺', - meta: `Cookie 就绪 ${eticketShops.filter((shop) => shop.hasCookie || shop.cookie).length} 家`, - status: eticketShops.some((shop) => shop.hasCookie || shop.cookie) ? '已就绪' : '待配置', - statusColor: eticketShops.some((shop) => shop.hasCookie || shop.cookie) ? 'green' : 'orange', - }, - { - key: 'kuaishouFeifei', - label: 'kuaishou-feifei', - tag: '补充发货平台', - value: feifeiRules.filter((rule) => rule.enabled !== false).length, - unit: '启用规则', - meta: `API ${feifeiConfig?.effective.hasAppKey && feifeiConfig.effective.hasAppSecret ? '已配置' : '待补全'} · 总规则 ${feifeiRules.length} 条`, - status: feifeiConfig?.effective.enabled ? '已启用' : '待配置', - statusColor: feifeiConfig?.effective.enabled ? 'green' : 'orange', - }, - { - key: 'cloudtentacles', - label: 'cloudtentacles', - tag: '履约账号', - value: `${cloudReadyCount} / ${cloudSources.length}`, - unit: '可用账号', - meta: `会话文件:${cloudtentaclesConfig?.sessionFilePath || '-'}`, - status: cloudReadyCount > 0 ? '已验证' : '待验证', - statusColor: cloudReadyCount > 0 ? 'green' : 'orange', - }, - ] as const -} diff --git a/apps/frontend-react/src/styles/main.css b/apps/frontend-react/src/styles/main.css index 1ba222a8..26a9deef 100644 --- a/apps/frontend-react/src/styles/main.css +++ b/apps/frontend-react/src/styles/main.css @@ -712,34 +712,16 @@ select { min-width: 0; } +.platform-tabs > .ant-tabs-nav { + margin-bottom: 14px; +} + .platform-panel-stack { display: grid; gap: 16px; min-width: 0; } -.platform-active-summary .ant-card-body { - display: flex; - justify-content: space-between; - gap: 18px; - align-items: center; -} - -.platform-active-summary h3 { - margin: 4px 0 0 !important; -} - -.platform-active-summary p { - margin: 8px 0 0; - color: #6b7280; -} - -.summary-kicker { - color: #1677ff; - font-size: 12px; - font-weight: 800; -} - .metric-grid { display: grid; gap: 12px; @@ -974,10 +956,6 @@ select { grid-template-columns: 1fr; } - .platform-active-summary .ant-card-body { - display: grid; - } - .cloud-records-filter { grid-template-columns: 1fr; }