From 48a1b64505987d35b6b2db17f37c05fdfafef821 Mon Sep 17 00:00:00 2001 From: wuqifeng <540416539@qq.com> Date: Mon, 29 Apr 2024 20:19:28 +0800 Subject: [PATCH] feat:删除无效日志 --- lib/common/core/user_util.dart | 3 +-- lib/models/app_config_entity.dart | 8 ++++---- lib/pages/moduleSelect/bloc.dart | 5 ++--- lib/pages/shopping/bloc.dart | 3 +-- 4 files changed, 8 insertions(+), 11 deletions(-) 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}"); -- libgit2 0.22.2