首页 > 其他分享 >uniapp获取位置时显示getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.j

uniapp获取位置时显示getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.j

时间:2023-08-07 17:34:47浏览次数:46  
标签:uniapp getLocation declared app ext json fail requiredPrivateInfos

uniapp获取位置时显示getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json

解决方式:1.manifest.json文件 "mp-weixin" 中添加

"permission" : {
"scope.userLocation" : {
"desc" : "小程序将使用定位功能"
}
},
"requiredPrivateInfos": [
"chooseAddress",
"chooseLocation",
"choosePoi",
"getLocation",
"onLocationChange",
"startLocationUpdateBackground",
"startLocationUpdate"
]

 

标签:uniapp,getLocation,declared,app,ext,json,fail,requiredPrivateInfos
From: https://www.cnblogs.com/shuhan-hou/p/17611980.html

相关文章

  • 2023年8月最新全国省市区县和乡镇街道行政区划矢量边界坐标经纬度地图数据 shp geojso
    发现个可以免费下载全国 geojson 数据的网站,推荐一下。支持全国、省级、市级、区/县级、街道/乡镇级以及各级的联动数据,支持导入矢量地图渲染框架中使用,例如:D3、Echarts等geojson数据下载地址:https://geojson.hxkj.vip该项目github地址:https://github.com/TangSY/echarts-m......
  • How to get User Name from External Login in ASP.NET Core?
    HowtogetUserNamefromExternalLogininASP.NETCore? 回答1DoyouhaveaccesstoSignInManagerorcanyouinjectit?Ifyes,thenthisishowyouwouldaccessuserid(username),email,first&lastname:publicclassMyController:Microsoft.Asp......
  • python esp32 json pyserial
    esp32:#include<ArduinoJson.h>voidsetup(){Serial.begin(9600);}voidloop(){if(Serial.available()){//读取串口输入的数据StringjsonString=Serial.readStringUntil('\n');//创建JSON文档StaticJsonDocument<300>......
  • uniapp 只选择月份与日的时间选择器
    1、使用 <picker> 组件的 mode 属性设置为 "multiSelector",然后通过设置 range 属性来提供可选的月份和日的列表。<template><view><pickermode="multiSelector":range="range"@change="onPickerChange"><viewclass=......
  • 解析json数据导出某个字段的值到excel(记录)
    记录一下导出代码publicstaticvoidmain(String[]args){ //将你的json数据放在txt文档里并复制路径到下面StringfilePath="E:/home/2023年需求/人才/20230801出表/job_mobile_json.txt";//替换成你的文件路径try{Stringcontent=r......
  • Unity用CPU上下翻转Texture2D的最优解
    将Texture2D上下翻转效率的进化史以下数据都是基于8000x4000全景图进行对比的1、最简单也是最先想到的,直接根据索引塞到另一个数组里,耗时:0.3061805秒staticColor32[]FlipColors(Color32[]originalColors,intwidth,intheight){Color32[]......
  • html:去除input/textarea标签的拼写检查
    默认情况下,textarea会启动拼写和语法检查,表现效果就是单词拼写错误会出现红色下划线提示<textarea></textarea>效果有时,我们并不需要拼写检查,可以通过配置属性spellcheck="false"去除拼写和语法检查<textareaspellcheck="false"></textarea>效果参考Input标签自动校验功能去除......
  • uniapp实现左滑删除功能
      <delSlideLeft:item="item":data_transit="{index:index,item:item}"@delItem="delItem"></delSlideLeft><template><view><viewclass="box-slideLeft">......
  • 配置 Sublime Text4为 C++ 编辑器的方法
    概述涉及以下插件的安装和配置PackageControl Terminus LSP LSP-clangd clang-format LSP-pyright LSP-json配置sublime安装PackageControl以进行包管理。Terminus安装Terminus以实现sublimetext4内的terminal。绑定快捷键:[ { "keys":[ "ctrl+shift+t" ], "com......
  • vue--day55--vue 的$nextTick以及MyItem编辑框
    1.语法this.$nextTick(回调函数)2.作用在下一次DOM更新结束后执行其指定的回调3.什么时间用当改变数据后,要基于更新后新的DOM进行某些操作时,要在nextTick所指定的回调函数中执行。1.App.vue<template><divid="root"><divclass="todo-container"><divclass="to......