1. 修改一次性钥匙删除逻辑

This commit is contained in:
范鹏 2024-09-03 10:54:41 +08:00
parent 89812184e3
commit 2b78354617

View File

@ -153,17 +153,6 @@ export default {
title: `${type === 'close' ? '关' : '开'}锁成功`, title: `${type === 'close' ? '关' : '开'}锁成功`,
icon: 'none' icon: 'none'
}) })
} else if(code === 13) {
uni.showToast({
title: `只能在循环时间内操作门锁`,
icon: 'none'
})
} else {
uni.showToast({
title: `${type === 'close' ? '关' : '开'}锁失败,请保证在锁附近`,
icon: 'none'
})
}
if(this.currentLockInfo.keyType === 3) { if(this.currentLockInfo.keyType === 3) {
const { code: deleteKeyCode } = await deleteKeyRequest({ const { code: deleteKeyCode } = await deleteKeyRequest({
keyId: this.keyId keyId: this.keyId
@ -177,6 +166,17 @@ export default {
this.backAndToast('单次钥匙已在被使用后删除', 1) this.backAndToast('单次钥匙已在被使用后删除', 1)
} }
} }
} else if(code === 13) {
uni.showToast({
title: `只能在循环时间内操作门锁`,
icon: 'none'
})
} else {
uni.showToast({
title: `${type === 'close' ? '关' : '开'}锁失败,请保证在锁附近`,
icon: 'none'
})
}
this.$refs.loading.close() this.$refs.loading.close()
this.pending = false this.pending = false
} }