# wx.onShow(function callback)

Listens on the event that the Mini Game is switched to the foreground.

# Parameters

# function callback

The callback function for the event that the Mini Game is switched to the foreground.

# Parameters

# Object res
Property Type Description
scene string Scene value
query Object Query parameter
shareTicket string shareTicket
referrerInfo object This field is returned when the Mini Game is opened from another Mini Program, Official Account, or app.

referrerInfo is composed as follows

Property Type Description
appId string The appId of the source Mini Program, Official Account, or app.
extraData object The data transfered from the source Mini Program, supported when scene=1037 or 1038.
点击咨询小助手