From 35897b676cf23119e675a21b671e1448dea564b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sun, 15 Mar 2026 18:06:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(admin):=20=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=20Ant=20Design=20Pro=20=E9=A3=8E=E6=A0=BC?= =?UTF-8?q?=E9=AA=A8=E6=9E=B6=EF=BC=88PageHeader=20+=20KPI=20=E5=8D=A1?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/admin-components.css | 85 +++++++++++++++++++++ resources/views/admin/dashboard.blade.php | 92 +++++++++++++++-------- 2 files changed, 145 insertions(+), 32 deletions(-) diff --git a/public/css/admin-components.css b/public/css/admin-components.css index 44ca8c5..900067e 100644 --- a/public/css/admin-components.css +++ b/public/css/admin-components.css @@ -109,6 +109,91 @@ } /* 可复用:折叠面板(参考 Ant Design Pro 的筛选区交互:可折叠、摘要做成一条可点 Header) */ + +/* 可复用:PageHeader(参考 Ant Design Pro:标题区 + 描述 + 右侧操作区) */ +.page-header{ + width:100%; + padding:16px; + border:1px solid #e5e7eb; + border-radius:12px; + background:#ffffff; +} + +.page-header-main{ + display:flex; + align-items:flex-start; + justify-content:space-between; + gap:12px; +} + +.page-header-title{ + font-size:18px; + font-weight:700; + color:#0f172a; + line-height:1.2; +} + +.page-header-subtitle{ + margin-top:6px; + font-size:13px; + color:#64748b; + line-height:1.45; +} + +.page-header-actions{ + display:flex; + align-items:center; + gap:10px; + flex-wrap:wrap; +} + +.page-header-meta{ + margin-top:12px; + display:flex; + flex-wrap:wrap; + gap:12px; + color:#64748b; + font-size:12px; +} + +/* 可复用:KPI 卡片栅格(参考 Ant Design Pro Analysis:第一行 4 个等宽卡片) */ +.kpi-grid{ + display:grid; + grid-template-columns:repeat(4,minmax(0,1fr)); + gap:12px; +} + +@media (max-width: 1024px){ + .kpi-grid{ + grid-template-columns:repeat(2,minmax(0,1fr)); + } +} + +@media (max-width: 640px){ + .kpi-grid{ + grid-template-columns:1fr; + } +} + +.stat-card-title{ + font-size:12px; + color:#64748b; +} + +.stat-card-value{ + margin-top:10px; + font-size:22px; + font-weight:800; + color:#0f172a; + letter-spacing:.2px; +} + +.stat-card-footnote{ + margin-top:8px; + font-size:12px; + color:#94a3b8; +} + .collapsible > summary{ list-style:none; cursor:pointer; diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index d3a3e30..66dcdff 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -21,12 +21,69 @@ 'sync_failed' => \App\Support\BackUrl::withBack('/admin/platform-orders?sync_status=failed', $safeBackForLinks), ]; @endphp + + + +
+
+
站点
+
{{ $stats['merchants'] }}
+
全站点数量(总台视角)
+
+
+
管理员
+
{{ $stats['admins'] }}
+
平台/站点后台账号
+
+
+
用户
+
{{ $stats['users'] }}
+
买家端用户累计
+
+
+
订单
+
{{ $stats['orders'] }}
+
站点订单累计(非平台订单)
+
+
+
-

欢迎回来,{{ $adminName }}。当前入口已明确为 总台管理,用于平台运营方统一查看站点、渠道、全局配置和平台级业务数据。

-

当前平台上下文已通过封装统一解析,不再依赖控制器里零散读取 session。

-

仪表盘统计已接入缓存:{{ $cacheMeta['store'] }} / TTL {{ $cacheMeta['ttl'] }}。

+

收费工作台(快捷治理)

+
聚焦收费闭环的日常治理入口:订单 → 订阅 → 套餐。
+ +
+
快捷筛选:
+ +
+ +
说明:这里先落“入口与布局骨架”,后续会把 KPI/趋势/排行 接入真实聚合指标。
+

平台定位

@@ -39,33 +96,4 @@
- -
-

收费工作台

-
聚焦收费闭环的日常治理入口:订单 → 订阅 → 套餐。
- - - -
-
快捷筛选:
- -
-
- -
-
站点
{{ $stats['merchants'] }}
-
管理员
{{ $stats['admins'] }}
-
用户
{{ $stats['users'] }}
-
商品
{{ $stats['products'] }}
-
订单
{{ $stats['orders'] }}
-
@endsection