- 定位开关有时候能显示,有时候不显示(可附上截图)
- 定位信息获取不到
- 没有
-
wx.openSetting({
success(res) {
console.log(res.authSetting)
if (res.authSetting["scope.userLocation"]) {
// res.authSetting["scope.userLocation"]为trueb表示用户已同意获得定位信息,此时调用getlocation可以拿到信息
wx.getLocation({
type: 'wgs84',
success(res) {
const latitude = res.latitude
const longitude = res.longitude
const speed = res.speed
const accuracy = res.accuracy
}
})
}
}
})
已授权的没显示吗?
之前那会可以去这里选择,现在是我选择授权,这里也不会显示。
如果是之前没有授权记录,在哪里是不没显示的
但是我之前 没授权, 他这里也会显示呀
现在是我 加上授权定位那个方法, 然后会跳到设置这个页面,但是里面啥也没有。
提供下你的测试代码片段