From 3639ddf7739597a00e0f9a2775db0f498ca1e331 Mon Sep 17 00:00:00 2001 From: CYH <13923927013@163.com> Date: Wed, 8 May 2024 09:21:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E5=8D=93=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- circle_app/android/app/build.gradle | 4 +- .../lib/app/msg/sys_notify_list/logic.dart | 17 ++- .../lib/app/msg/sys_notify_list/view.dart | 120 +++++++++--------- circle_app/lib/util/util.dart | 7 +- circle_app/pubspec.lock | 12 +- circle_app/pubspec.yaml | 4 +- 6 files changed, 87 insertions(+), 77 deletions(-) diff --git a/circle_app/android/app/build.gradle b/circle_app/android/app/build.gradle index 49777b6..b06bcf5 100644 --- a/circle_app/android/app/build.gradle +++ b/circle_app/android/app/build.gradle @@ -71,8 +71,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion - versionCode 61 - versionName "2.1.1" + versionCode 62 + versionName "2.1.2" manifestPlaceholders = [ vivo_APPID: "105669716", vivo_APPKEY:"84f750207787376b310ca5b0d5969122", diff --git a/circle_app/lib/app/msg/sys_notify_list/logic.dart b/circle_app/lib/app/msg/sys_notify_list/logic.dart index 1735bcb..ad90439 100644 --- a/circle_app/lib/app/msg/sys_notify_list/logic.dart +++ b/circle_app/lib/app/msg/sys_notify_list/logic.dart @@ -104,11 +104,6 @@ class Sys_notify_listLogic extends GetxController { } initList() async { - if (page == 1) { - lists.clear(); - update(); - } - // /** // * 系统 @@ -159,9 +154,6 @@ class Sys_notify_listLogic extends GetxController { isMore = false; } } - - isLoad = false; - update(); if (next == 0) { if(lists.isNotEmpty) { @@ -169,15 +161,22 @@ class Sys_notify_listLogic extends GetxController { } refreshController.refreshCompleted(); } else { - next = lists.last.id!; refreshController.loadComplete(); + if (isMore) { + next = lists.last.id!; + } + } + isLoad = false; + update(); + } void onRefresh() async { page = 0; next = 0; lists.clear(); + update(); initList(); } diff --git a/circle_app/lib/app/msg/sys_notify_list/view.dart b/circle_app/lib/app/msg/sys_notify_list/view.dart index a64bf6a..d14c376 100644 --- a/circle_app/lib/app/msg/sys_notify_list/view.dart +++ b/circle_app/lib/app/msg/sys_notify_list/view.dart @@ -68,72 +68,70 @@ class Sys_notify_listPage extends StatelessWidget { child: Column( children: [ Expanded( - child: SafeArea( - child: logic.isLoad - ? loaddingWidget(true) - : logic.lists.isEmpty && - logic.msgLists.isEmpty && - logic.serieslists.isEmpty && - logic.normallists.isNotEmpty - ? noResultWidget() - : logic.msgLists.isNotEmpty || - logic.serieslists.isNotEmpty || - logic.normallists.isNotEmpty - ? SmartRefresher( - controller: logic.refreshController, - enablePullUp: true, - enablePullDown: false, - onLoading: () { + child: logic.isLoad + ? loaddingWidget(true) + : logic.lists.isEmpty && + logic.msgLists.isEmpty && + logic.serieslists.isEmpty && + logic.normallists.isNotEmpty + ? noResultWidget() + : logic.msgLists.isNotEmpty || + logic.serieslists.isNotEmpty || + logic.normallists.isNotEmpty + ? SmartRefresher( + controller: logic.refreshController, + enablePullUp: true, + enablePullDown: false, + onLoading: () { + if (logic.con!.showName == '活动驿站') { + logic.loadMore(); + } else { + logic.onLoadingMsgList(); + } + }, + child: ListView.builder( + padding: EdgeInsets.only(left:10.sp,right: 10.sp), + itemCount: logic.con!.showName == '活动驿站' + ? logic.serieslists.length + + (logic.normallists.isNotEmpty + ? 1 + : 0) + : logic.msgLists.length, + itemBuilder: (context, index) { if (logic.con!.showName == '活动驿站') { - logic.loadMore(); - } else { - logic.onLoadingMsgList(); - } - }, - child: ListView.builder( - padding: EdgeInsets.all(10.sp), - itemCount: logic.con!.showName == '活动驿站' - ? logic.serieslists.length + - (logic.normallists.isNotEmpty - ? 1 - : 0) - : logic.msgLists.length, - itemBuilder: (context, index) { - if (logic.con!.showName == '活动驿站') { - if (index == 0 && - logic.serieslists.isNotEmpty) { - return activeHorItem(); - } else { - if (logic.serieslists.isNotEmpty) { - return PlatformWdiget( - list: logic - .normallists[index - 1]); - } + if (index == 0 && + logic.serieslists.isNotEmpty) { + return activeHorItem(); + } else { + if (logic.serieslists.isNotEmpty) { + return PlatformWdiget( + list: logic + .normallists[index - 1]); } - return PlatformWdiget( - list: - logic.normallists[index - 1]); } - return msgItem(logic.msgLists![index]); - }, - ), - ) - : SmartRefresher( - controller: logic.refreshController, - enablePullUp: true, - onRefresh: logic.onRefresh, - onLoading: () { - logic.onLoading(); + return PlatformWdiget( + list: + logic.normallists[index - 1]); + } + return msgItem(logic.msgLists![index]); }, - child: ListView.builder( - padding: EdgeInsets.all(10.sp), - itemCount: logic.lists.length, - itemBuilder: (context, index) { - return ListItem(logic.lists[index]); - }, - ), ), - ), + ) + : SmartRefresher( + controller: logic.refreshController, + enablePullUp: true, + onRefresh: logic.onRefresh, + onLoading: () { + logic.onLoading(); + }, + child: ListView.builder( + padding: EdgeInsets.only(left:10.sp,right: 10.sp), + itemCount: logic.lists.length, + itemBuilder: (context, index) { + return ListItem(logic.lists[index]); + }, + ), + ), ), if (logic.con!.showName != '官方通知' && logic.con!.showName != '系统通知' && diff --git a/circle_app/lib/util/util.dart b/circle_app/lib/util/util.dart index fd27251..e3fd526 100644 --- a/circle_app/lib/util/util.dart +++ b/circle_app/lib/util/util.dart @@ -1105,7 +1105,12 @@ pushPage(String action,String param,{String name = ''}) { } else if (action == 'offsite_share') { Get.toNamed(AppRoutes.ExternalsharePage); } else if (action == 'good_rate') { - launch('https://apps.apple.com/cn/app/%E5%BE%AE%E4%B9%90%E5%9B%AD-%E4%BA%9A%E6%96%87%E5%8C%96%E5%A4%9A%E5%85%83%E4%BA%A4%E5%8F%8B%E5%9F%BA%E5%9C%B0/id6459449499', forceSafariVC: false); + if (Platform.isAndroid) { + Get.toNamed(AppRoutes.Good_Reviews); + } else { + launch('https://apps.apple.com/cn/app/%E5%BE%AE%E4%B9%90%E5%9B%AD-%E4%BA%9A%E6%96%87%E5%8C%96%E5%A4%9A%E5%85%83%E4%BA%A4%E5%8F%8B%E5%9F%BA%E5%9C%B0/id6459449499', forceSafariVC: false); + } + } else if (action == 'buy_vip') { showOepnVipDialog(); } else if (action == 'recharge') { diff --git a/circle_app/pubspec.lock b/circle_app/pubspec.lock index ac73e4b..d549189 100644 --- a/circle_app/pubspec.lock +++ b/circle_app/pubspec.lock @@ -45,10 +45,10 @@ packages: dependency: "direct main" description: name: app_settings - sha256: "2ec421f375d747916c4c0193933567074ea60c4f01c4a68642f07fef1002524e" + sha256: e6a34735d4ddb24ca9c5fd7e965ec65c8b611cbd3a329152c294f9e9f4bacb33 url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "4.3.1" archive: dependency: transitive description: @@ -630,6 +630,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.3" + flutter_install_app: + dependency: "direct main" + description: + name: flutter_install_app + sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53" + url: "https://pub.dev" + source: hosted + version: "1.3.0" flutter_intl: dependency: "direct main" description: diff --git a/circle_app/pubspec.yaml b/circle_app/pubspec.yaml index ba071ee..3da8b9a 100644 --- a/circle_app/pubspec.yaml +++ b/circle_app/pubspec.yaml @@ -90,7 +90,7 @@ dependencies: fluwx: ^3.8.1+1 event_bus: ^2.0.0 #安装apk -# flutter_install_app: 1.3.0 + flutter_install_app: 1.3.0 #闪屏页 flutter_native_splash: 2.2.16 #腾讯离线推送 @@ -112,7 +112,7 @@ dependencies: #边框渐变 gradient_borders: ^1.0.0 #系统设置 安卓4.3.1 苹果4.0.4 - app_settings: 4.0.4 + app_settings: 4.3.1 #百度定位插件 flutter_bmflocation: ^3.6.0