微信小程序 同—页面两个方法之间怎么传递数组?
sortTopic: function (t) {
var e = this;
var list = e.data.list;
for (let i = 0; i < list.length; i++) {
images.push({
height:0,
cover_pic: list[i].cover_pic,
name: list[i].title,
id: list[i].id,
})
}
console.dir(images);
this.setData({
images: images
})
},
loadImages: function () {
let images = this.data.images;
console.log(images);
},
这样调用为什么loadImages里边的images是空的