Parent page
const app = getApp() Page({ jump: function () { wx.navigateTo({ url: './test',
events: { // Listen to the parent acceptDataFromOpenedPage acceptDataFromOpenedPage: function (data
) { console.log(data) }, }, success: function (res) {
// triggers acceptDataFromOpenerPage res.eventChannel.emit('acceptDataFromOpenerPage',
{ data: 'send from opener page' }) } }) }, })
Page({ onLoad: function (option) { // obtain EventChannel object const eventChannel = this
.getOpenerEventChannel() // Trigger parent acceptDataFromOpenedPage eventChannel.emit(
'acceptDataFromOpenedPage', { data: 'send from opened page' }); //
Monitor acceptDataFromOpenerPage eventChannel.on('acceptDataFromOpenerPage', function
(data) { console.log(data) }) } })

©2019-2020 Toolsou All rights reserved,
Final review of database : Summary of comprehensive application questions Laplance operator ( Second derivative ) Simple learning of computer composition principle pyqt Button call python program _PyQt: Link button to function in program How much can you go up once you change jobs ? Today, I saw the ceiling of job hopping python in str Function usage _python in str Usage Summary of built-in functions MySQL trigger web The server nginx---linux Installation and deployment C++ Chapter V polymorphism exercises :( It's coming to an end )python Check built-in functions , How to check python Built in function