微信公众号,安卓调用定位,出现getLocation:timeout?

发布于 9 年前作者 luoyan12075 次浏览最后编辑 9 年前来自 issues

ios一切正常,就是安卓机老是出现getLocation:timeout,目前使用的测试机华为安卓,都会出现,微信版本是7.0.6

componentDidMount() {
  window.wx.ready(() => {
    this.getLocation()
  })
}
 
// eslint-disable-next-line class-methods-use-this
getLocation() {
  window.wx.getLocation({
    type: 'wgs84',
    success: () => {
    },
    fail: (res) => {
      console.log(res)
    },
    complete: () => {
    },
  })
}
3 回复
juanfang
juanfang1 楼6 年前

最近也遇到这个问题,安卓机都会,不知道如何解决

rcheng
rcheng2 楼6 年前

你这个问题解决了吗,我也遇到了

fangqian
fangqian3 楼6 年前

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