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

1
2
3
4
5
6
7
8
9
10
11
12
13
14

# 接口返回示例

{
    "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"
        }
    ]
}


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
更新时间: 4/28/2022, 6:24:29 PM