From 0520733080d357518c4ab50ba071dc551f82f1be Mon Sep 17 00:00:00 2001 From: liyi Date: Wed, 11 Jun 2025 09:17:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=A6=82=E6=9E=9C=E6=98=AF=E5=8D=95?= =?UTF-8?q?=E6=AC=A1=E9=92=A5=E5=8C=99=E5=BC=80=E9=94=81=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E5=B0=B1=E8=B0=83=E7=94=A8=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lockDetail/lockDetail/lockDetail_logic.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart index 44e9259d..1155117f 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart @@ -126,6 +126,17 @@ class LockDetailLogic extends BaseGetXController { TalkStatus.answeredSuccessfully) { showToast('开锁成功'.tr); } + // 如果是单次钥匙,则开锁成功之后调用删除 + if (state.keyInfos.value.keyType == 3) { + final LockListInfoEntity entity = await ApiRepository.to + .deletOwnerKeyData( + lockId: state.keyInfos.value.lockId.toString(), + keyId: state.keyInfos.value!.keyId.toString(), + includeUnderlings: 0); + if (entity.errorCode!.codeIsSuccessful) { + AppLog.log("删除成功"); + } + } break; case 0x06: //无权限 @@ -532,8 +543,7 @@ class LockDetailLogic extends BaseGetXController { final List getPublicKeyList = changeStringListToIntList(publicKey!); - AppLog.log( - '发送同步锁记录命令:${BlueManage().connectDeviceName}'); + AppLog.log('发送同步锁记录命令:${BlueManage().connectDeviceName}'); IoSenderManage.senderReferEventRecordTimeCommand( keyID: BlueManage().connectDeviceName, userID: await Storage.getUid(),