美文网首页
getLocation:fail the api need to

getLocation:fail the api need to

作者: 月夜一千 | 来源:发表于2023-11-12 09:30 被阅读0次

微信开发工具报:getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json
手机上显示正常,能定位
经查 app.json 文件上需要添加 requiredPrivateInfos 。因为使用的是uniapp开发,在manifest.json上手动输入

"permission": {
    "scope.userLocation": {
      "desc": "为用户提供周边设施便捷查询"
    }
 },
// 需要添加这个
"requiredPrivateInfos": [
   "getLocation"
 ],

相关文章

网友评论

      本文标题:getLocation:fail the api need to

      本文链接:https://www.haomeiwen.com/subject/cxwlwdtx.html