diff --git a/lib/common/core/user_util.dart b/lib/common/core/user_util.dart index 5c3515a..c990c45 100644 --- a/lib/common/core/user_util.dart +++ b/lib/common/core/user_util.dart @@ -60,12 +60,11 @@ class UserUtil { if (currentPageName != AppRouteName.splash) { Navigator.of(AppRouter.context).pushNamedAndRemoveUntil(AppRouteName.login, (route) => false); }*/ - Navigator.of(AppRouter.context).pushNamedAndRemoveUntil(AppRouteName.login, (route) => false, arguments: {'showPasswordPage': showPasswordLoginPage}); + pushNamedAndRemoveUntil(AppRouteName.login, (route) => false, arguments: {'showPasswordPage': showPasswordLoginPage}); } // 是否有游戏权限 static bool hasGamePermission() { - debugPrint('hasGamePermission: ${_userEntity}'); return _userEntity?.valid ?? false; } diff --git a/lib/models/app_config_entity.dart b/lib/models/app_config_entity.dart index 4f008e3..8df900c 100644 --- a/lib/models/app_config_entity.dart +++ b/lib/models/app_config_entity.dart @@ -17,14 +17,14 @@ class AppConfigEntity { String? androidUpdatePackageUrl; // 安卓当前版本号 - late int androidVersion; + int? androidVersion; bool? iosForceUpdate; bool? iosRecommendUpdate; // ios版本 - late int iosVersion; + int? iosVersion; // 更新说明 String? updatePackageDescription; @@ -38,9 +38,9 @@ class AppConfigEntity { AppConfigEntity(); - factory AppConfigEntity.fromJson(Map json) => $AppConfigEntityEntityFromJson(json); + factory AppConfigEntity.fromJson(Map json) => $AppConfigEntityFromJson(json); - Map toJson() => $AppConfigEntityEntityToJson(this); + Map toJson() => $AppConfigEntityToJson(this); @override String toString() { diff --git a/lib/pages/moduleSelect/bloc.dart b/lib/pages/moduleSelect/bloc.dart index 8d967d9..518e914 100644 --- a/lib/pages/moduleSelect/bloc.dart +++ b/lib/pages/moduleSelect/bloc.dart @@ -23,15 +23,14 @@ class ModuleSelectBloc extends Bloc { if (appConfigEntity == null) { return; } - debugPrint('WQF _checkUpdate'); if (defaultTargetPlatform == TargetPlatform.iOS) { - if (localVersion < appConfigEntity.iosVersion && + if (localVersion < (appConfigEntity.iosVersion ?? 0) && appConfigEntity.iosRecommendUpdate == true) { emit(UpdateDialogState( appConfigEntity.iosForceUpdate ?? false, appConfigEntity)); } } else { - if (localVersion < appConfigEntity.androidVersion && + if (localVersion < (appConfigEntity.androidVersion ?? 0) && appConfigEntity.androidRecommendUpdate == true) { emit(UpdateDialogState( appConfigEntity.androidForceUpdate ?? false, appConfigEntity, diff --git a/lib/pages/shopping/bloc.dart b/lib/pages/shopping/bloc.dart index abd04e1..b3abdbd 100644 --- a/lib/pages/shopping/bloc.dart +++ b/lib/pages/shopping/bloc.dart @@ -80,10 +80,9 @@ class ShoppingBloc extends Bloc { await fluwx?.registerApi(appId: "wx365e5a79956a450a", universalLink: "https://app-api.wowenglish.com.cn/app/"); wxPayResponseListener = (WeChatResponse response) { - debugPrint("WqfPay wxPayResponseListener $response"); + debugPrint("wxPayResponseListener $response"); if (response is WeChatPaymentResponse) { if (response.errCode == 0) { - debugPrint("WqfPay wxPayResponseListener response=${response.errCode}"); showToast("支付成功"); // Log.d("emitter isDone=${emitter.isDone}");