# startCmdProcess 推荐使用`sendLuaRequest`(Lua控制)代替此接口做设备控制/查询
weex发送十六进制指令控制家电或查询家电状态
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
param | Object | Y | {} 属性: messageBody: {Type: String, Default: N/A, Description: 十六进制指令 } deviceId: {Type: String, Default: N/A, Description: 设备ID } | 请求参数 |
# 接口调用示例
this.$bridge
.startCmdProcess()
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 0 成功/-1 请求超时 |
messageBody | Object /Array | N/A | 服务器返回的结果 |
- 失败时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 请求失败错误码 |
errorMessage | String | N/A | 错误消息(如有) |