refactor(admin-dashboard): unify mini chart styles and show names

This commit is contained in:
萝卜
2026-03-16 10:35:48 +08:00
parent 0b04a71be5
commit e744890cc9
3 changed files with 24 additions and 40 deletions

View File

@@ -148,8 +148,10 @@
// 用于前端渐进增强渲染迷你排行JS 读取 data-points
$rankPoints = [];
foreach ($rankRows as $r) {
$mid = (int) ($r['merchant_id'] ?? 0);
$rankPoints[] = [
'merchant_id' => (int) ($r['merchant_id'] ?? 0),
'merchant_id' => $mid,
'name' => (string) (($merchantIdToName[$mid] ?? '') ?: ('#' . $mid)),
'count' => (int) ($r['count'] ?? 0),
'paid_sum' => (float) ($r['paid_sum'] ?? 0),
];
@@ -346,8 +348,10 @@
// 用于前端渐进增强渲染占比条形图JS 读取 data-points
$sharePoints = [];
foreach ($shareRows as $r) {
$pid = (int) ($r['plan_id'] ?? 0);
$sharePoints[] = [
'plan_id' => (int) ($r['plan_id'] ?? 0),
'plan_id' => $pid,
'name' => (string) (($planIdToName[$pid] ?? '') ?: ('#' . $pid)),
'count' => (int) ($r['count'] ?? 0),
];
}