deploy: auto commit repo-root changes 2026-06-21 19:30:16
This commit is contained in:
@@ -17,7 +17,7 @@ use app\common\service\match\MatchLiveService;
|
||||
|
||||
class MatchController extends BaseApiController
|
||||
{
|
||||
public array $notNeedLogin = ['lists', 'detail', 'leagues', 'sportTypes', 'liveText', 'lineup', 'worldCupStandings', 'worldCupRankings', 'worldCupSchedule'];
|
||||
public array $notNeedLogin = ['lists', 'detail', 'leagues', 'sportTypes', 'liveText', 'lineup', 'worldCupStandings', 'worldCupRankings', 'worldCupSchedule', 'worldCupLiveCards'];
|
||||
|
||||
protected int $worldCupSeasonId = 26123;
|
||||
protected string $worldCupLeagueName = '世界杯';
|
||||
@@ -428,20 +428,10 @@ class MatchController extends BaseApiController
|
||||
->order('id asc')
|
||||
->select()
|
||||
->toArray();
|
||||
$liveMap = MatchLiveService::getLiveMapForApi(array_column($rows, 'id'));
|
||||
|
||||
$scheduleMap = [];
|
||||
foreach ($rows as $row) {
|
||||
$roundName = $row['round_name'] ?: '未分轮次';
|
||||
$liveList = $liveMap[(int) $row['id']] ?? [];
|
||||
$defaultLiveUrl = '';
|
||||
foreach ($liveList as $line) {
|
||||
$candidate = trim((string) ($line['default_play_url'] ?? ''));
|
||||
if ($candidate !== '') {
|
||||
$defaultLiveUrl = $candidate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isset($scheduleMap[$roundName])) {
|
||||
$scheduleMap[$roundName] = [
|
||||
'round_name' => $roundName,
|
||||
@@ -466,8 +456,6 @@ class MatchController extends BaseApiController
|
||||
'match_time' => (int) $row['match_time'],
|
||||
'current_minute' => $row['current_minute'],
|
||||
'half_score' => $row['half_score'],
|
||||
'live_list' => $liveList,
|
||||
'default_live_url' => $defaultLiveUrl,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -515,4 +503,12 @@ class MatchController extends BaseApiController
|
||||
'schedule_rounds' => $scheduleRounds,
|
||||
]);
|
||||
}
|
||||
|
||||
public function worldCupLiveCards()
|
||||
{
|
||||
return $this->data([
|
||||
'season_id' => $this->worldCupSeasonId,
|
||||
'list' => MatchLiveService::getWorldCupLiveCards(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user