支付宝小程序插件 相关API
my.getParentAppIdSync
版本需求: 基础库 1.21.0 开始支持,低版本需做 兼容处理。
该 API 用于在插件中获取小程序的 appId。
返回值
| 属性 | 类型 | 说明 |
|---|---|---|
| appId | String | 使用该插件的小程序 appId |
示例代码
const appIdRes = my.getParentAppIdSync();
console.log(appIdRes.appId);
版本需求: 基础库 1.21.0 开始支持,低版本需做 兼容处理。
该 API 用于在插件中获取小程序的 appId。
| 属性 | 类型 | 说明 |
|---|---|---|
| appId | String | 使用该插件的小程序 appId |
const appIdRes = my.getParentAppIdSync();
console.log(appIdRes.appId);