From d137a46e9ba994696f1b1f91ad0ef43c3f893ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E9=94=8B?= <2535831261@qq.com> Date: Thu, 6 Aug 2026 18:18:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AF=E5=9B=A2=E9=98=9F?= =?UTF-8?q?=E8=B5=9B=E4=B8=94=20=E8=B5=9B=E9=A1=B9=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E6=99=8B=E7=BA=A7=E4=B8=8D=E8=BF=9B=E5=85=A5=E8=AE=B0=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/events/model/model_event_info.dart | 3 +++ lib/features/events/pages/page_event_info.dart | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lib/features/events/model/model_event_info.dart b/lib/features/events/model/model_event_info.dart index b4d03ae..d8e1a74 100644 --- a/lib/features/events/model/model_event_info.dart +++ b/lib/features/events/model/model_event_info.dart @@ -127,6 +127,7 @@ class EventRegistrationItem { required this.itemName, required this.groupName, required this.matchPlace, + required this.allowByeMatch, this.matchStartTime = '', this.matchEndTime = '', @@ -154,6 +155,7 @@ class EventRegistrationItem { final String opponentName; final List teamMembers; final String playerNo; + final int allowByeMatch; /// 来自报名列表父级,不在 item JSON 内 final String userId; @@ -202,6 +204,7 @@ class EventRegistrationItem { userId: userId, playerName: playerName, playerNo: _readString(map, const ['playerNo']), + allowByeMatch: _readInt(map, const ['allowByeMatch']), ); } diff --git a/lib/features/events/pages/page_event_info.dart b/lib/features/events/pages/page_event_info.dart index 0e5e182..c919faf 100644 --- a/lib/features/events/pages/page_event_info.dart +++ b/lib/features/events/pages/page_event_info.dart @@ -32,6 +32,13 @@ class _EventInfoPageState extends ConsumerState { if (!mounted) return; CompetitionTeamDetail? detail; if (item.opponentId.isNotEmpty && item.opponentId != '0') { + // allowByeMatch = 0 (直接晋级) + // allowByeMatch = 1 (和败方对战) + // allowByeMatch = -1 (个人赛不适用此配置,所以 = -1) + if (item.allowByeMatch == 0) { + AppToast.show('本场比赛允许轮空'); + return; + } detail = await ref .read(competitionTeamsServerProvider) .fetchTeamDetail( @@ -51,6 +58,14 @@ class _EventInfoPageState extends ConsumerState { ); return; } + await ref + .read(competitionTeamsServerProvider) + .fetchTeamDetail( + itemId: item.itemId, + eventId: item.eventId, + scheduleId: item.scheduleId, + opponentId: item.opponentId, + ); if (!mounted) return;