# getDeviceIconList ^8.8
获取设备 icon
TIP
优先读取本地缓存,若无缓存,则通过网络接口获取相关数据
# 请求参数
Prop | Type | Default | Comment |
---|---|---|---|
deviceInfoList | Array<Object> | N/A | 查询设备的数据,详细看下表 |
- deviceInfoList 子对象属性值:
Prop | Type | Default | Comment |
---|---|---|---|
appType | string | N/A | 设备类型 |
sn8 | string | N/A | 设备的 sn8 |
# 接口调用示例
const params = {
deviceInfoList: [{ appType: '', sn8: '' }],
}
this.$bridge
.getDeviceIconList(params)
.then((res) => {
this.$alert(res)
})
.catch((err) => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 返回参数
- 成功时返回
Prop | Type | Default | Comment |
---|---|---|---|
code | String | N/A | 返回码 0 成功 |
deviceIconList | Array<string> | N/A | 设备图标列表 |
- 失败时返回
Prop | Type | Default | Comment |
---|---|---|---|
code | String | N/A | code -1001:参数错误;xxx:其他错误代码 |
# 接口返回示例
{
code:0,
deviceIconList:["", "", ""],
msg:""
}
1
2
3
4
5
6
7
2
3
4
5
6
7