From e5d11f6ee8801894a7f15b09a94623172a5e8582 Mon Sep 17 00:00:00 2001 From: liyi Date: Mon, 10 Feb 2025 13:41:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B3=A8=E9=87=8A=E2=80=9C=E9=94=81?= =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E8=A2=AB=E9=87=8D=E7=BD=AE=E2=80=9D=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lockDetail/lockDetail_logic.dart | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart index b5d3a1aa..edf17bc0 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart @@ -426,25 +426,26 @@ class LockDetailLogic extends BaseGetXController { AppLog.log('command:${command}'); showBlueConnetctToastTimer( - outTimer: 20, - action: () async { - final String getMobile = (await Storage.getMobile())!; - ApmHelper.instance.trackEvent('open_lock', { - 'lock_name': state.keyInfos.value.lockName!, - 'account': - getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!, - 'date': DateTool().getNowDateWithType(1), - 'open_lock_result': '超时', - }); - - resetOpenDoorState(); - blueManageDisconnect(); - BuglyTool.uploadException( - message: '开门超时处理-开锁失败', - detail: '开门超时,断开连接,开锁失败--OpenLockCommand:$command', - upload: true); + outTimer: 20, + action: () async { + final String getMobile = (await Storage.getMobile())!; + ApmHelper.instance.trackEvent('open_lock', { + 'lock_name': state.keyInfos.value.lockName!, + 'account': + getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!, + 'date': DateTool().getNowDateWithType(1), + 'open_lock_result': '超时', }); + resetOpenDoorState(); + blueManageDisconnect(); + BuglyTool.uploadException( + message: '开门超时处理-开锁失败', + detail: '开门超时,断开连接,开锁失败--OpenLockCommand:$command', + upload: true); + }, + ); + BlueManage() .blueSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!, (BluetoothConnectionState deviceConnectionState) async { @@ -481,9 +482,9 @@ class LockDetailLogic extends BaseGetXController { 'open_lock_result': '断开连接', }); - if (state.ifCurrentScreen.value == true) { - showBlueConnetctToast(); - } + // if (state.ifCurrentScreen.value == true) { + // showBlueConnetctToast(); + // } resetOpenDoorState(); } }); @@ -658,7 +659,9 @@ class LockDetailLogic extends BaseGetXController { // 远程开锁 Future remoteOpenLock() async { final LoginEntity entity = await ApiRepository.to.remoteOpenLock( - lockId: state.keyInfos.value.lockId.toString(), timeOut: 60); + lockId: state.keyInfos.value.lockId.toString(), + timeOut: 60, + ); if (entity.errorCode!.codeIsSuccessful) { showToast('已开锁'.tr); }