diff --git a/resources/views/admin/merchants/index.blade.php b/resources/views/admin/merchants/index.blade.php index 8044942..4ea9442 100644 --- a/resources/views/admin/merchants/index.blade.php +++ b/resources/views/admin/merchants/index.blade.php @@ -29,59 +29,77 @@ }; @endphp -
-

这里是总台视角的站点管理入口,用于开通、查看和维护 SaaS 站点主体。

-

当前站点列表已接入缓存:{{ $cacheMeta['store'] }} / TTL {{ $cacheMeta['ttl'] }}。

- - @if($safeBackForLinks !== '') -
- ← 返回上一页(保留上下文) +
+ +
+
+

站点管理

+
总台视角的站点管理入口:开通、查看和维护 SaaS 站点主体。
+
+ 点击收起/展开
- @endif +
当前站点列表已接入缓存:{{ $cacheMeta['store'] }} / TTL {{ $cacheMeta['ttl'] }}。
-

新增站点

-
- @csrf -
- - - - - - + @if($safeBackForLinks !== '') + + @endif +
+ +
+

新增站点

+ + @csrf +
+ + + + + + +
+
+
+ +
+
+ +
+
+
+

站点列表

-
-
- -
+
+
+ + + + @forelse($merchants as $merchant) + + + + + + + + + + @empty + + @endforelse + +
ID站点名称Slug套餐状态联系人操作
{{ $merchant->id }}{{ $merchant->name }}{{ $merchant->slug }}{{ $merchant->plan }}{{ $merchant->status }}{{ $merchant->contact_name }} / {{ $merchant->contact_phone }} + +
当前阶段请使用该站点管理员账号登录
+
暂无站点
-
-

站点列表

- - - - @foreach($merchants as $merchant) - - - - - - - - - - @endforeach - -
ID站点名称Slug套餐状态联系人操作
{{ $merchant->id }}{{ $merchant->name }}{{ $merchant->slug }}{{ $merchant->plan }}{{ $merchant->status }}{{ $merchant->contact_name }} / {{ $merchant->contact_phone }} - -
当前阶段请使用该站点管理员账号登录
-
+ {{ $merchants->links('pagination.admin') }} +
- -
{{ $merchants->links() }}
@endsection diff --git a/tests/Feature/AdminMerchantsIndexShouldUseFiltersAndListCardStructureTest.php b/tests/Feature/AdminMerchantsIndexShouldUseFiltersAndListCardStructureTest.php new file mode 100644 index 0000000..26486c3 --- /dev/null +++ b/tests/Feature/AdminMerchantsIndexShouldUseFiltersAndListCardStructureTest.php @@ -0,0 +1,45 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_admin_merchants_index_should_use_filters_and_list_card_structure(): void + { + $this->loginAsPlatformAdmin(); + + $response = $this->get('/admin/merchants'); + $response->assertOk(); + + // 护栏:站点管理页应使用统一 Filters Card + List Card 结构,便于全站后台观感一致。 + $response->assertSee('filters-card', false); + $response->assertSee('filters-summary', false); + $response->assertSee('filters-body', false); + $response->assertSee('filters-grid', false); + + $response->assertSee('list-card', false); + $response->assertSee('list-card-header', false); + $response->assertSee('list-card-body', false); + $response->assertSee('list-card-table', false); + + // 分页统一:此页数据量可能不足导致 hasPages=false,因此用扫描型护栏断言。 + $blade = file_get_contents(resource_path('views/admin/merchants/index.blade.php')); + $this->assertIsString($blade); + $this->assertStringContainsString("links('pagination.admin')", $blade); + } +}