tslV2PerformAction 操作(action)调用(物模型2.0)

tslV2PerformAction ^8.13.1

操作(action)调用(物模型2.0)

#请求参数

Prop Type Default Comment
moduleCode String N/A 物模型模块编码
actionCode String N/A 物模型动作编码
applianceCode String N/A 设备编码
body String N/A 控制参数
sync Number N/A 是否同步 1/0

#接口调用示例

const params = {
  moduleCode: 'electricCurtain', //模块编码,
  actionCode: 'open', //动作编码
  applianceCode: '5123791273891273', //设备编码
  body: {},
  sync: 1
}
this.$bridge
  .tslV2PerformAction(params)
  .then(res => {
    this.$alert(res)
  })
  .catch(err => {
    this.$toast(err)
  })

#返回参数

Prop Type Default Description
code Number N/A 0: 请求成功
data Array N/A 物模型返回的数据
posted on 2024-12-19 09:23  AtlasLapetos  阅读(8)  评论(0)    收藏  举报