From 19d3e8f5de40a8ea4ed410ad5c205c243a2d1dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sun, 15 Mar 2026 00:30:43 +0000 Subject: [PATCH] Admin nav IA: add billing/site/growth/system groups with sub links --- public/css/admin-components.css | 26 ++++++++++++ resources/views/admin/layouts/app.blade.php | 36 ++++++++++------ .../Feature/AdminNavBillingGroupLinksTest.php | 42 +++++++++++++++++++ 3 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 tests/Feature/AdminNavBillingGroupLinksTest.php diff --git a/public/css/admin-components.css b/public/css/admin-components.css index 45a7912..cbe7456 100644 --- a/public/css/admin-components.css +++ b/public/css/admin-components.css @@ -169,3 +169,29 @@ .platform-orders-table .governance-hint{ line-height:1.4; } + +/* 总台管理:左侧导航二级分组(最小可用版) */ +.sidebar .nav-group{ + margin:10px 0; +} + +.sidebar .nav-group-title{ + cursor:pointer; + user-select:none; + color:#94a3b8; + font-size:12px; + text-transform:uppercase; + letter-spacing:.08em; + font-weight:700; + margin:0 0 6px; + list-style:none; +} + +.sidebar .nav-group summary::-webkit-details-marker{ + display:none; +} + +.sidebar .nav-item--sub{ + display:block; + padding-left:12px; +} diff --git a/resources/views/admin/layouts/app.blade.php b/resources/views/admin/layouts/app.blade.php index cb9b0c3..bb376c9 100644 --- a/resources/views/admin/layouts/app.blade.php +++ b/resources/views/admin/layouts/app.blade.php @@ -17,19 +17,31 @@
总览
总台仪表盘 -
平台运营
- 站点管理 - 套餐管理 - 订单监控 - 平台订单 - 订阅管理 - 开通线索 - 商品巡检 - 商品分类 + -
平台配置
- 系统配置 - 渠道配置 + + + + +
外部入口
返回前台 diff --git a/tests/Feature/AdminNavBillingGroupLinksTest.php b/tests/Feature/AdminNavBillingGroupLinksTest.php new file mode 100644 index 0000000..8ee2ed0 --- /dev/null +++ b/tests/Feature/AdminNavBillingGroupLinksTest.php @@ -0,0 +1,42 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_admin_layout_should_contain_billing_group_links(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + // 一级分组标题 + $res->assertSee('收费中心'); + + // 二级入口(收费闭环主链) + $res->assertSee('href="/admin/platform-orders"', false); + $res->assertSee('平台订单'); + + $res->assertSee('href="/admin/site-subscriptions"', false); + $res->assertSee('订阅管理'); + + $res->assertSee('href="/admin/plans"', false); + $res->assertSee('套餐管理'); + } +}