startCmdProcess ^6.8
推荐使用sendLuaRequest(Lua控制)代替此接口做设备控制/查询
#请求参数
| Prop |
Type |
Default |
Comment |
messageBody |
String |
N/A |
十六进制指令 |
name |
String |
N/A |
mock模拟数据key,可以在mock.js中配置模拟数据,通过name匹配相应模拟数据 |
#接口调用示例
const params = JSON.stringify({
name: '', // mock模拟数据key,可以在mock.js中配置模拟数据,通过name匹配相应模拟数据
messageBody: '', // 十六进制指令
})
this.$bridge
.startCmdProcess(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
| Prop |
Type |
Default |
Description |
messageBody |
String |
N/A |
|
errorCode |
Number |
N/A |
错误码 |
| Prop |
Type |
Default |
Description |
errorMessage |
String |
N/A |
错误消息 |
errorCode |
Number |
N/A |
错误码 |