今天用uniapp调用用户地址时,发现了一个错误:
后面发现,自 2022 年 7 月 14 日起,开发者在使用地理位置相关接口时,需要提前在 app.json 中进行配置。 网址:地理位置接口新增与相关流程调整 | 微信开放社区 (qq.com)
开发者均需要在 app.json 中 requiredPrivateInfos 配置项中声明,
app.json 里面
"requiredPrivateInfos" : [
"chooseAddress"
]
其他配置:uni.chooseAddress(OBJECT) | uni-app官网 (dcloud.net.cn)
"mp-weixin": {
"requiredPrivateInfos": [
"chooseAddress"
],
}
调用成功后,会出现下面的页面。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有