From 17231d7ad7d9cf182c9c1a62fedef1312547c763 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 18 Jun 2024 14:12:08 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E9=94=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=20ui=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lockDetail/lockDetail_page.dart | 22 +++++++++---------- .../lockMian/lockMain/lockMain_logic.dart | 7 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 199ff1f2..15021fd6 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -102,7 +102,7 @@ class _LockDetailPageState extends State child: Column( children: [ SizedBox( - height: 15.h, + height: 10.h, ), Padding( padding: EdgeInsets.symmetric(horizontal: 24.w), @@ -113,20 +113,16 @@ class _LockDetailPageState extends State ), ), SizedBox( - height: 35.h, + height: 20.h, ), xhjInfoView(), SizedBox( - height: 35.h, + height: 20.h, ), labelText( img: 'images/icon_slider_horizontal.png', text: '功能'.tr, child: bottomWidget()), - labelText( - img: 'images/icon_puzzlepiece_extension.png', - text: '配件'.tr, - child: attachmentWidget()), btnText( img: 'images/main/icon_main_set.png', text: TranslationLoader.lanKeys!.set!.tr, @@ -140,6 +136,10 @@ class _LockDetailPageState extends State 'isOnlyOneData': state.isOnlyOneData }); }), + labelText( + img: 'images/icon_puzzlepiece_extension.png', + text: '配件'.tr, + child: attachmentWidget()), ], ), ), @@ -207,7 +207,7 @@ class _LockDetailPageState extends State {required String img, required String text, required Widget child}) { return Container( margin: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 15.h), - padding: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 20.h), + padding: EdgeInsets.symmetric(horizontal: 0.05.sw, vertical: 15.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(16.r), @@ -899,7 +899,7 @@ class _LockDetailPageState extends State child: GridView.count( crossAxisCount: 4, // childAspectRatio: 3, - crossAxisSpacing: 20.w, + crossAxisSpacing: 0.w, mainAxisSpacing: 0.h, shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), @@ -945,8 +945,8 @@ class _LockDetailPageState extends State child: GridView.count( crossAxisCount: 4, // childAspectRatio: 3, - crossAxisSpacing: 25.h, - mainAxisSpacing: 5.h, + crossAxisSpacing: 0.h, + mainAxisSpacing: 0.h, shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), children: getBottomWidget()), diff --git a/lib/main/lockMian/lockMain/lockMain_logic.dart b/lib/main/lockMian/lockMain/lockMain_logic.dart index 94838b61..1ea35672 100755 --- a/lib/main/lockMian/lockMain/lockMain_logic.dart +++ b/lib/main/lockMian/lockMain/lockMain_logic.dart @@ -42,9 +42,10 @@ class LockMainLogic extends BaseGetXController { } void loadMainDataLogic(LockListInfoGroupEntity entity) { - final bool every = entity.groupList!.every((GroupList list) => - (list.lockList ?? []).isEmpty); - if (entity.groupList!.isEmpty || every) { + final bool every = entity.groupList?.every((GroupList list) => + (list.lockList ?? []).isEmpty) ?? + false; + if ((entity.groupList??[]).isEmpty || every) { state.dataLength.value = 0; } else if (entity.groupList!.length == 1) { final GroupList groupList = entity.groupList![0]; From 178dbdb93784dbc96a73fd90da1cac8a107a61d7 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 18 Jun 2024 15:01:15 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E8=AE=BE=E5=A4=87=E5=88=97=E8=A1=A8=E4=BC=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=97=A0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main/lockMian/lockMain/lockMain_logic.dart | 10 +++++----- lib/main/lockMian/lockMain/lockMain_page.dart | 12 +++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/main/lockMian/lockMain/lockMain_logic.dart b/lib/main/lockMian/lockMain/lockMain_logic.dart index 1ea35672..d1ee9dc2 100755 --- a/lib/main/lockMian/lockMain/lockMain_logic.dart +++ b/lib/main/lockMian/lockMain/lockMain_logic.dart @@ -36,16 +36,16 @@ class LockMainLogic extends BaseGetXController { isUnShowLoading: isUnShowLoading, ); if (entity.errorCode!.codeIsSuccessful) { - loadMainDataLogic(entity.data!); + await loadMainDataLogic(entity.data!); } return entity; } - void loadMainDataLogic(LockListInfoGroupEntity entity) { + Future loadMainDataLogic(LockListInfoGroupEntity entity) async { final bool every = entity.groupList?.every((GroupList list) => (list.lockList ?? []).isEmpty) ?? - false; - if ((entity.groupList??[]).isEmpty || every) { + true; + if ((entity.groupList ?? []).isEmpty || every) { state.dataLength.value = 0; } else if (entity.groupList!.length == 1) { final GroupList groupList = entity.groupList![0]; @@ -71,7 +71,7 @@ class LockMainLogic extends BaseGetXController { } }); } - Storage.saveMainListData(entity); + await Storage.saveMainListData(entity); } /// 获取联网类型 diff --git a/lib/main/lockMian/lockMain/lockMain_page.dart b/lib/main/lockMian/lockMain/lockMain_page.dart index b5532c6a..3be70607 100755 --- a/lib/main/lockMian/lockMain/lockMain_page.dart +++ b/lib/main/lockMian/lockMain/lockMain_page.dart @@ -45,27 +45,25 @@ class _StarLockMainPageState extends State await Storage.getLockMainListData(); if (lockListInfoGroupEntity != null) { logic.loadMainDataLogic(lockListInfoGroupEntity); + setState(() {}); } lockListInfoGroupEntity = (await logic.getStarLockInfo(isUnShowLoading: isUnShowLoading)).data; if (lockListInfoGroupEntity != null) { logic.loadMainDataLogic(lockListInfoGroupEntity); + setState(() {}); } if (clearScanDevices) { BlueManage().scanDevices.clear(); } - setState(() {}); } @override void initState() { super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) async { - logic.pageNo = 1; - getHttpData(); - _initLoadDataAction(); - setState(() {}); - }); + logic.pageNo = 1; + getHttpData(); + _initLoadDataAction(); } @override From 62c7ea28927a98fa6974e52b7c80383d08b9adeb Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 18 Jun 2024 15:09:06 +0800 Subject: [PATCH 3/6] =?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 1e12ca07..5befe68e 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -73,8 +73,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # 1.0.62+2024061301:xhj 线上环境,对外发布,提交测试:处理华为拒审 # 1.0.63+2024061302:xhj 线上环境,提交测试:回归 bug # 1.0.65+2024061801:xhj 线上环境,提交测试:回归 bug +# 1.0.66+2024061802:xhj 线上环境,提交测试:回归 bug -version: 1.0.65+2024061801 +version: 1.0.66+2024061802 environment: sdk: '>=2.12.0 <3.0.0' From 55ca41e8b462ed305fb0efdc30afe2fc45fcdf27 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 18 Jun 2024 15:49:59 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E9=94=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E6=8A=A5=E9=94=99=EF=BC=8C=E7=AE=80?= =?UTF-8?q?=E5=8C=96=E7=BF=BB=E8=AF=91=E5=8D=95=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 10244 -> 10244 bytes images/lan/lan_en.json | 23 +++++++++--------- images/lan/lan_keys.json | 3 ++- images/lan/lan_zh.json | 3 ++- .../lockDetail/lockDetail_page.dart | 4 +-- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.DS_Store b/.DS_Store index 4647756838700ed5fc4fb31967591fb87089ac54..c406a585d0f403ff08b22bcaacf418f87129ceca 100755 GIT binary patch delta 25 gcmZn(XbISmC&FQ5X{w`OWMDWsU)X;0RuO+;0A_{5r1I-H{1pd diff --git a/images/lan/lan_en.json b/images/lan/lan_en.json index cb39e17a..b134b773 100755 --- a/images/lan/lan_en.json +++ b/images/lan/lan_en.json @@ -2,14 +2,14 @@ "starLock": "Star Lock", "lockThrough": "Lock Through", "clickUnlockAndHoldDownClose": "Click To Unlock And Hold Down to Close", - "checkingIn": "Checking In", - "electronicKey": "Electronic Key", + "checkingIn": "CheckIn", + "electronicKey": "KeyCard", "password": "Password", "card": "Card", - "fingerprint": "Fingerprint", - "remoteControl": "RemoteControl", + "fingerprint": "Finger", + "remoteControl": "RemCtrl", "face": "face", - "operatingRecord": "Operating Record", + "operatingRecord": "OpLog", "doorLockLog": "Door lock log", "number": "Number", "additive": "Additive", @@ -217,7 +217,7 @@ "aboutToExpire": "About to expire", "deAuthorize": "de-authorize", "changeName": "Change name", - "authorizedAdmin": "Authorized Admin", + "authorizedAdmin": "Admin", "addAuthorizedAdmin": "Adding an Authorized Administrator", "lockGroup": "Lock Group", "transferSmartLock": "Transfer Smart Lock", @@ -407,10 +407,10 @@ "getFingerprint": "Get Fingerprint", "safeVerify": "Security verification", "deleteAccountTips": "After deleting the account, all your information and related records will be completely deleted from the platform, and can not be recovered, delete or not", - "humanFace": "Human Face", + "humanFace": "HmFace", "monitoring": "Monitoring", "videoLog": "Video Log", - "messageReminding": "Message Reminding", + "messageReminding": "Notice", "superAdmin": "Super Admin", "normalUser": "Normal User", "gatewayDevice": "Gateway Device", @@ -454,7 +454,7 @@ "videoSlot": "Video slot", "密码": "Password", "卡": "Card", - "指纹": "Fingerprint", + "指纹": "Finger", "人脸": "Face", "配件商城": "Lock Mall", "公司名称": "Company Name", @@ -487,7 +487,7 @@ "钥匙将在": "The key will be in", "天后失效": "Days later invalid", "电量更新时间:": "Power update time:", - "新增配件": "Add accessories", + "新增配件": "Add", "请在锁旁边完成第一次开锁": "Please complete the first unlock next to the lock", "正在开锁中...": "Unlocking...", "你的钥匙": "Your key", @@ -906,5 +906,6 @@ "转移成功": "Transfer success", "该已锁被删除": "The locked is deleted", "授权管理员只能查看和管理自己下发的钥匙、密码等权限": "Authorized administrators can only view and manage the keys, passwords, etc. they issued", - "添加授权管理员": "Add authorized administrator" + "添加授权管理员": "Add authorized administrator", + "手机需联网":"NeedNet" } diff --git a/images/lan/lan_keys.json b/images/lan/lan_keys.json index 49d763d5..d2733315 100755 --- a/images/lan/lan_keys.json +++ b/images/lan/lan_keys.json @@ -938,5 +938,6 @@ "转移成功": "转移成功", "该已锁被删除": "该已锁被删除", "授权管理员只能查看和管理自己下发的钥匙、密码等权限": "授权管理员只能查看和管理自己下发的钥匙、密码等权限", - "添加授权管理员": "添加授权管理员" + "添加授权管理员": "添加授权管理员", + "手机需联网":"Network Required" } diff --git a/images/lan/lan_zh.json b/images/lan/lan_zh.json index 91ab9c85..5ad1ee78 100755 --- a/images/lan/lan_zh.json +++ b/images/lan/lan_zh.json @@ -903,5 +903,6 @@ "转移成功": "转移成功", "该已锁被删除": "该已锁被删除", "授权管理员只能查看和管理自己下发的钥匙、密码等权限": "授权管理员只能查看和管理自己下发的钥匙、密码等权限", - "添加授权管理员": "添加授权管理员" + "添加授权管理员": "添加授权管理员", + "手机需联网":"手机需联网" } diff --git a/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 0d398056..a4f4ec1d 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -778,7 +778,7 @@ class _LockDetailPageState extends State ? AppColors.mainColor : AppColors.btnDisableColor), ), - if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w), + if (add) SizedBox(width: 20.w) else SizedBox(width: 20.w), FlavorsImg( child: Image.asset('images/main/icon_lockDetail_needNetwork.png', width: 24.w, @@ -789,7 +789,7 @@ class _LockDetailPageState extends State ), SizedBox(width: 6.w), Text( - '手机需联网', + '手机需联网'.tr, style: TextStyle( fontSize: 20.sp, color: state.isOpenLockNeedOnline.value == 1 From 2f248c74b2a63e06c0a0156cbb1263ee73000d2a Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 18 Jun 2024 15:56:03 +0800 Subject: [PATCH 5/6] =?UTF-8?q?feat:=E8=A1=A5=E5=85=85=E7=A7=81=E6=9C=89?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/lan/lan_en.json | 9 ++++++++- images/lan/lan_keys.json | 8 +++++++- images/lan/lan_zh.json | 8 +++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/images/lan/lan_en.json b/images/lan/lan_en.json index b134b773..40b37444 100755 --- a/images/lan/lan_en.json +++ b/images/lan/lan_en.json @@ -907,5 +907,12 @@ "该已锁被删除": "The locked is deleted", "授权管理员只能查看和管理自己下发的钥匙、密码等权限": "Authorized administrators can only view and manage the keys, passwords, etc. they issued", "添加授权管理员": "Add authorized administrator", - "手机需联网":"NeedNet" + "手机需联网":"NeedNet", + "设备":"Device", + "消息":"Message", + "智能分析":"Intelligent analytics", + "精准识别设备事件,过滤无效信息":"Accurately identify device events and filter out invalid information", + "系统设置":"System settings", + "系统的全局配置在此项内进行设置":"The global configuration of the system is set in this item" + } diff --git a/images/lan/lan_keys.json b/images/lan/lan_keys.json index d2733315..55f3d821 100755 --- a/images/lan/lan_keys.json +++ b/images/lan/lan_keys.json @@ -939,5 +939,11 @@ "该已锁被删除": "该已锁被删除", "授权管理员只能查看和管理自己下发的钥匙、密码等权限": "授权管理员只能查看和管理自己下发的钥匙、密码等权限", "添加授权管理员": "添加授权管理员", - "手机需联网":"Network Required" + "手机需联网":"手机需联网", + "设备":"设备", + "消息":"消息", + "智能分析":"智能分析", + "精准识别设备事件,过滤无效信息":"精准识别设备事件,过滤无效信息", + "系统设置":"系统设置", + "系统的全局配置在此项内进行设置":"系统的全局配置在此项内进行设置" } diff --git a/images/lan/lan_zh.json b/images/lan/lan_zh.json index 5ad1ee78..4dcee795 100755 --- a/images/lan/lan_zh.json +++ b/images/lan/lan_zh.json @@ -904,5 +904,11 @@ "该已锁被删除": "该已锁被删除", "授权管理员只能查看和管理自己下发的钥匙、密码等权限": "授权管理员只能查看和管理自己下发的钥匙、密码等权限", "添加授权管理员": "添加授权管理员", - "手机需联网":"手机需联网" + "手机需联网":"手机需联网", + "设备":"设备", + "消息":"消息", + "智能分析":"智能分析", + "精准识别设备事件,过滤无效信息":"精准识别设备事件,过滤无效信息", + "系统设置":"系统设置", + "系统的全局配置在此项内进行设置":"系统的全局配置在此项内进行设置" } From f23e2390c569c9e5cc6bba61378223dc68a01fc7 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Tue, 18 Jun 2024 17:51:17 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=9E=81=E5=85=89?= =?UTF-8?q?=E6=8E=A8=E9=80=81=20ios=20=E6=8A=A5=E9=94=99=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 --- ios/.DS_Store | Bin 8196 -> 8196 bytes .../lockMian/lockMain/lockMain_logic.dart | 5 +++-- lib/tools/push/message_management.dart | 14 ++++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ios/.DS_Store b/ios/.DS_Store index 80df6dcc44938a8f54eafe9021407feecd6f1298..bc9ad5a583ae69f768c560174625c50d696a5095 100755 GIT binary patch delta 159 zcmZp1XmOa}FDk~sz`)4BAi%&-!jQ^P2Hwr=94s7+Vw-;m$TBfA zIo_TeAgngoPMC{bdfv+PQubq${e=yY*s7D)2=g&cnEYQ@bMh16KxPI9r%56jlM_UE zIAY{;GnD=ubp-L}i14sM_>oQie>1 z9E2L6=#Hdcn3InIXOg?^{s>AvvYFu^1FbJ0|G{%x4?iGO2epbAOp!u zWx+*xIr(|%Kv9qmb_O?~M@tz>fH0L|v#bCQ6Eoxc?8!Pp1{`-&fBfJ1_NXI}qc*uq zh>IO6FnP9+F=N2w^Fme3i~OflDP{ry|D$@9 diff --git a/lib/main/lockMian/lockMain/lockMain_logic.dart b/lib/main/lockMian/lockMain/lockMain_logic.dart index d1ee9dc2..2fa7974c 100755 --- a/lib/main/lockMian/lockMain/lockMain_logic.dart +++ b/lib/main/lockMian/lockMain/lockMain_logic.dart @@ -36,7 +36,7 @@ class LockMainLogic extends BaseGetXController { isUnShowLoading: isUnShowLoading, ); if (entity.errorCode!.codeIsSuccessful) { - await loadMainDataLogic(entity.data!); + await loadMainDataLogic(entity.data!); } return entity; } @@ -149,7 +149,8 @@ class LockMainLogic extends BaseGetXController { final LockListInfoEntity entity = await ApiRepository.to.getStarLockInfo( keyId: keyId, ); - if (entity.errorCode!.codeIsSuccessful) { + if (entity.errorCode!.codeIsSuccessful && + (entity.data?.groupList ?? []).isNotEmpty) { state.lockListInfoGroupEntity.value.groupList ??= []; final GroupList list = entity.data!.groupList!.first; final LockListInfoItemEntity listItem = diff --git a/lib/tools/push/message_management.dart b/lib/tools/push/message_management.dart index df2f6c01..429dcc36 100644 --- a/lib/tools/push/message_management.dart +++ b/lib/tools/push/message_management.dart @@ -74,15 +74,13 @@ class MessageManagement { case MessageConstant.lockSetChange: final int keyId = data['keyId']; final int lockId = data['lockId']; - final Map extra = data['updateFieldList']; - if (extra['appUnlockOnline'] != null) { - final String appUnlockOnline = extra['appUnlockOnline']; - eventBus.fire( - LockSetChangeSetRefreshLockDetailWithType(1, appUnlockOnline)); - eventBus.fire(RefreshLockInfoDataEvent(keyId: keyId, lockId: lockId)); - } + // 暂时只用刷新 + // final Map extra = data['updateFieldList']; + // if (extra['appUnlockOnline'] != null) { + // final String appUnlockOnline = extra['appUnlockOnline']!.toString(); + // } + eventBus.fire(RefreshLockInfoDataEvent(keyId: keyId, lockId: lockId)); break; - default: throw Exception('无法识别eventNo 参数:$eventNo'); }