tslV2BatchQueryProperty ^8.23.0
用于查询设备的属性,可指定查询属性名称,不指定则返回错误。如果设备有影子则优先使用影子,不支持影子则进行透传查询。(物模型2.0)对应的云端接口为:/v1/thing/batch/properties, 参考文档:https://cf-msmart.midea.com/pages/viewpage.action?pageId=122373562
#请求参数
| Prop |
Type |
Default |
Comment |
body |
Array |
N/A |
查询对象数组 |
sync |
Number |
N/A |
是否同步返回结果,1:同步,0:异步(通过messageType返回) |
#接口调用示例
const params = {
body: [
{
applianceCode: "iVSm",
properties: [
"@",
"q"
]
},
{
applianceCode: "",
properties: [
"L",
"S"
]
}
],
"sync": 1234,
"requestId": "",
"call-module": ""
}
this.$bridge
.tslV2BatchQueryProperty(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
| Prop |
Type |
Default |
Description |
code |
Number |
N/A |
返回码0成功,-1失败 |
data |
Array |
N/A |
请求成功后台返回的数据,失败不返回 |