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,
SQL Server Database Glossary CSS Animation effect dedecms Website is hacked How to solve hijacking to other websites Count the number of letters (java Language implementation )Java Basics ( Three ) String In depth analysis The difference between static method and non static method And storage location Django Personal blog building tutorial --- Time classified archiving Keras Save and load model (JSON+HDF5)hive Summary of processing methods for a large number of small files Website mobile phone number capture method