基础库 1.1.0 开始支持,低版本需做兼容处理
获取第三方平台自定义的数据字段。
object参数说明:
参数 | 类型 | 必填 | 返回 |
---|---|---|---|
success | function | 否 | 返回第三方平台自定义的数据 |
fail | function | 否 | 接口调用失败的回调函数 |
complete | function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
success返回参数说明:
参数 | 类型 | 说明 |
---|---|---|
errmsg | string | 调用结果 |
extconfig | object | 第三方平台自定义的数据 |
wx.getextconfig
暂时无法通过wx.caniuse
判断是否兼容,开发者需要自行判断wx.getextconfig
是否存在来兼容示例代码:
if(wx.getextconfig) {
wx.getextconfig({
success: function (res) {
console.log(res.extconfig)
}
})
}
基础库 1.1.0 开始支持,低版本需做兼容处理
获取第三方平台自定义的数据字段的同步接口。
返回说明:
参数 | 类型 | 说明 |
---|---|---|
extconfig | object | 第三方平台自定义的数据 |
wx.getextconfigsync
暂时无法通过wx.caniuse
判断是否兼容,开发者需要自行判断wx.getextconfigsync
是否存在来兼容示例代码:
let extconfig = wx.getextconfigsync? wx.getextconfigsync(): {}
console.log(extconfig)