startAuthenticRight ^6.8
执行设备确权(前置条件,蓝牙连接成功)
#请求参数
| Prop |
Type |
Default |
Comment |
name |
String |
N/A |
选填,蓝牙名称 |
mac |
String |
N/A |
mac地址 |
applianceId |
String |
N/A |
设备deviceId |
category |
String |
N/A |
设备品类 如“ac” |
sn8 |
String |
N/A |
设备sn8(^7.5) |
subType |
String |
N/A |
设备子类型(^7.5) |
#接口调用示例
const params = {
name: 'midea_xx_xxxx', //选填
mac: 'xxxxxxxxxxxx',
applianceId: 'xxxx', //设备deviceId
deviceType: 'xxxx', //设备品类 如“ac”
deviceSn8: 'xxxx', //设备sn8或者设备子类型(看确权指引通过哪个区分,目前只有洗衣机是通过子类型的)
}
this.$bridge
.startAuthenticRight(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#获取接口返回结果
this.$bridge
.addEventListener('singleBlueStartAuthenticRight', res=>console.log(res))
#返回参数
| Prop |
Type |
Default |
Description |
messageType |
String |
N/A |
singleBlueStartAuthenticRight |
messageBody |
Object |
N/A |
|
| Prop |
Type |
Default |
Description |
mac |
String |
N/A |
|
name |
String |
N/A |
|
code |
String |
N/A |
0代表确成功,-1代表确权失败 -2代表确权超时 |