收藏
回答

oppo a5 位置服务已打开 wx.getSystemInfoSync()中权限错误

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug getSystemInfoSync 微信安卓客户端 8.0.7 暂时未知

oppo a5 位置服务已打开 wx.getSystemInfoSync()locationEnabled不是true

const sysInfo = wx.getSystemInfoSync();
if(!sysInfo.locationEnabled){
  wx.showToast({
      title: '位置服务(GPS)未开启',
      icon: 'error',
      duration: 2000
    })
}

微信版本8.0.7

手机型号 oppo a5

coloros版本 5.2.1

安卓版本8.1.0

最后一次编辑于  2021-07-06
回答关注问题邀请回答
收藏

1 个回答

  • 安逸
    安逸
    2021-07-06

    检查:

    1.没有给微信应用授权位置权限

    2.系统位置服务未开启

    2021-07-06
    有用
    回复 3
    • 卡卡
      卡卡
      2021-07-06
      这个判断应该是gps是否开启,微信授权是另一个字段,会互相影响吗,看其他手机是没有影响的,不给微信授权,也可以拿到gps的开关状态
      2021-07-06
      回复
    • 卡卡
      卡卡
      2021-07-06
      系统位置已经开启了
      2021-07-06
      回复
    • while True
      while True
      2021-12-28回复卡卡
      我也遇到了这个问题,请问您解决了吗?
      2021-12-28
      回复
登录 后发表内容