我用小程有获得WIFI信息为么要启用手机的位置信息?

  • • 发表于 6年前
  • • 作者 蜀天下
  • • 2772 人浏览
  • • 0 条评论
  • • 最后编辑时间 6年前
  • • 来自 [问 答]

原创声明:本文为作者原创,未经允许不得转载,经授权转载需注明作者和出处

我用小程有获得WIFI信息为么要启用手机的位置信息?还要只能一次取值,重新终止小程序后,才能获得新值。
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}); //‘失败’’失败’
}
})
},

分享到:
0条评论
Ctrl+Enter
作者

蜀天下

蜀天下

APP:0 帖子:1 回复:4 积分:18

已加入社区[3130]天

主人太懒,签名没设置!

作者详情》
Top