# uni.getLaunchOptionsSync()

Get the parameters at startup. The return value is consistent with the callback parameter of App.onLaunch

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

There are differences in the support of different Vue versions of the web platform:

  • vue2 project: uni-app 3.5.1+ support
  • vue3 project: uni-app 3.2.13+ support

Return parameter description

Parameter Name Type Description Platform Difference Description
path String 启动的路径(代码包路径,注意:App 端开发过程中热更新会直达当前页面,此时启动路径为当前页面路径)
scene Number 启动时的场景值,具体值含义请查看各平台文档说明。App、web端恒为 1001。钉钉小程序在 IDE 恒为0000,真机不支持。
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 is only carried when opened from the chat material scene (scene is 1173) WeChat applet, QQ applet
entryDataHash string Group entry information, which can be obtained through the applet opened in the group app store and group sharing card Only QQ 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
subScene string Sub scene value (definition to be added) Only Feishu 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 通过二维码扫描启动