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”
    ]
  }

}

作者 admin

百度广告效果展示