# uni.getEnterOptionsSync()

Get the parameters at startup.

Note: There are differences in parameter acquisition when each platform is started. The details are as follows:

  • App platform: the return value is consistent with the callback parameter of App.onLaunch;
  • Web platform: The return value is the same as the callback parameter of App.onLaunch, and the support of different Vue versions is different:
    • vue3 project: uni-app 3.2.13+ support;
    • vue2 project: uni-app 3.5.1+ support.
  • Mini Program Platform: If the current Mini Program is cold start, the return value is consistent with the callback parameter of App.onLaunch; if the current Mini Program is hot start, the return value is consistent with App.onShow. For the concept of cold start and warm start of WeChat mini programs, see details

Platform Compatibility Notes

App web 微信小程序 支付宝小程序 抖音小程序 快手小程序 QQ小程序 百度小程序 京东小程序 钉钉小程序 飞书小程序
(3.4.10+) (3.5.1+) x x x x x

Return parameter description

Parameter Name Type Description Platform Difference Description
path String 启动的路径(代码包路径)
scene Number 启动时的场景值,具体值含义请查看各平台文档说明。App、web端恒为 1001。
query Object 启动时的 query 参数
referrerInfo Object 来源信息。如果没有则返回 {}
channel String Returns an empty string if the app does not set a channel ID. The values are as follows Only App supports
launcher String Application launcher source. The values are as follows Only App supports
forwardMaterials Array<Object> The opened file information array, this parameter will only be carried when opened from the chat material scene (scene is 1173) WeChat applet
chatType number The opened file information array, this parameter is only carried when opened from the chat material scene (scene is 1173) Only WeChat applet
apiCategory string API 类别 仅微信小程序(2.20.0+)
showFrom number 唤起小程序的方式,目前取值固定为 10,表示通过 schema 唤起 仅抖音小程序(1.90.0+)
mode 'default' | 'halfPage' Mode to start the applet Only Kuaishou applet

Object referrerInfo

Properties Type Description Platform Difference Description
appId String 来源小程序 appId 其他平台均支持,抖音小程序(1.15.0+)
extraData Object 来源小程序传过来的数据。 其他平台均支持,抖音小程序(1.15.0+)

channel value

Provides 7 channels by default (Google, 360, Xiaomi, Huawei, Apppo, vivo, oppo), more can be found in the manifest.json file [Source view] to configure, details

Default Channel Channel ID
GooglePlay google
App Store yyb
360 App Market 360
Huawei App Store huawei
Xiaomi App Store xiaomi
vivo App Store vivo
oppo app store oppo

launcher value

value description
default The default startup mode, usually means the application list startup (search startup in 360 Assistant)
scheme Trigger startup by urlscheme
push Trigger startup by clicking on the system notification
uniLink Launch app via universal link
miniProgram Launch the app via WeChat Mini Program
shortcut 通过快捷方式启动,iOS平台表示通过3D Touch快捷方式,Android平台表示通过桌面快捷方式启动
barcode 通过二维码扫描启动