fix bug
This commit is contained in:
parent
bc4c2fcddf
commit
aaa0b07891
@ -34,6 +34,9 @@
|
||||
<view class="m-4 text-sm" v-if="check">
|
||||
经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。
|
||||
</view>
|
||||
<view class="m-4 text-sm" v-if="check">
|
||||
注:设定时间过短可能导致锁寿命缩短,建议设定时间不低于10秒。
|
||||
</view>
|
||||
<view
|
||||
v-if="$bluetooth.currentLockSetting.lockBasicInfo.keyRight === 1"
|
||||
:class="[canUpdate ? 'bg-#63b8af' : 'bg-#a3a3a3']"
|
||||
|
||||
@ -243,6 +243,7 @@
|
||||
if (data[i].openLockType === 5) {
|
||||
for (let j = 0; j < data[i].keys.length; j++) {
|
||||
data[i].keys[j].openLockType = data[i].openLockType
|
||||
data[i].keys[j].name = data[i].keys[j].faceName
|
||||
data[i].keys[j].id = data[i].keys[j].faceId
|
||||
if (data[i].keys[j].faceType === 1) {
|
||||
data[i].keys[j].timeText =
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<input
|
||||
class="w-450 h-60 text-right font-bold text-base"
|
||||
:value="remark"
|
||||
maxlength="50"
|
||||
:maxlength="50"
|
||||
placeholder="请输入"
|
||||
placeholder-class="text-base line-height-60rpx font-bold text-right"
|
||||
@input="updateName"
|
||||
@ -236,8 +236,9 @@
|
||||
|
||||
const deleteData = async () => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定删除吗?',
|
||||
title: '是否删除家人?',
|
||||
content: '删除家人后,你将不会收到他到家的消息',
|
||||
confirmText: '删除',
|
||||
success: async res => {
|
||||
if (res.confirm) {
|
||||
if (pending.value) return
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
|
||||
const confirm = () => {
|
||||
for (let i = 0; i < emailList.value.length; i++) {
|
||||
if (test.email(emailList.value[i].account) === false) {
|
||||
if (test.email(emailList.value[i].account) === false && emailList.value[i].account !== '') {
|
||||
uni.showToast({
|
||||
title: '含不符合规范的邮箱',
|
||||
icon: 'none'
|
||||
@ -123,7 +123,7 @@
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < smsList.value.length; i++) {
|
||||
if (test.mobile(smsList.value[i].account) === false) {
|
||||
if (test.mobile(smsList.value[i].account) === false && smsList.value[i].account !== '') {
|
||||
uni.showToast({
|
||||
title: '含不符合规范的手机号',
|
||||
icon: 'none'
|
||||
@ -131,10 +131,14 @@
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const email = emailList.value.filter(item => item.account !== '')
|
||||
const sms = smsList.value.filter(item => item.account !== '')
|
||||
|
||||
eventChannel.emit('confirm', {
|
||||
noticeWay: [
|
||||
{ type: 'mail', accounts: emailList.value },
|
||||
{ type: 'sms', accounts: smsList.value }
|
||||
{ type: 'mail', accounts: email },
|
||||
{ type: 'sms', accounts: sms }
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
@ -49,9 +49,11 @@
|
||||
import { updateLockSettingRequest } from '@/api/setting'
|
||||
import { useBluetoothStore } from '@/stores/bluetooth'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { useBasicStore } from '@/stores/basic'
|
||||
|
||||
const $bluetooth = useBluetoothStore()
|
||||
const $user = useUserStore()
|
||||
const $basic = useBasicStore()
|
||||
|
||||
const value = ref(0)
|
||||
|
||||
@ -63,6 +65,10 @@
|
||||
|
||||
const updateValue = async val => {
|
||||
if (pending.value || value.value === val) return
|
||||
const netWork = await $basic.getNetworkType()
|
||||
if (!netWork) {
|
||||
return
|
||||
}
|
||||
pending.value = true
|
||||
uni.showLoading({
|
||||
title: '更新中'
|
||||
@ -102,6 +108,9 @@
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} else if (code === -21) {
|
||||
pending.value = false
|
||||
uni.hideLoading()
|
||||
} else {
|
||||
pending.value = false
|
||||
uni.hideLoading()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user