diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index 469491d..2cc3d83 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -492,34 +492,38 @@ $goSyncFailed = (int) ($ops['govern_sync_failed'] ?? 0); @endphp - - - - - - - - - - - - - -
近30天已收款 - - ¥{{ number_format($paidRevenue30d, 2) }} - -
活跃付费站点 - - {{ $activePaidMerchants }} - - (以“已生效且未到期订阅”估算) -
续费成功率(30天) - - {{ $renewalRate30d }}% - - ({{ $renewalSuccess30d }} / {{ $renewalCreated30d }}) -
+
+ 北极星指标(文字口径) (少用,默认收起) + + + + + + + + + + + + + + +
近30天已收款 + + ¥{{ number_format($paidRevenue30d, 2) }} + +
活跃付费站点 + + {{ $activePaidMerchants }} + + (以“已生效且未到期订阅”估算) +
续费成功率(30天) + + {{ $renewalRate30d }}% + + ({{ $renewalSuccess30d }} / {{ $renewalCreated30d }}) +
+
@php // 北极星指标图形化:给运营“规模感/健康感”,但不引入额外分类维度。 diff --git a/tests/Feature/AdminDashboardPlatformOpsOverviewNorthStarTextDetailsShouldBeCollapsibleTest.php b/tests/Feature/AdminDashboardPlatformOpsOverviewNorthStarTextDetailsShouldBeCollapsibleTest.php new file mode 100644 index 0000000..7399ad5 --- /dev/null +++ b/tests/Feature/AdminDashboardPlatformOpsOverviewNorthStarTextDetailsShouldBeCollapsibleTest.php @@ -0,0 +1,41 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_ops_overview_northstar_text_details_should_be_collapsible(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + // Guardrail:北极星指标“文字口径”应默认下沉到可折叠 details,避免与 mini bars 重复抢版面。 + $this->assertStringContainsString('data-role="platform-ops-northstar-details"', $html); + $this->assertStringContainsString('data-storage-key="admin.dashboard.platform_ops_northstar_details"', $html); + $this->assertStringContainsString('北极星指标(文字口径)', $html); + + // 文字口径仍需保留关键行(避免后续误删导致运营无法核对)。 + $this->assertStringContainsString('近30天已收款', $html); + $this->assertStringContainsString('活跃付费站点', $html); + $this->assertStringContainsString('续费成功率(30天)', $html); + } +}