|
[多端开发]
esptouch模块出现闪退问题
[复制链接]
本帖最后由 BIP556100 于 2022-5-20 20:04 编辑
apiready = function() {
esptouch = api.require('esptouch');
}
function find() {
var password=localStorage.getItem("password",password);
var ssid = localStorage.getItem("ssid");
var Bssid = localStorage.getItem("Bssid");
esptouch.find({
apSsid: ssid,
apBssid: Bssid,
apPassword: password,
devicesCount:1,
type:1
}, function(ret) {
if (ret.status) {
// alert(JSON.stringify(ret));
console.log(JSON.stringify(ret));
var deviceip=ret.list[0].address;
localStorage.setItem("deviceip",deviceip);
}else{
alert(JSON.stringify(ret.msg));
}
});
}
|
|