Skip to content

gangu v0.4.0Docs


gangu v0.4.0 / launchMiniProgram

Function: launchMiniProgram()

launchMiniProgram(params): void

web页面中使用 明文URL Scheme 启动小程序

需要在MP平台->设置->隐私与安全->明文Scheme声明小程序路径。参考: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/url-scheme.html#明文-URL-Scheme

Parameters

params

params.appId: string

小程序的appId,用于标识特定的小程序

params.path: string

小程序的启动路径,用于指定小程序启动时的页面

params.query: Record<string, any>

以对象形式传递给小程序的查询参数,用于传递额外信息给小程序的query

Returns

void

Defined in

launchMiniProgram.ts:11