# Object wx.getLaunchOptionsSync()

Obtains the parameters upon Mini Game startup.

# Return Values

# Object

Startup parameters

Property Type Description
scene number The scene value for Mini Game startup
query Object The query parameter for Mini Game startup
shareTicket string The shareTicket. See Obtaining More Forwarded Information for details.
referrerInfo object The source information. This is returned when a user enters the Mini Program from another Mini Program, Official Account, or app. Otherwise, {} is returned. (see the Note below for details.)

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.

# Scenes that Return Valid referrerInfo

Scene Value Scene Meaning of appId
1020 Related Mini Program list in the profile page of an Official Account Source Official Account
1035 Custom menu of an Official Account Source Official Account
1036 Message card shared from an app Source app
1037 Mini Program opened from a Mini Program Source Mini Program
1038 Returned from another Mini Program Source Mini Program
1043 Template message of an Official Account Source Official Account

# Notes

In some versions, when there is no referrerInfo, the value undefined is returned. You can use options.referrerInfo && options.referrerInfo.appId to make a judgment.

点击咨询小助手