2023年4月11日

微信小程序开发——getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json

摘要: getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json 异常解析: app.json中没配置requiredPrivateInfos参数,按下边示例代码配置 阅读全文

posted @ 2023-04-11 18:04 逍遥云天 阅读(735) 评论(0) 推荐(0) 编辑

微信小程序开发——使用高德地图小程序插件获取citycode及异常处理

摘要: 前言: 微信官方提供的小程序API获取定位没有cityCode返回,需要使用腾讯地图或者高德地图等第三方地图的插件获取。 刚好公司有开通高德地图服务,这里就直接用高德地图的微信小程序插件获取定位信息了。 示例代码: 1 /** 2 * 获取当前城市 3 * 1. 用户授权,则保存city_code、 阅读全文

posted @ 2023-04-11 17:09 逍遥云天 阅读(570) 评论(0) 推荐(0) 编辑

导航