getConnectedWifi的signalStrength强弱无变化99
发布于 5 年前 作者 ytao 9833 次浏览 来自 问答

安卓系统,代码如下 ,当前连接,距WIFI点远近,手机显示强弱环境,getConnectedWifi返回的wifi.signalStrength都为99是怎么回事?

getConnectedWifi:function(){

var that = this

that.stopWifi();

that.startWifi();

wx.getConnectedWifi({

success: function(res){

console.log(res);

that.setData({ message2: res.wifi.SSID});

that.setData({ message3: res.wifi.signalStrength});

},

fail:function(err){

console.log(err);

that.setData({ message2: err.errCode});  //‘失败’‘失败’

}

})

},

2 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

我测试出来,只有终止小程序,重新再打开小程才能取得新的信号值,不知为什么?

回到顶部