Merge commit 'd028bbca1bc6d13589210fc78e631ca3a87504f1' into fanpeng
This commit is contained in:
commit
498581082a
@ -59,7 +59,7 @@ export class Result {
|
|||||||
[Result.codes.NotTokenLock, { message: '用户在锁端token失效', data: {} }],
|
[Result.codes.NotTokenLock, { message: '用户在锁端token失效', data: {} }],
|
||||||
[Result.codes.NotMoreKeyLock, { message: '锁端钥匙数量已达上限', data: {} }],
|
[Result.codes.NotMoreKeyLock, { message: '锁端钥匙数量已达上限', data: {} }],
|
||||||
[Result.codes.ReadyHasKeyLock, { message: '用户已是锁端用户', data: {} }],
|
[Result.codes.ReadyHasKeyLock, { message: '用户已是锁端用户', data: {} }],
|
||||||
[Result.codes.ReadyHasPassword, { message: '该密码已存在', data: {} }]
|
[Result.codes.ReadyHasPassword, { message: '该密码已存在,请更换。', data: {} }]
|
||||||
])
|
])
|
||||||
|
|
||||||
constructor(code, data, message) {
|
constructor(code, data, message) {
|
||||||
|
|||||||
@ -1180,13 +1180,12 @@ export const useStarCloudStore = defineStore('starCloud', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { code, data, message } = await getLockSettingDataRequest({
|
const { code, data, message } = await getLockSettingDataRequest({
|
||||||
lockId: lockId
|
lockId
|
||||||
})
|
})
|
||||||
if (code === Result.Success.code) {
|
if (code === Result.Success.code) {
|
||||||
return new Result(code, { ...data.lockFeature }, message)
|
return new Result(code, { ...data.lockFeature }, message)
|
||||||
} else {
|
|
||||||
return new Result(code, data, message)
|
|
||||||
}
|
}
|
||||||
|
return new Result(code, data, message)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1301,7 +1300,6 @@ export const useStarCloudStore = defineStore('starCloud', {
|
|||||||
|
|
||||||
setStorage('starCloudToken', this.accountInfo.token)
|
setStorage('starCloudToken', this.accountInfo.token)
|
||||||
|
|
||||||
this.getServerTimestamp().then(() => {})
|
|
||||||
return Result.Success
|
return Result.Success
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1868,9 +1866,9 @@ export const useStarCloudStore = defineStore('starCloud', {
|
|||||||
lockId: this.lockInfo.lockId
|
lockId: this.lockInfo.lockId
|
||||||
})
|
})
|
||||||
return characteristicValueCallback(new Result(result.code))
|
return characteristicValueCallback(new Result(result.code))
|
||||||
} else {
|
|
||||||
characteristicValueCallback(new Result(decrypted[2]))
|
|
||||||
}
|
}
|
||||||
|
characteristicValueCallback(new Result(decrypted[2]))
|
||||||
|
|
||||||
break
|
break
|
||||||
case subCmdIds.resetLockPassword:
|
case subCmdIds.resetLockPassword:
|
||||||
this.updateLockInfo({
|
this.updateLockInfo({
|
||||||
@ -1948,7 +1946,7 @@ export const useStarCloudStore = defineStore('starCloud', {
|
|||||||
user: decrypted[8 + 17 * i] * 256 + decrypted[9 + 17 * i],
|
user: decrypted[8 + 17 * i] * 256 + decrypted[9 + 17 * i],
|
||||||
date: arrayToTimestamp(decrypted.slice(10 + 17 * i, 14 + 17 * i)) * 1000,
|
date: arrayToTimestamp(decrypted.slice(10 + 17 * i, 14 + 17 * i)) * 1000,
|
||||||
success: 1,
|
success: 1,
|
||||||
password: password
|
password
|
||||||
}
|
}
|
||||||
records.push(record)
|
records.push(record)
|
||||||
}
|
}
|
||||||
@ -1988,21 +1986,6 @@ export const useStarCloudStore = defineStore('starCloud', {
|
|||||||
}
|
}
|
||||||
characteristicValueCallback(new Result(decrypted[6], { lock: this.lockInfo }))
|
characteristicValueCallback(new Result(decrypted[6], { lock: this.lockInfo }))
|
||||||
break
|
break
|
||||||
case cmdIds.resetDevice:
|
|
||||||
this.updateLockInfo({
|
|
||||||
token: decrypted.slice(2, 6),
|
|
||||||
electricQuantity: decrypted[7],
|
|
||||||
electricQuantityStandby: decrypted[9]
|
|
||||||
})
|
|
||||||
if (decrypted[6] === Result.Success.code) {
|
|
||||||
updateElectricQuantityRequest({
|
|
||||||
lockId: this.lockInfo.lockId,
|
|
||||||
electricQuantity: decrypted[7],
|
|
||||||
electricQuantityStandby: decrypted[9]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
characteristicValueCallback(new Result(decrypted[6], { lock: this.lockInfo }))
|
|
||||||
break
|
|
||||||
case cmdIds.resetDevice:
|
case cmdIds.resetDevice:
|
||||||
this.updateLockInfo({
|
this.updateLockInfo({
|
||||||
token: decrypted.slice(2, 6)
|
token: decrypted.slice(2, 6)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user