# wmpf.Channel.on(string event, function callback)
Monitoring of registered third parties App Service events
# parameter
# Object object
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
event | string | yes | The name of the event that needs listening | |
callback | function | yes | callback |
# object.callback callback
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
data | string | third party app through wmpf Data transmitted to the Mini Program |
# sample code
wmpf.Channel.on('test', (res) => {
console.log(res.data)
})