/载入函数
onLoad: function (knowledge) {
this.setData({
movieId: knowledge.knowledge,
}) var that=this;
// 获取视频信息
wx.request({
url: 'https://www.utf-8.club/www/teach/mmovie_getNewMovieMaterialByPage?page=1',
header: {
'content-type': 'application/json'
},
success: function (res) {
console.log(res.data);
that.setData({
movieInfo1: res.data.materialModelList,
})
console.log(movieInfo1);
}
})
},
其中movie Info1的值确实修改成功也在页面里成功显示了,但到 console.log(movieInfo1); 时,报错:movieInfo1 undefined
相似问题