苹果7 getLocation 定位失败

发布于 6 年前作者 rguo6959 次浏览最后编辑 6 年前来自 ask

wx.getLocation({

    type"gcj02",

    success: function (res) {

        console.log(res.longitude);

        console.log(res.latitude);

    },

    fail: function (res) {

        console.log(res)

    }

});

返回:{"errMsg":"getLocation:fail 1"}

在获取位置时,微信获取位置权限和小程序获取位置权限是打开的,手机定位 位置也是开启状态,是因为什么情况一直走fail错误的返回。其他机型又是好的

1 回复
nalu
nalu1 楼5 年前

微信有开启定位权限吗?手机GPS功能呢,有开启吗?