wx.startWifi({
success (res) {
console.log(res)
wx.getConnectedWifi({
success: function(res) {
console.log(res,"WIFI获取成功");
},
fail: function(res) {
console.log(res,"WIFI获取失败");
}
});
}
});
输出结果:
{"errMsg":"startWifi:ok"}
{errMsg: "getConnectedWifi:fail no wifi is connected."}
y已经连了wifi的
上传个代码片段, 我这边测一下