为什么报错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
相似问题