From 456f21be7584274322b06f8927c5e22decc0ce82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 11:50:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=B7=BB=E5=8A=A0=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E5=88=A4=E6=96=AD=202.=20=E5=8E=BB=E9=99=A4=E5=8F=91=E9=80=81?= =?UTF-8?q?=E7=94=B5=E5=AD=90=E9=92=A5=E5=8C=99=E6=97=B6=E7=A9=BA=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/createKey/createKey.vue | 8 -------- pages/home/home.vue | 6 +++++- stores/basic.js | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/pages/createKey/createKey.vue b/pages/createKey/createKey.vue index f6d9f4e..227ee0b 100644 --- a/pages/createKey/createKey.vue +++ b/pages/createKey/createKey.vue @@ -100,14 +100,6 @@ export default { return } - if ((type === 'temporary' && this.temporaryName === '') || (type === 'permanent' && this.permanentName === '')) { - uni.showToast({ - title: '名称不能为空', - icon: 'none' - }) - return - } - if(type === 'temporary' && this.temporaryValidTime >= this.temporaryInvalidTime) { uni.showToast({ title: '失效时间必须大于生效时间', diff --git a/pages/home/home.vue b/pages/home/home.vue index b8ec76c..cf7e263 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -163,9 +163,13 @@ ...mapActions(useLockStore, ['getLockList', 'updateLockList', 'getRole', 'getTimeLimit', 'updateLockSearch', 'getPowerIcon']), ...mapActions(useBluetoothStore, ['getBluetoothStatus', 'initAndListenBluetooth', 'updateCurrentLockInfo', 'checkSetting', 'updateKeyId', 'resetDevice']), - ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo']), + ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo', 'getNetworkType']), async deleteLock(lock, groupIndex, lockIndex) { const that = this + const netWork = await this.getNetworkType() + if(!netWork) { + return + } that.$refs['swipeItem' + groupIndex][lockIndex].closeHandler() if(lock.userType !== 110301 && lock.keyRight === 1) { diff --git a/stores/basic.js b/stores/basic.js index 8183c4c..cfb8de8 100644 --- a/stores/basic.js +++ b/stores/basic.js @@ -214,7 +214,7 @@ export const useBasicStore = defineStore('basic', { title: message, icon: 'none' }) - }, 200) + }, 300) } }) }