解决解析 TOKEN 类型报错问题
This commit is contained in:
@@ -6,7 +6,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:recording_tool/app/router/app_navigator.dart';
|
||||
import 'package:recording_tool/core/cache/app_storage.dart';
|
||||
import 'package:recording_tool/core/cache/storage_keys.dart';
|
||||
import 'package:recording_tool/features/auth/pages/page_auth.dart';
|
||||
import 'package:recording_tool/features/auth/view_model_auth/view_model_auth.dart';
|
||||
import 'package:recording_tool/features/competition_teams/pages/page_competition_team_list.dart';
|
||||
import 'package:recording_tool/features/events/model/model_event_info.dart';
|
||||
@@ -43,14 +42,14 @@ class _ScanQrCodePageState extends ConsumerState<ScanQrCodePage> {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
final token = AppStorage.getString(StorageKeys.authToken);
|
||||
if (token?.isNotEmpty ?? false) {
|
||||
final success = await ref
|
||||
.read(authProvider.notifier)
|
||||
.parseTokenSetState(token!);
|
||||
if (!success) {
|
||||
AppToast.show('请重新鉴权');
|
||||
AppNavigator.pushAndRemoveUntil(const AuthPageWidget());
|
||||
return;
|
||||
}
|
||||
// final success = await ref
|
||||
// .read(authProvider.notifier)
|
||||
// .parseTokenSetState(token!);
|
||||
// if (!success) {
|
||||
// AppToast.show('请重新鉴权');
|
||||
// AppNavigator.pushAndRemoveUntil(const AuthPageWidget());
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user