1. 修改一次性钥匙删除逻辑
This commit is contained in:
parent
70a477a56f
commit
6264172c66
@ -153,6 +153,19 @@ export default {
|
||||
title: `${type === 'close' ? '关' : '开'}锁成功`,
|
||||
icon: 'none'
|
||||
})
|
||||
if(this.currentLockInfo.keyType === 3) {
|
||||
const { code: deleteKeyCode } = await deleteKeyRequest({
|
||||
keyId: this.keyId
|
||||
})
|
||||
if(deleteKeyCode === 0) {
|
||||
this.updateLockSearch({
|
||||
...this.lockSearch,
|
||||
pageNo: 1
|
||||
})
|
||||
this.getLockList(this.lockSearch)
|
||||
this.backAndToast('单次钥匙已在被使用后删除', 1)
|
||||
}
|
||||
}
|
||||
} else if(code === 13) {
|
||||
uni.showToast({
|
||||
title: `只能在循环时间内操作门锁`,
|
||||
@ -164,19 +177,6 @@ export default {
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
if(this.currentLockInfo.keyType === 3) {
|
||||
const { code: deleteKeyCode } = await deleteKeyRequest({
|
||||
keyId: this.keyId
|
||||
})
|
||||
if(deleteKeyCode === 0) {
|
||||
this.updateLockSearch({
|
||||
...this.lockSearch,
|
||||
pageNo: 1
|
||||
})
|
||||
this.getLockList(this.lockSearch)
|
||||
this.backAndToast('单次钥匙已在被使用后删除', 1)
|
||||
}
|
||||
}
|
||||
this.$refs.loading.close()
|
||||
this.pending = false
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user