第三方平台在提交小程序审核时,提示:
{
"errcode": 61040,
"errmsg": "代码中含有ext.json未配置隐私接口getLocation(暂无权限),请配置并申请权限或者承诺不使用这些接口(设置参数privacy_api_not_use为true)后再提交审核。 rid: 63ee1d14-19c81fe0-32bccabf"
}
在提交代码审核时,已经传参「privacy_api_not_use」为「true」,具体的参数提交如下:
{
"app_id": "wx957ee1e2cbcc03ab",
"privacy_api_not_use": true,
"item_list": [
{
"address":"pages/homeRoot/index/index",
"tag":"活动助手 客聚集 活动小博士",
"first_class": "商业服务",
"second_class": "公关/推广/市场调查",
"first_id":402,
"second_id":776,
"title": "活动小博士"
}
]
}
参考链接:https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/code-management/submitAudit.html
首先要申请getLocation权限。然后在ext.json里面的requiredPrivateInfos加上。比如:
{ "pages": ["pages/index/index"], "requiredPrivateInfos": [ "getLocation", "onLocationChange", "startLocationUpdateBackground" "chooseAddress" ] }
https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#requiredPrivateInfos