1***@qq.com
1***@qq.com
  • 发布:2025-06-04 11:32
  • 更新:2025-06-04 18:58
  • 阅读:39

【报Bug】uni.chooseLocation出错

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win11

HBuilderX类型: 正式

HBuilderX版本号: 4.66

手机系统: Android

手机系统版本号: Android 16

手机厂商: 小米

手机机型: 小米14

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

uni.chooseLocation({
success: function (res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
},

操作步骤:

uni.chooseLocation({
success: function (res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
},
出现reportJSException >>>> exception function:WEEX_CALL_JAVASCRIPT, exception:JavaScript execute error!Uncaught TypeError: Cannot read property 'pageIndex' of null
at (/__uniappchooselocation.js.nvue:32:16971)

预期结果:

能正常使用

实际结果:

reportJSException >>>> exception function:WEEX_CALL_JAVASCRIPT, exception:JavaScript execute error!Uncaught TypeError: Cannot read property 'pageIndex' of null
at (/__uniappchooselocation.js.nvue:32:16971)

bug描述:

uni.chooseLocation({
success: function (res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
}报错,真机上面不能够选择点,
使用uni.getLocation是正常的,高德地图的key也是一致的

2025-06-04 11:32 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

你可以看一下是不是地图厂商那边,接口用量是不是受限了

要回复问题请先登录注册