# changeDeviceWifi ^11.0

进入设备配网流程的接口

# 请求参数

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
sn String Y N/A 设备sn
deviceId String N N/A 设备ID(非必须)
mode String N N/A 模式
ssid String N N/A 设备热点名称(非必须)
deviceSubType String N N/A 设备子品类码(非必须)
sn8 String N N/A 设备sn8
spid String N N/A 设备spid

# 接口调用示例


const params = {
    deviceId: this.deviceInfo.deviceId,
    deviceType: this.deviceInfo.deviceType,
    subType: this.deviceInfo.deviceSubType,
    ssid: this.deviceInfo.ssid,
    enterpriseCode: '0000',
    mode: '',
    sn: this.deviceInfo.deviceSn,
    sn8: this.deviceInfo.deviceSn8,
    spid: this.deviceInfo.smartProductId
}

this.$bridge
      .changeDeviceWifi(
        params,
        res => {
          this.$toast(res)
        },
        err => {
          this.$toast(err)
        }
      )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# 返回参数

  • 成功时返回
Prop Type Default Description
code Number N/A 返回码0-成功,其他错误码:配网指引请求失败
msg String N/A 返回Code对应的说明信息