feat(admin-dashboard): add mini trend chart for 7d paid sum
This commit is contained in:
@@ -84,8 +84,19 @@
|
||||
|
||||
@php
|
||||
$trendRows = (array) ($platformOrderTrend7d ?? []);
|
||||
// 用于前端渐进增强渲染迷你图表(JS 读取 data-points)
|
||||
$trendPoints = [];
|
||||
foreach ($trendRows as $r) {
|
||||
$trendPoints[] = [
|
||||
'date' => (string) ($r['date'] ?? ''),
|
||||
'count' => (int) ($r['count'] ?? 0),
|
||||
'paid_sum' => (float) ($r['paid_sum'] ?? 0),
|
||||
];
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="adm-mini-chart" data-role="platform-order-trend-7d-chart" data-points='@json($trendPoints)'></div>
|
||||
|
||||
<table class="mt-10" data-role="platform-order-trend-7d">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user