From 74a8d419386b8c92ca480c56bc4df8f72d18b884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Mon, 16 Mar 2026 01:19:20 +0800 Subject: [PATCH] chore(admin-ui): apply list-card component to plans index --- resources/views/admin/plans/index.blade.php | 12 ++++--- ...ansIndexShouldUseListCardStructureTest.php | 35 +++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 tests/Feature/AdminPlansIndexShouldUseListCardStructureTest.php diff --git a/resources/views/admin/plans/index.blade.php b/resources/views/admin/plans/index.blade.php index f9df4b9..2aea5b7 100644 --- a/resources/views/admin/plans/index.blade.php +++ b/resources/views/admin/plans/index.blade.php @@ -201,18 +201,19 @@ -
-
+
+
-

套餐列表

-

后续将从这里进入套餐详情、授权项与订阅联动。

+

套餐列表

+

后续将从这里进入套餐详情、授权项与订阅联动。

@php $createPlanUrl = \App\Support\BackUrl::withBack('/admin/plans/create', $selfWithoutBack); @endphp 新建套餐
- +
+
@@ -308,6 +309,7 @@ @endforelse
ID
+
{{ $plans->links() }}
diff --git a/tests/Feature/AdminPlansIndexShouldUseListCardStructureTest.php b/tests/Feature/AdminPlansIndexShouldUseListCardStructureTest.php new file mode 100644 index 0000000..13b4b03 --- /dev/null +++ b/tests/Feature/AdminPlansIndexShouldUseListCardStructureTest.php @@ -0,0 +1,35 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_admin_plans_index_should_use_list_card_structure(): void + { + $this->loginAsPlatformAdmin(); + + $response = $this->get('/admin/plans'); + $response->assertOk(); + + // 护栏:套餐列表区域应使用统一 List Card 结构,便于全站列表页风格统一。 + $response->assertSee('list-card', false); + $response->assertSee('list-card-header', false); + $response->assertSee('list-card-body', false); + $response->assertSee('list-card-table', false); + } +}