苹果7 getLocation 定位失败
发布于 5 年前 作者 rguo 6783 次浏览 来自 问答

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 回复

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

回到顶部