1. 修改一次性钥匙删除逻辑
This commit is contained in:
parent
89812184e3
commit
2b78354617
@ -153,6 +153,19 @@ export default {
|
|||||||
title: `${type === 'close' ? '关' : '开'}锁成功`,
|
title: `${type === 'close' ? '关' : '开'}锁成功`,
|
||||||
icon: 'none'
|
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) {
|
} else if(code === 13) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `只能在循环时间内操作门锁`,
|
title: `只能在循环时间内操作门锁`,
|
||||||
@ -164,19 +177,6 @@ export default {
|
|||||||
icon: 'none'
|
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.$refs.loading.close()
|
||||||
this.pending = false
|
this.pending = false
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user