generateAlipayScheme
generateAlipayScheme(options): Object
生成支付宝小程序 scheme
生成可以直接打开支付宝小程序的 scheme
Parameters
| Name | Type | Description |
|---|---|---|
options | Object | scheme 选项 |
options.appId | string | 小程序 appId |
options.page | string | 页面路径 |
options.pageQuery? | Record<string, string | number> | - |
options.globalQuery? | Record<string, string | number> | - |
Returns
Object
生成的 scheme
| Name | Type |
|---|---|
fullScheme | string |
longLink | string | { message: string } |
Example
ts
generateAlipayScheme({
appId: '2021000000000000',
page: 'pages/index/index',
query: { id: '123' }
});
// 返回 "alipays://..."