定位报错,无法定位,所有权限都已经开启,所有版本受影响,用高德定位,已经旧的版本也是
[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()
// }
// }
// })
}
});
}
1 个回复
DCloud_UNI_Anne
参考:https://ask.dcloud.net.cn/question/195066