getHomeInfo 获取家庭信息及其设备列表
getHomeInfo ^7.9
获取家庭信息及其设备列表
#请求参数
| Prop | Type | Default | Comment |
|---|---|---|---|
| homeId | String | N/A | 家庭id |
| isCurrentFamily | String | N/A | 是否是当前家庭 ,0:否,1是 |
| hasRoomAndDeviceInfo | String | N/A | 是否附带房间和设备信息,0:否,1是 |
#接口调用示例
const params = {
"homeId": "家庭id",
"isCurrentFamily": "是否是当前家庭 ,0:否,1是",
"hasRoomAndDeviceInfo": "是否附带房间和设备信息,0:否,1是 "
}
this.$bridge
.getHomeInfo(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#接口返回示例
{
"homeId": "123456",
"roleId":"1002",// 创建者,管理员,普通成员
"homeName": "林首富之家",
"isOwner": "1",
"address": "string",
"coordinate": "string",
"areaid": "string",
"isLocal": "0",
"deviceList": [
{
"masterId": "xxx",
"roomId": "xxx",
"roomName": "xxx",
"deviceId": "xxxxx",
"deviceName": "xxxxxx",
"deviceType": "xxxx",
"deviceSubType": "xxxxx",
"deviceSn": "xxxxxxxxx",
"deviceSnDecrypt": "xxxxx",
"deviceSn8": "xxxxxxxx",
"isOnline": 1,
"attrs": "xxx",
"deviceIcon":"xxx", //设备icon
"subDeviceIcon":"xxx" //子设备icon
}
],
"roomList": [
{
"roomId": "xxx",
"name": "xxx",
"des": "xxx",
"icon": "",
"isDefault": "1"
}
]
}
浙公网安备 33010602011771号