feat: configure hot leagues in match center

This commit is contained in:
hajimi
2026-08-02 02:50:40 +08:00
parent 3e95fad23f
commit 163df0cf85
11 changed files with 109 additions and 67 deletions
@@ -52,7 +52,8 @@ class MatchController extends BaseApiController
if ($sportType > 0) {
$query->where('sport_type', $sportType);
}
$leagues = $query->field('id, label, sport_type, icon, sort')
$leagues = $query->field('id, label, sport_type, icon, sort, is_hot')
->order('is_hot desc')
->order('sort asc')
->select()
->toArray();
@@ -82,6 +83,7 @@ class MatchController extends BaseApiController
'id' => $item['id'],
'league_name' => $item['label'],
'icon' => $item['icon'],
'is_hot' => (int)$item['is_hot'],
'count' => $counts[$item['label']] ?? 0,
];
}