ty.playnet.autoConnectToAp
自动连接wifi
需引入
PlayNetKit,且在>=1.1.0版本才可使用
请求参数
Object object
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| ssid | string |
是 | 配网之后,设备工作 Wi-Fi 的名称 | |
| pwd | string |
是 | 配网之后,设备工作 Wi-Fi 的密码 | |
| complete | function |
否 | 接口调用结束的回调函数(调用成功、失败都会执行) | |
| success | function |
否 | 接口调用成功的回调函数 | |
| fail | function |
否 | 接口调用失败的回调函数 |
返回结果
- success
null
- fail
| 属性 | 类型 | 说明 |
|---|---|---|
| errorMsg | string |
插件错误信息 |
| errorCode | string |
错误码 |
| innerError | object |
插件外部依赖错误信息 {errorMsg: string, errorCode: string } |
请求示例
ty.playnet.autoConnectToAp({
ssid: 'SmartLife',
pwd: '123456',
})
.then((res) => {
console.log(res);
})
.catch((error) => {
console.log(error);
});
返回示例
null
ty.playnet.getDeviceSecurityConfigs
获取sl等级配置
需引入
PlayNetKit,且在>=1.1.0版本才可使用
请求参数
Object object
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| complete | function |
否 | 接口调用结束的回调函数(调用成功、失败都会执行) |

最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



