1.页面跳转时向子页面传入数据
父页面js
goexit() {//跳转方法var data = JSON.stringify(this.data.data.follow) // this.data.data.follow为子页面需要的数据(数组) 必须经过转换方可以传递 wx.navigateTo({url: './Editorfollowup/Editorfollowup?data=' + data })},
子页面js
/*** 生命周期函数--监听页面加载*/onLoad: function (options) {var data = JSON.parse(options.data) //将数据格式转换回原来的格式this.setData({data: data })},
然后就可以将数据绑定在子页面上了
原文连接 /weixin_34401479/article/details/87112024 这里边还有对象的传递