修改访客邀请、一键开门bug

This commit is contained in:
zhouyanli
2026-05-07 11:57:57 +08:00
parent 231de9cde8
commit 0fb361ad64
6 changed files with 82 additions and 114 deletions

View File

@@ -107,10 +107,10 @@ const getAccessControl = async () =>{
})
}
}catch{
}catch(err){
doorList.value = []
uni.showToast({
title:res.msg,
title:err.msg || '查询失败',
icon:"error"
})
}
@@ -136,26 +136,19 @@ const getAccessOpenData = async () =>{
let params = {deviceId:selectedDoor.value}
const res = await getAccessOpen(params)
if(res.code === 200){
if(res.data){
uni.showToast({
title:'开门成功',
icon:"success"
})
}else{
uni.showToast({
title:'开门失败',
icon:"error"
})
}
uni.showToast({
title:'开门成功',
icon:'success'
})
}else{
uni.showToast({
title:'开门失败',
icon:"error"
})
}
}catch{
}catch(err){
uni.showToast({
title: res.msg,
title: err.msg || '开门失败',
icon:"error"
})
}