From 6264172c663d89be905d0252cf393fced5f89ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Tue, 3 Sep 2024 10:54:41 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=94=B9=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E6=80=A7=E9=92=A5=E5=8C=99=E5=88=A0=E9=99=A4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/lockDetail/lockDetail.vue | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pages/lockDetail/lockDetail.vue b/pages/lockDetail/lockDetail.vue index 4f5d080..a1d5db4 100644 --- a/pages/lockDetail/lockDetail.vue +++ b/pages/lockDetail/lockDetail.vue @@ -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 }