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) } }) }