From de98d9270e005ce866564364061654fe06472be9 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Fri, 7 Jun 2024 15:15:58 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=A2=9E=E5=80=BC?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=B8=8D=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 8196 -> 8196 bytes lib/mine/mineSet/mineSet/mineSet_page.dart | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index 2e1f43b30d6f6ee3763f1adbbe77a14a8a743420..24c4d37f13efd083465bd6eb9f85faa57afc680b 100755 GIT binary patch delta 42 ycmZp1XmQw}Dm?kMU>Uoav5tbNh2`Xh!qStQg;X{_5LRQ^%r5bbW%C~qc4h!Dwhiw9 delta 73 zcmZp1XmQw}D$KZj@*BZIHSy|dQ)3ey1tYUs9ffL3BLf`;6H}wwT22m8Wqs?Q`0SkA dy!_6|`-J5gyEfkw)@0etCh?tR^FI-GW&lK@7WDuC diff --git a/lib/mine/mineSet/mineSet/mineSet_page.dart b/lib/mine/mineSet/mineSet/mineSet_page.dart index 51cd8e96..a7cc2a16 100755 --- a/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -313,7 +313,7 @@ class _MineSetPageState extends State Navigator.pushNamed( context, Routers.aPPUnlockNeedMobileNetworkingLockPage); }), - if (!F.isLite && widget.showAbout) + if (!F.isLite) CommonItem( leftTitel: TranslationLoader.lanKeys!.valueAddedServices!.tr, isHaveLine: true, From 6d19e442593b83d7d6a80d6641f9ec0cc36d0f77 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Fri, 7 Jun 2024 15:17:21 +0800 Subject: [PATCH 2/8] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pubspec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 4bfba5e8..ab155890 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -66,8 +66,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # 1.0.56+2024060502:xhj 线上环境,对外发布,提交测试 # 1.0.57+2024060702:xhj 线上环境,对外发布,提交测试 # 1.0.58+2024060702:xhj 线上环境,对外发布,提交测试 +# 1.0.59+2024060703:xhj 线上环境,对外发布,提交测试 -version: 1.0.58+2024060702 +version: 1.0.59+2024060703 environment: sdk: '>=2.12.0 <3.0.0' From 1b4a6aaee3bbdc215efdc7bde24adfc583428e15 Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Fri, 7 Jun 2024 15:56:43 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=99=B9=E8=86=9C=E3=80=81=E6=B7=BB=E5=8A=A0=E6=89=8B=E6=8E=8C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart | 4 ++-- lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart b/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart index 42011cb3..5dfabc2d 100755 --- a/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart +++ b/lib/main/lockDetail/iris/addIrisType/addIrisType_page.dart @@ -259,8 +259,8 @@ class _AddIrisTypePageState extends State { rightTitle: '', isTipsImg: false, isHaveRightWidget: true, - rightWidget: SizedBox( - width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))))), + rightWidget: + SizedBox(width: 60.w, height: 50.h, child: _isAdmin())))), SizedBox(height: 30.h), SubmitBtn( btnName: TranslationLoader.lanKeys!.next!.tr, diff --git a/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart b/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart index 7941ee1d..2a66c706 100755 --- a/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart +++ b/lib/main/lockDetail/palm/addPalmType/addPalmType_page.dart @@ -259,8 +259,8 @@ class _AddPalmTypePageState extends State { rightTitle: '', isTipsImg: false, isHaveRightWidget: true, - rightWidget: SizedBox( - width: 60.w, height: 50.h, child: Obx(() => _isAdmin()))))), + rightWidget: + SizedBox(width: 60.w, height: 50.h, child: _isAdmin())))), SizedBox(height: 30.h), SubmitBtn( btnName: TranslationLoader.lanKeys!.next!.tr, From 8593088ab01a045c52542decef694f1767eae0ff Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Fri, 7 Jun 2024 15:58:24 +0800 Subject: [PATCH 4/8] =?UTF-8?q?1=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=B8=8E?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=BA=A6=E5=AE=9Acode=E5=80=BC=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E5=85=AC=E7=94=A8=E7=BB=84=E4=BB=B6=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=202=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=BC=80=E9=94=81=E9=A1=B5-?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8F=90=E9=86=92-=E5=8D=8A=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=94=81=E5=92=8CXHJ=20=E7=9A=84=E9=94=81=E5=BA=94?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=9C=89=E4=BA=BA=E5=87=BA=E7=8E=B0=E5=9C=A8?= =?UTF-8?q?=E9=97=A8=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lockDetail/lockDetail_page.dart | 1 + .../msgNotification/msgNotification_page.dart | 16 ++++++++------ .../msgNotification_state.dart | 4 ++++ lib/network/api_provider_base.dart | 4 ++++ lib/tools/showTipView.dart | 22 ++++++++++++++++++- 5 files changed, 39 insertions(+), 8 deletions(-) diff --git a/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 099b1b18..196d7ba6 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -1160,6 +1160,7 @@ class _LockDetailPageState extends State state.bottomBtnisEable.value, () { Get.toNamed(Routers.msgNotificationPage, arguments: { 'lockId': state.keyInfos.value.lockId, + 'isSupportCatEye': state.keyInfos.value.lockFeature!.isSupportCatEye, }); }), ); diff --git a/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_page.dart b/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_page.dart index 30959240..2d5887d8 100755 --- a/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_page.dart +++ b/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_page.dart @@ -143,13 +143,15 @@ class _MsgNotificationPageState extends State { SizedBox( height: 10.h, ), - Obx(() => CommonItem( - leftTitel: '有人出现在门口'.tr, - rightTitle: "", - isHaveLine: true, - isHaveRightWidget: true, - rightWidget: - SizedBox(width: 60.w, height: 50.h, child: _switch(4)))), + Obx(() => Visibility( + visible: state.isSupportCatEye.value, + child: CommonItem( + leftTitel: '有人出现在门口'.tr, + rightTitle: "", + isHaveLine: true, + isHaveRightWidget: true, + rightWidget: + SizedBox(width: 60.w, height: 50.h, child: _switch(4))))), SizedBox( height: 60.h, ), diff --git a/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart b/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart index 41c6ae1e..1ba082ec 100755 --- a/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart +++ b/lib/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_state.dart @@ -15,12 +15,16 @@ class MsgNotificationState { final String notifyEnable = '已启用'.tr; final String notifyDisable = '未启用'.tr; final String settingSuccess = '设置成功'.tr; + var isSupportCatEye = false.obs; MsgNotificationState() { Map map = Get.arguments; if (map['lockId'] != null) { getLockId.value = map['lockId']; } + if (map['isSupportCatEye'] != null) { + isSupportCatEye.value = map['isSupportCatEye'] == 1; + } nDaysNotOpenDoor.value = notifyEnable; isLowBattery.value = notifyEnable; diff --git a/lib/network/api_provider_base.dart b/lib/network/api_provider_base.dart index 1c29ae6e..c7d3977a 100755 --- a/lib/network/api_provider_base.dart +++ b/lib/network/api_provider_base.dart @@ -2,6 +2,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:get/get.dart'; import 'package:star_lock/app_settings/app_settings.dart'; +import 'package:star_lock/tools/showTipView.dart'; import '../appRouters.dart'; import '../flavors.dart'; import 'api.dart'; @@ -100,6 +101,9 @@ class BaseProvider extends GetConnect with Api { case 10001: EasyLoading.showToast('数据不存在', duration: 2000.milliseconds); break; + case 434: //与后台约定弹出确认框提示 + ShowTipView().showSureBtnTipsAlert(T['errorMsg']); + break; } } } diff --git a/lib/tools/showTipView.dart b/lib/tools/showTipView.dart index 011e1806..d4b14e59 100755 --- a/lib/tools/showTipView.dart +++ b/lib/tools/showTipView.dart @@ -13,7 +13,8 @@ typedef BlockIsHaveAllDataCallback = void Function(bool isAllData); class ShowTipView { // 只有一个确定按钮 - void showSureAlertDialog(String contentStr, {String? tipTitle, String? sureStr}) { + void showSureAlertDialog(String contentStr, + {String? tipTitle, String? sureStr}) { showCupertinoDialog( context: Get.context!, builder: (BuildContext context) { @@ -121,4 +122,23 @@ class ShowTipView { }, ); } + + // 只有一个确定按钮 + void showSureBtnTipsAlert(String tipsText) { + showCupertinoDialog( + context: Get.context!, + builder: (BuildContext context) { + return CupertinoAlertDialog( + content: Text(tipsText), + actions: [ + CupertinoDialogAction( + child: + Text('确定'.tr, style: TextStyle(color: AppColors.mainColor)), + onPressed: Get.back, + ), + ], + ); + }, + ); + } } From e07ac18bd99a4595d9c58e4248f35a64c3f7a1c1 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 11 Jun 2024 09:22:36 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 8196 -> 8196 bytes lib/app.dart | 6 +----- lib/main.dart | 9 +++++++- lib/mine/mineSet/mineSet/mineSet_page.dart | 20 +++++++++--------- .../starLockApplication.dart | 2 +- lib/tools/appFirstEnterHandle.dart | 2 ++ lib/tools/pay/wx_pay_tool.dart | 16 +++++++++----- lib/tools/storage.dart | 11 ++++++++++ 8 files changed, 44 insertions(+), 22 deletions(-) diff --git a/.DS_Store b/.DS_Store index 24c4d37f13efd083465bd6eb9f85faa57afc680b..2e1f43b30d6f6ee3763f1adbbe77a14a8a743420 100755 GIT binary patch delta 73 zcmZp1XmQw}D$KZj@*BZIHSy|dQ)3ey1tYUs9ffL3BLf`;6H}wwT22m8Wqs?Q`0SkA dy!_6|`-J5gyEfkw)@0etCh?tR^FI-GW&lK@7WDuC delta 42 ycmZp1XmQw}Dm?kMU>Uoav5tbNh2`Xh!qStQg;X{_5LRQ^%r5bbW%C~qc4h!Dwhiw9 diff --git a/lib/app.dart b/lib/app.dart index 0af65278..dfffaee3 100755 --- a/lib/app.dart +++ b/lib/app.dart @@ -176,8 +176,4 @@ Future getAgreePrivacyShowUpdate() async { } } -Future getAppInfo() async { - final GetAppInfo entity = await ApiRepository.to.getAppInfo(); - CustomerTool.init(entity.data?.wechatServiceUrl ?? ''); - WxPayTool.associationUrl = entity.data?.appSiteUrl ?? ''; -} + diff --git a/lib/main.dart b/lib/main.dart index 2399f005..612b0694 100755 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,11 +4,14 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get/get.dart'; import 'package:star_lock/flavors.dart'; +import 'package:star_lock/login/login/app_get_version.dart'; import 'package:star_lock/mine/about/debug/debug_tool.dart'; import 'package:star_lock/network/api_provider.dart'; import 'package:star_lock/network/api_repository.dart'; import 'package:star_lock/tools/bugly/bugly_tool.dart'; +import 'package:star_lock/tools/customer_tool.dart'; import 'package:star_lock/tools/device_info_service.dart'; +import 'package:star_lock/tools/pay/wx_pay_tool.dart'; import 'package:star_lock/tools/platform_info_services.dart'; import 'package:star_lock/tools/storage.dart'; import 'package:star_lock/tools/xs_jPhush.dart'; @@ -30,7 +33,11 @@ FutureOr main() async { final bool isLogin = await getLoginStatus(); if (isLogin) { await privacySDKInitialization(); - Future.delayed(const Duration(milliseconds: 500), getAppInfo); + Future.delayed(const Duration(milliseconds: 500), () async{ + final GetAppInfo entity = await ApiRepository.to.getAppInfo(); + CustomerTool.init(entity.data?.wechatServiceUrl ?? ''); + WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!); + }); } WidgetsBinding.instance.addPostFrameCallback((_) async { diff --git a/lib/mine/mineSet/mineSet/mineSet_page.dart b/lib/mine/mineSet/mineSet/mineSet_page.dart index a7cc2a16..6c15d874 100755 --- a/lib/mine/mineSet/mineSet/mineSet_page.dart +++ b/lib/mine/mineSet/mineSet/mineSet_page.dart @@ -313,16 +313,16 @@ class _MineSetPageState extends State Navigator.pushNamed( context, Routers.aPPUnlockNeedMobileNetworkingLockPage); }), - if (!F.isLite) - CommonItem( - leftTitel: TranslationLoader.lanKeys!.valueAddedServices!.tr, - isHaveLine: true, - isHaveDirection: true, - action: () { - Get.back(); - Get.toNamed(Routers.valueAddedServicesPage); - }, - ), + // if (!F.isLite) + CommonItem( + leftTitel: TranslationLoader.lanKeys!.valueAddedServices!.tr, + isHaveLine: true, + isHaveDirection: true, + action: () { + Get.back(); + Get.toNamed(Routers.valueAddedServicesPage); + }, + ), SizedBox( height: 10.h, ), diff --git a/lib/starLockApplication/starLockApplication.dart b/lib/starLockApplication/starLockApplication.dart index 21ec1b71..adc72d5d 100755 --- a/lib/starLockApplication/starLockApplication.dart +++ b/lib/starLockApplication/starLockApplication.dart @@ -40,7 +40,7 @@ class _StarLockApplicationState extends State { } else if (snapshot.hasData) { if (snapshot.data!) { // 如果用户已登录,返回主页面 - getAppInfo(); + // getAppInfo(); return F.sw( skyCall: () => StarLockMainPage(), xhjCall: () => const StarLockMainXHJPage()); diff --git a/lib/tools/appFirstEnterHandle.dart b/lib/tools/appFirstEnterHandle.dart index 9bb02c61..6976af6b 100755 --- a/lib/tools/appFirstEnterHandle.dart +++ b/lib/tools/appFirstEnterHandle.dart @@ -13,6 +13,7 @@ import 'package:star_lock/login/login/app_get_version.dart'; import 'package:star_lock/main.dart'; import 'package:star_lock/network/api_repository.dart'; import 'package:star_lock/tools/customer_tool.dart'; +import 'package:star_lock/tools/pay/wx_pay_tool.dart'; import 'package:star_lock/tools/storage.dart'; import '../versionUndate/versionUndateTool.dart'; @@ -67,6 +68,7 @@ class AppFirstEnterHandle { Future getAppInfo() async { final GetAppInfo entity = await ApiRepository.to.getAppInfo(); CustomerTool.init(entity.data?.wechatServiceUrl ?? ''); + WxPayTool.setAssociationUrl(entity.data!.appSiteUrl!); } //默认布局 diff --git a/lib/tools/pay/wx_pay_tool.dart b/lib/tools/pay/wx_pay_tool.dart index 20e025a5..0128de4c 100755 --- a/lib/tools/pay/wx_pay_tool.dart +++ b/lib/tools/pay/wx_pay_tool.dart @@ -1,4 +1,5 @@ import 'package:fluwx/fluwx.dart'; +import 'package:star_lock/tools/storage.dart'; /// /// 微信支付 @@ -7,24 +8,29 @@ import 'package:fluwx/fluwx.dart'; class WxPayTool { static Fluwx fluwx = Fluwx(); static bool isInit = false; - static String associationUrl = ''; + static void setAssociationUrl(String associationUrl) { + Storage.saveAssociationUrl(associationUrl); + } - static init(String appId, String universalLink) { + static Future init(String appId, String universalLink) async { fluwx.registerApi(appId: appId, universalLink: universalLink); } - static Future pay(Payment payment, WeChatResponseSubscriber listener) async { + static Future pay( + Payment payment, WeChatResponseSubscriber listener) async { if (!isInit) { isInit = true; - await init(payment.appId, associationUrl); + final String _associationUrl = await Storage.getAssociationUrl(); + await init(payment.appId, _associationUrl); //回调 - responseListener(WeChatResponse response) { + void responseListener(WeChatResponse response) { if (response is WeChatPaymentResponse) { //支付回调 listener.call(response); } } + //开启监听 fluwx.addSubscriber(responseListener); } diff --git a/lib/tools/storage.dart b/lib/tools/storage.dart index 09cefe43..842d18e5 100755 --- a/lib/tools/storage.dart +++ b/lib/tools/storage.dart @@ -28,6 +28,7 @@ const String saveUserLoginData = 'userLoginData'; const String saveLockMainListData = 'lockMainListData'; const String isOpenDeBug = 'isOpenDeBug'; //是否打开 debug const String automaticLockOffTime = 'automaticLockOffTime'; //自动关锁时间 +const String associationUrl = 'associationUrl'; //ios跳转微信的 url class Storage { factory Storage() => _instance; @@ -223,4 +224,14 @@ class Storage { final String data = await Storage.getString(automaticLockOffTime) ?? '0'; return data; } + + //设置自动关锁时间 + static Future saveAssociationUrl(String data) async { + await Storage.setString(associationUrl, data); + } + + static Future getAssociationUrl() async { + final String data = await Storage.getString(associationUrl) ?? '0'; + return data; + } } From 99b7a443ed7cfeae27c3a66c9120d74395b12a97 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 11 Jun 2024 09:38:16 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=94=B5=E9=87=8F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A2=AB=E5=BF=BD=E7=95=A5=E7=9A=84=20bus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main/lockDetail/lockDetail/lockDetail_logic.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart index cd588530..94e01b62 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart @@ -468,8 +468,14 @@ class LockDetailLogic extends BaseGetXController { Storage.setString(saveLockAlias, state.lockAlias.value); } else if (event.type == 4) { // 4 更新了电量 - state.electricQuantity.value = int.parse(event.setResult); - state.keyInfos.value.electricQuantity = int.parse(event.setResult); + // state.electricQuantity.value = int.parse(event.setResult); + // state.keyInfos.value.electricQuantity = int.parse(event.setResult); + final int electricQuantity = + int.tryParse(event.setResult['electricQuantity']) ?? 0; + state.electricQuantity.value =electricQuantity; + state.keyInfos.value.electricQuantity = electricQuantity; + state.keyInfos.value.electricQuantityDate = + event.setResult['uploadElectricQuantityDate']; } else if (event.type == 5) { // 5 远程开锁 state.keyInfos.value.lockSetting!.remoteUnlock = From 4aa056f8de97303a0036241fdf91b89a41c47586 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 11 Jun 2024 10:34:44 +0800 Subject: [PATCH 7/8] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E9=A6=96=E9=A1=B5=E6=B2=A1=E6=9C=89=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=88=97=E8=A1=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main/lockMian/lockMain/lockMain_logic.dart | 8 ++++++++ lib/main/lockMian/lockMain/lockMain_page.dart | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/main/lockMian/lockMain/lockMain_logic.dart b/lib/main/lockMian/lockMain/lockMain_logic.dart index f658cffa..94459e55 100755 --- a/lib/main/lockMian/lockMain/lockMain_logic.dart +++ b/lib/main/lockMian/lockMain/lockMain_logic.dart @@ -52,6 +52,14 @@ class LockMainLogic extends BaseGetXController { if (Get.isRegistered()) { //设置控制器数据并刷新 Get.find().setLockListInfoGroupEntity(entity); + } else { + //延迟加载 + Future.delayed(200.milliseconds, () { + if (Get.isRegistered()) { + //设置控制器数据并刷新 + Get.find().setLockListInfoGroupEntity(entity); + } + }); } } diff --git a/lib/main/lockMian/lockMain/lockMain_page.dart b/lib/main/lockMian/lockMain/lockMain_page.dart index 46aec398..22aa7e6e 100755 --- a/lib/main/lockMian/lockMain/lockMain_page.dart +++ b/lib/main/lockMian/lockMain/lockMain_page.dart @@ -54,9 +54,7 @@ class _StarLockMainPageState extends State if (clearScanDevices) { BlueManage().scanDevices.clear(); } - WidgetsBinding.instance.addPostFrameCallback((_) async { - setState(() {}); - }); + setState(() {}); } @override From 63a65cfdf4aac9216bfe7007b8ef1abf8ffd201b Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 11 Jun 2024 10:35:43 +0800 Subject: [PATCH 8/8] =?UTF-8?q?eat:=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pubspec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index ab155890..18af55df 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,8 +67,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # 1.0.57+2024060702:xhj 线上环境,对外发布,提交测试 # 1.0.58+2024060702:xhj 线上环境,对外发布,提交测试 # 1.0.59+2024060703:xhj 线上环境,对外发布,提交测试 +# 1.0.60+2024061101:xhj 线上环境,对外发布,提交测试 -version: 1.0.59+2024060703 +version: 1.0.60+2024061101 environment: sdk: '>=2.12.0 <3.0.0'