oppo手机,wx.getLocation()返回结果异常?
发布于 6 年前 作者 fang07 2147 次浏览 来自 官方Issues

为了判断用户是否给微信,小程序开启了位置权限。调用wx.getLocation()接口,每次都是success。即使微信位置权限已经设置为禁止了。另外调用wx.getSystemInfoSync()接口,res.locationAuthorized的值也是错的。使用的手机是,OPPO R9sk. Android版本 6.0.1。

const res = wx.getSystemInfoSync();
console.log('系统定位权限',res.locationAuthorized)
wx.getLocation({
                        success:res=>{
                            console.log(0)
                        },
                        fail:res=>{
                            console.log('fail')
                        }
                    })
1 回复

重新进去也是错误的吗?

回到顶部