wx.getLocation在安卓手机上,没连接网络时无法获取定位
发布于 6 年前 作者 qinming 7555 次浏览 来自 问答

wx.getLocation({

type: ‘gcj02’,

success: function (res) {

callback && callback({

latitude: latitude,

longitude: longitude,

})

}.bind(this),

fail: function (err) {

console.log(“getLocationfail”, err)

}

})

在没有网络的情况下回执行fail

1 回复

你好,这边测试问题没有复现,麻烦提供出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部