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

# 返回参数

Prop Type Default Description
code Number N/A 返回码0成功,-1失败
data Array N/A 请求成功后台返回的数据,失败不返回
Last Updated: 12/3/2024, 2:21:11 PM