Handle zero opponent IDs and hide video button
This commit is contained in:
@@ -90,7 +90,7 @@ Widget buildEventRegistrationDestination({
|
|||||||
required EventRegistrationItem item,
|
required EventRegistrationItem item,
|
||||||
required String playerId,
|
required String playerId,
|
||||||
}) {
|
}) {
|
||||||
if (item.opponentId.isNotEmpty) {
|
if (item.opponentId.isNotEmpty && item.opponentId != '0') {
|
||||||
return EventTeamMatchPage(item: item, playerId: playerId);
|
return EventTeamMatchPage(item: item, playerId: playerId);
|
||||||
}
|
}
|
||||||
return WebviewPage(
|
return WebviewPage(
|
||||||
|
|||||||
@@ -81,29 +81,29 @@ class _AuthPageWidgetState extends ConsumerState<ScanQrCodePage> {
|
|||||||
),
|
),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
|
|
||||||
Consumer(
|
// Consumer(
|
||||||
builder: (context, ref, child) {
|
// builder: (context, ref, child) {
|
||||||
return SizedBox(
|
// return SizedBox(
|
||||||
width: 280.w,
|
// width: 280.w,
|
||||||
height: 80.h,
|
// height: 80.h,
|
||||||
child: AppButton(
|
// child: AppButton(
|
||||||
label: '查看录像',
|
// label: '查看录像',
|
||||||
onPressed: () async {
|
// onPressed: () async {
|
||||||
final data = ref.watch(
|
// final data = ref.watch(
|
||||||
authProvider.select((state) => state.jwtDecodedData),
|
// authProvider.select((state) => state.jwtDecodedData),
|
||||||
);
|
// );
|
||||||
if (data == null) return;
|
// if (data == null) return;
|
||||||
debugPrint('赛事名字: ${data.eventName}');
|
// debugPrint('赛事名字: ${data.eventName}');
|
||||||
final eventName = data.eventName ?? '';
|
// final eventName = data.eventName ?? '';
|
||||||
await ref
|
// await ref
|
||||||
.read(authProvider.notifier)
|
// .read(authProvider.notifier)
|
||||||
.getRecordList(eventName);
|
// .getRecordList(eventName);
|
||||||
},
|
// },
|
||||||
variant: AppButtonVariant.secondary,
|
// variant: AppButtonVariant.secondary,
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 16.h),
|
SizedBox(height: 16.h),
|
||||||
|
|
||||||
Consumer(
|
Consumer(
|
||||||
|
|||||||
Reference in New Issue
Block a user