brisk21
brisk21
  • 发布:2024-07-22 09:15
  • 更新:2024-07-22 14:46
  • 阅读:230

app定位失败,报错 Cannot read property 'points' of undefined

分类:uni-app

定位报错,无法定位,所有权限都已经开启,所有版本受影响,用高德定位,已经旧的版本也是

[JS Framework] Failed to execute the callback function:
TypeError: Cannot read property 'points' of undefined
09:09:12.224 reportJSException >>>> exception function:WEEX_CALL_JAVASCRIPT, exception:JavaScript execute error!Uncaught TypeError: Cannot read property 'points' of undefined
at (/__uniappchooselocation.js.nvue:1:28376)

请求代码:

// 打开地图选择地址
chooseLocation() {
uni.chooseLocation({
success: (res) => {
console.log(res);
updateUserInfo({
longitude: res.longitude,
latitude: res.latitude
}).then(res1 => console.log(res1.data.msg))
this.$store.commit('getAddress', res.name)
},
fail: (e) => {
// 定位权限未开启,引导设置
// uni.showModal({
// title: '温馨提示',
// content: e,
// confirmText: '去设置',
// success: (res) => {
// if (res.confirm) {
// //打开授权设置
// gotoAppPermissionSetting()
// }
// }
// })
}
});
}

2024-07-22 09:15 负责人:无 分享
已邀请:

要回复问题请先登录注册