fix:注释“锁已经被重置”的提示框

This commit is contained in:
liyi 2025-02-10 13:41:15 +08:00
parent 329989b2ba
commit e5d11f6ee8

View File

@ -426,25 +426,26 @@ class LockDetailLogic extends BaseGetXController {
AppLog.log('command:${command}'); AppLog.log('command:${command}');
showBlueConnetctToastTimer( showBlueConnetctToastTimer(
outTimer: 20, outTimer: 20,
action: () async { action: () async {
final String getMobile = (await Storage.getMobile())!; final String getMobile = (await Storage.getMobile())!;
ApmHelper.instance.trackEvent('open_lock', { ApmHelper.instance.trackEvent('open_lock', {
'lock_name': state.keyInfos.value.lockName!, 'lock_name': state.keyInfos.value.lockName!,
'account': 'account':
getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!, getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!,
'date': DateTool().getNowDateWithType(1), 'date': DateTool().getNowDateWithType(1),
'open_lock_result': '超时', 'open_lock_result': '超时',
});
resetOpenDoorState();
blueManageDisconnect();
BuglyTool.uploadException(
message: '开门超时处理-开锁失败',
detail: '开门超时,断开连接,开锁失败--OpenLockCommand:$command',
upload: true);
}); });
resetOpenDoorState();
blueManageDisconnect();
BuglyTool.uploadException(
message: '开门超时处理-开锁失败',
detail: '开门超时,断开连接,开锁失败--OpenLockCommand:$command',
upload: true);
},
);
BlueManage() BlueManage()
.blueSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!, .blueSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!,
(BluetoothConnectionState deviceConnectionState) async { (BluetoothConnectionState deviceConnectionState) async {
@ -481,9 +482,9 @@ class LockDetailLogic extends BaseGetXController {
'open_lock_result': '断开连接', 'open_lock_result': '断开连接',
}); });
if (state.ifCurrentScreen.value == true) { // if (state.ifCurrentScreen.value == true) {
showBlueConnetctToast(); // showBlueConnetctToast();
} // }
resetOpenDoorState(); resetOpenDoorState();
} }
}); });
@ -658,7 +659,9 @@ class LockDetailLogic extends BaseGetXController {
// //
Future<void> remoteOpenLock() async { Future<void> remoteOpenLock() async {
final LoginEntity entity = await ApiRepository.to.remoteOpenLock( 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) { if (entity.errorCode!.codeIsSuccessful) {
showToast('已开锁'.tr); showToast('已开锁'.tr);
} }