为什么报错movie 未定义呢?
来源:13-9 电影详情页面(1)获取电影详情数据

慕函数311512
2021-05-19
properties: {
movie:Object
},
methods: {
onGoToDetail(event){
console.log(event.properties.movie.id)
// const mid=event.properties.movie.id
wx.navigateTo({
url:’/pages/movie-detail/movie-detail?mid=’+mid
})
}
}
报错:
TypeError: Cannot read property ‘movie’ of undefined
at se.onGoToDetail (index.js? [sm]:22)
at Object.n.safeCallback (VM2429 WAService.js:2)
at VM2429 WAService.js:2
at a (VM2429 WAService.js:2)
at VM2429 WAService.js:2
at n (VM2429 WAService.js:2)
at VM2429 WAService.js:2
at VM2429 WAService.js:2
at i (VM8 asdebug.js:1)
at c (VM8 asdebug.js:1)
写回答
1回答
-
说明你这个 move没有传递过来,检查下代码
032021-05-20
相似问题
postList 报错为未定义
回答 4
关于onGotoMore传参的修改
回答 1
电影播放出现postLit没定义的bug
回答 2
请问这个错误是什么意思
回答 3
能拿到数据但是绑定到页面上不显示
回答 2