diff --git a/stores/bluetooth.js b/stores/bluetooth.js index 5e65a82..a7dc916 100644 --- a/stores/bluetooth.js +++ b/stores/bluetooth.js @@ -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]