手机华为P50,使用wx.getSystemInfo方法获取定位权限locationEnabled和locationAuthorized有误,
前提:
- 确认手机设置里面的应用管理的微信已经开启了位置信息和附近设备,
- app.json里面申请了权限相关
- 华为p60和小米及其他安卓手机可以使用
以下具体代码
wx.getSystemInfo({ succsee: res => {
if(res.locationEnabled == false || res.locationAuthorized == false) {
console.log('请打开定位服务功能')
}
} })
