wx.getLocation fail res
{errMsg: “getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json”}
app.json
{
“permission”: {
“scope.userLocation”: {
“desc”: “你的位置信息将用于小程序位置接口的效果展示”
},
“requiredPrivateInfos”:[
“chooseAddress”,
“chooseLocation”,
“choosePoi”,
“getLocation”,
“onLocationChange”,
“startLocationUpdateBackground”,
“startLocationUpdate”
“chooseLocation”,
“choosePoi”,
“getLocation”,
“onLocationChange”,
“startLocationUpdateBackground”,
“startLocationUpdate”
]
}
}