使用
var that = this
uni.chooseLocation({
success: (res) => {
if (type == 0) {
that.formData.startAddress = res.name
that.formData.startLocation = res.latitude + "," + res.longitude
} else if (type == 1) {
that.formData.endAddress = res.name
that.formData.endLocation = res.latitude + "," + res.longitude
}
//that.mapChange()
}
})
#报错
[JS Framework] Failed to execute the callback function:
TypeError: Cannot read property 'pageIndex' of null
16:46:06.600 reportJSException >>>> exception function:__WEEX_CALL_JAVASCRIPT__, exception:JavaScript execute error!Uncaught TypeError: Cannot read property 'pageIndex' of null
at (/__uniappchooselocation.js.nvue:32:16971)
0 个回复