阅读(2107) (7)

支付宝小程序插件 相关API

2020-09-07 11:42:48 更新

my.getParentAppIdSync

版本需求: 基础库 1.21.0 开始支持,低版本需做 兼容处理

该 API 用于在插件中获取小程序的 appId。

返回值

属性 类型 说明
appId String 使用该插件的小程序 appId

示例代码

const appIdRes = my.getParentAppIdSync();
console.log(appIdRes.appId);