修复用户过多,清理用户时的bug

This commit is contained in:
范鹏 2024-09-02 10:51:35 +08:00
parent 151328fd33
commit 8c028e0905

View File

@ -297,9 +297,14 @@ export const useBluetoothStore = defineStore('ble', {
case cmdIds.addUser:
that.updateCurrentLockInfo({
...that.currentLockInfo,
token: decrypted.slice(42,46),
lockUserNo: decrypted[47] * 256 + decrypted[48]
token: decrypted.slice(42,46)
})
if(decrypted[46] === 0) {
that.updateCurrentLockInfo({
...that.currentLockInfo,
lockUserNo: decrypted[47] * 256 + decrypted[48]
})
}
console.log('添加用户结果', decrypted[46], that.currentLockInfo.token)
characteristicValueCallback({
code: decrypted[46]