getEnterOptions(params: Object)
Requires:
MiniKit≥1.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
Description
Get the parameters for this miniapp launch. If it is a cold start, the return value matches the App.onLaunch callback parameters; if it is a warm start, it matches App.onShow.
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | MiniKit Since |
|---|---|---|---|
path | string | Path used to launch the miniapp (code package path) | v3.2.0 |
scene | 1000 | 1001 | 1002 | Launch scene value | v3.15.0 |
| Query parameters used to launch the miniapp | v3.2.0 | ||
| Share/forward | v3.2.0 | ||
apiCategory | string | API category: default - default category; embedded - embedded; miniapps opened via the half-screen miniapp capability | v3.2.0 |
| Extra parameters for launching the miniapp, typically container-added, non-business parameters | v3.21.0 | ||
renderer | string | Rendering type: native indicates Lynx self-rendering; empty/other indicates Web | v3.37.0 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
success.params.scene
| Value | Description | MiniKit Since |
|---|---|---|
1000 | Default value | v3.15.0 |
1001 | Launched via the Recently Used Mini Programs list | v3.15.0 |
1002 | Launched via URL mapping | v3.15.0 |