![1***@qq.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/46f5a17530d5c2c8b69023f2ee21bf9e.png)
- 发布:2024-07-22 11:13
- 更新:2024-07-22 14:39
- 阅读:207
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Win11家庭中文版
HBuilderX类型: 正式
HBuilderX版本号: 4.23
手机系统: 全部
手机厂商: 华为
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
App下载地址或H5⽹址: 酒店拾光APP 软件商店下载
测试过的手机:
示例代码:
uni.chooseLocation({
success: function(res) {
that.address = {
address: res.address,
longitude: res.longitude,
latitude: res.latitude,
name: "",
};
console.log(that.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
},
fail(err) {
console.log(err)
}
});
uni.chooseLocation({
success: function(res) {
that.address = {
address: res.address,
longitude: res.longitude,
latitude: res.latitude,
name: "",
};
console.log(that.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
},
fail(err) {
console.log(err)
}
});
操作步骤:
调用选择地址页面,报错,不显示地址信息
调用选择地址页面,报错,不显示地址信息
预期结果:
显示地址信息,可以选择地址
显示地址信息,可以选择地址
实际结果:
不显示地址信息列表
不显示地址信息列表
bug描述:
APP端使用uni.chooseLocation选择地址时报错
[JS Framework] Failed to execute the callback function:
TypeError: Cannot read property 'points' of undefined
10:55:58.405 reportJSException >>>> exception function:WEEX_CALL_JAVASCRIPT, exception:JavaScript execute error!Uncaught TypeError: Cannot read property 'points' of undefined
at (/__uniappchooselocation.js.nvue:1:28376)
1***@qq.com (作者)
替换了之后还是不显示地址列表
2024-07-22 16:11
毛毛不是泰迪
回复 1***@qq.com: 检查一下是不是没替换正确 我按照官方的例子是正确的
2024-07-22 17:47