# configDevice ^8.20
进入设备配网流程的接口
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
params | Object | Y | {} | 请求参数 |
# params 字段
Prop | Type | Required | Default | Description |
---|---|---|---|---|
deviceType | String | Y | N/A | 设备品类码如:0xAC |
enterpriseCode | String | Y | N/A | 企业吗:如:0000 |
sn8 | String | Y | N/A | 设备sn8 |
brand | String | N | N/A | 设备品牌(非必须) |
ssid | String | N | N/A | 设备热点名称(非必须) |
mode | String | Y | 0 | 0(AP)、1(快连)、3(蓝牙配网)、5(蓝牙绑定)等配网方式 |
subType | String | N | N/A | 设备子类型(A0(非必须)) |
spid | String | N | N/A | 设备spid(非必须) |
deviceId | String | N | N/A | 设备ID(非必须) |
isNotBind | Boolean | N | false | 是否不需要绑定(非必须) |
# 接口调用示例
this.$bridge
.configDevice({
deviceType: '',
enterpriseCode: '',
sn8: '',
brand: 'ZX(tvFn',
ssid: 'jRI*',
mode: '',
subType: 'zB$ul',
spid: 'zQHzi@',
deviceId: 'u50v',
isNotBind: false
})
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$alert(err)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
code | Number | N/A | 返回码0-成功,其他错误码:配网指引请求失败 |
msg | String | N/A | 返回Code对应的说明信息 |