1. 添加网络判断

2. 去除发送电子钥匙时空昵称判断
This commit is contained in:
范鹏 2024-09-07 11:50:59 +08:00
parent 329f9bb594
commit 456f21be75
3 changed files with 6 additions and 10 deletions

View File

@ -100,14 +100,6 @@ export default {
return return
} }
if ((type === 'temporary' && this.temporaryName === '') || (type === 'permanent' && this.permanentName === '')) {
uni.showToast({
title: '名称不能为空',
icon: 'none'
})
return
}
if(type === 'temporary' && this.temporaryValidTime >= this.temporaryInvalidTime) { if(type === 'temporary' && this.temporaryValidTime >= this.temporaryInvalidTime) {
uni.showToast({ uni.showToast({
title: '失效时间必须大于生效时间', title: '失效时间必须大于生效时间',

View File

@ -163,9 +163,13 @@
...mapActions(useLockStore, ['getLockList', 'updateLockList', 'getRole', 'getTimeLimit', 'updateLockSearch', 'getPowerIcon']), ...mapActions(useLockStore, ['getLockList', 'updateLockList', 'getRole', 'getTimeLimit', 'updateLockSearch', 'getPowerIcon']),
...mapActions(useBluetoothStore, ['getBluetoothStatus', 'initAndListenBluetooth', 'updateCurrentLockInfo', ...mapActions(useBluetoothStore, ['getBluetoothStatus', 'initAndListenBluetooth', 'updateCurrentLockInfo',
'checkSetting', 'updateKeyId', 'resetDevice']), 'checkSetting', 'updateKeyId', 'resetDevice']),
...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo']), ...mapActions(useBasicStore, ['routeJump', 'getDeviceInfo', 'getNetworkType']),
async deleteLock(lock, groupIndex, lockIndex) { async deleteLock(lock, groupIndex, lockIndex) {
const that = this const that = this
const netWork = await this.getNetworkType()
if(!netWork) {
return
}
that.$refs['swipeItem' + groupIndex][lockIndex].closeHandler() that.$refs['swipeItem' + groupIndex][lockIndex].closeHandler()
if(lock.userType !== 110301 && lock.keyRight === 1) { if(lock.userType !== 110301 && lock.keyRight === 1) {

View File

@ -214,7 +214,7 @@ export const useBasicStore = defineStore('basic', {
title: message, title: message,
icon: 'none' icon: 'none'
}) })
}, 200) }, 300)
} }
}) })
} }