# 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)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 获取接口返回结果
this.$bridge
.addEventListener('singleBlueStartAuthenticRight', res=>console.log(res))
1
2
2
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
messageType | String | N/A | singleBlueStartAuthenticRight |
messageBody | Object | N/A |
- messageBody 对象属性
Prop | Type | Default | Description |
---|---|---|---|
mac | String | N/A | |
name | String | N/A | |
code | String | N/A | 0代表确成功,-1代表确权失败 -2代表确权超时 |
- 失败时返回