调用wx.getLocation返回getLocation:fail 1
发布于 6 年前 作者 juan89 14015 次浏览 来自 问答

iphone7调用wx.getLocation返回getLocation:fail 1。用户已经授权scope.userLocation返回是true,另外app.json里也把permission配置加上了

3 回复

确认微信app是否获得手机地理位置授权

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

    wx.getLocation({
      type: ‘gcj02’,
      success (res) {
       …
      },
      fail (res) {
        console.log(res);
      }
    });

代码直接走到fail里

回到顶部