Taro.getLaunchOptionsSync()
Obtains the parameters upon Mini Program startup. The callback parameters are consistent with those of App.onLaunch.
NOTE
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.
Type
() => LaunchOptionsApp
Parameters
API Support
| API | WeChat Mini-Program | H5 | React Native |
|---|---|---|---|
| Taro.getLaunchOptionsSync | ✔️ |