获取启动参数

业务场景

获取小游戏启动的参数,包括场景值,路径参数,媒体来源等

流程图

接口介绍

SDKManager.getLaunchOptions();

调用示例

const launchInfo = SDKManager.getLaunchOptions();

参数说明

出参:LaunchInfo info

参数名称类型说明
scenestring启动小游戏的场景值
queryobject启动小游戏的 query 参数
referrerInfoobject来源信息。从另一个 App 进入小游戏时返回

错误码

FAQ

更加详细的说明请参考 mt.getLaunchOptionsSync