uni-app hbuilder升级到4.24版本后自定义基座运行uni.getLocation中的address对象值为空 但4.15版本正常
uni-app hbuilder升级到4.24版本后自定义基座运行uni.getLocation中的address对象值为空 但4.15版本正常
信息类别 | 详细信息 |
---|---|
产品分类 | uniapp/App |
PC开发环境 | Windows |
PC版本号 | Windows 10 家庭中文版 |
HBuilderX | 正式 |
HBuilderX版本 | 4.24 |
手机系统 | HarmonyOS NEXT |
手机版本号 | HarmonyOS NEXT Developer Preview |
手机厂商 | 华为 |
手机机型 | nova 11 |
页面类型 | vue |
vue版本 | vue3 |
打包方式 | 云端 |
项目创建方式 | HBuilderX |
操作步骤:
uni.getLocation({
//isHighAccuracy: true, // 开启地图精准定位
type: 'gcj02', // 坐标系类型
geocode: true,
success: function(res) {
console.log("address", res.address)
}
});
预期结果:
{
"country": "中国",
"province": "广东省",
"city": "广州市",
"district": "xx",
"street": "xx",
"streetNum": "xx",
"poiName": "xx",
"cityCode": "xx"
}
实际结果:
{
"country": "",
"province": "",
"city": "",
"district": "",
"street": "",
"streetNum": "",
"poiName": "",
"cityCode": ""
}
bug描述:
hbuilder升级到到4.24版本自定义基座运行uni.getLocation 中的 address 为空 但是4.15版本是正常的
更多关于uni-app hbuilder升级到4.24版本后自定义基座运行uni.getLocation中的address对象值为空 但4.15版本正常的实战教程也可以访问 https://www.itying.com/category-93-b0.html
4 回复
版本号子增重新打包自定义基座重新运行自定义基座试试
更多关于uni-app hbuilder升级到4.24版本后自定义基座运行uni.getLocation中的address对象值为空 但4.15版本正常的实战教程也可以访问 https://www.itying.com/category-93-b0.html
还是不行
回复 迷你猩: 代码粘贴我看下
回复 jgj_app: 找到问题了,是打包的时候修改包名导致的,包名和生成高德的key的包名不一致。谢谢