收藏
回答

wx.getlocation接口部分手机在位置权限都打开的情况下访问失败

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug wx.getLocation 微信安卓客户端 7.0.6 1.9.92

小程序在调用位置权限接口时,获取失败;位置权限是打开的,可以在微信分享位置,小程序的位置权限也授权了,但是就是调用location接口时报错


回答关注问题邀请回答
收藏

3 个回答

  • Tummy
    Tummy
    2019-08-05

    定位后台有个bug,导致认不到定位的基站,我们抓紧修复下,感谢反馈.

    2019-08-05
    有用
    回复 3
    • 风景
      风景
      2019-08-06
      好的,尽快修复吧,修复好了告知一声。今天还有个用户反馈,身在上海,定位到了深圳的
      2019-08-06
      回复
    • 风景
      风景
      2019-08-12
      您好,请问这个问题什么时候能够修复?
      2019-08-12
      回复
    • 姚冀锋
      姚冀锋
      2019-12-03
      您好,如果是这种技术问题,是否可以给一个特殊的返回码,我们开发会比较方便的定位问题,以及做相应的兜底逻辑。


      期待您的回复
      2019-12-03
      回复
  • Setter!
    Setter!
    2019-12-04

    runtime.js?devtools_ignore=true:1 error parsing cp ws message {"data":{"ret":"null","call_id":0},"type":"handleCallInterfaceResult"}

    value @ runtime.js?devtools_ignore=true:1

    ke.onmessage @ runtime.js?devtools_ignore=true:1


    2019-12-04
    有用
    回复
  • 是小白啊
    是小白啊
    2019-08-05

    能开下调试?看下具体报错?

    2019-08-05
    有用
    回复 12
    • 风景
      风景
      2019-08-05
      这个是手机客户端报错,走到了fail方法里,有个别手机有这样的情况
      2019-08-05
      回复
    • 是小白啊
      是小白啊
      2019-08-05回复风景
      让开启下wifi试下?这个错误是你们反馈的吧?
      2019-08-05
      回复
    • 风景
      风景
      2019-08-05
      就是说有可能是网络的问题是吗?
      2019-08-05
      回复
    • 风景
      风景
      2019-08-05回复是小白啊
      错误是在调用wx.getlocation进入了fail方法,我在fail方法里提示的
      2019-08-05
      回复
    • 风景
      风景
      2019-08-05
      wx.getLocation({ type: 'gcj02', success: function (res) { var latitude = res.latitude; var longitude = res.longitude; that.getSpecificLocation(latitude, longitude); if (latitude && longitude){ if (that.data.prjMapList) { for (var i = 0; i < that.data.prjMapList.length; i++) { if (that.data.prjMapList[i].addressMapList != null) { var addressMapList = that.data.prjMapList[i].addressMapList; for (var j = 0; j < addressMapList.length; j++) { var targetLatitude = addressMapList[j].latitude; var targetLongitude = addressMapList[j].longitude; that.getDistance(latitude, longitude, targetLatitude, targetLongitude, i, j); } } else { util.redirect("没有对应的项目地址,请联系管理员!"); } } // console.log("data", that.data); } else { util.redirect("没有对应的项目,请联系管理员!"); } }else{ wx.showToast({ title: "经纬度获取为空", icon: 'none', duration: 2000 }) } // that.getSpecificLocation(latitude, longitude); }, fail:function(res){ // console.log("fail:",res); wx.showToast({ title: '位置信息接口调用失败,请确认位置权限是否打开', icon: 'none', duration: 2000 }) } })
      2019-08-05
      回复
    查看更多(7)
登录 后发表内容