以下是代代码传出来的数据结构不一致了,无法按类渲染
//js代码
success:function(res){
console.log('发送信息成功',res.data);
var result = JSON.stringify(res.data.result);
// console.log('123',result);
wx.navigateTo({
url:"/pages/Show/Show",
success: function(res) {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit('acceptDataFromOpenerPage', { data:result })
}
})
},
onLoad: function(option){
var that = this
const eventChannel = this.getOpenerEventChannel()
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
eventChannel.on('acceptDataFromOpenerPage', function(data) {
console.log('接收信息成功',data)
that.setData({
data:data
})
})
}