微信开发文档:developers.weixin.qq.com/miniprogram…

案例
1、A页面传递
wx.navigateTo({
url: '/pages/index/index',
success: (res) => {
res.eventChannel.emit('selectEmit', { active: { id: 1, name: "张珊" } })
}
})
2、B页面接收
onShow() {
const eventChannel = this.getOpenerEventChannel()
if (eventChannel && eventChannel.on) {
eventChannel.on('selectEmit', (data) => {
const { active } = data
this.setData({ active })
})
}
}
3、B页面接收参数修改后,回传A页面
wx.navigateBack({
delta: 1,
success: (res) => {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
currentPage.setData({active:this.data.active||{}})
}
})