May 19, 2021 WeChat Mini Program Development Document
Base library 1.1.0 starts to support, and low versions need to be compatible
Get data fields customized by third-party platforms.
OBJECT parameter description:
Parameters | Type | Required | Return |
---|---|---|---|
success | Function | Whether | Returns data customized by a third-party platform |
fail | Function | Whether | The interface calls the failed callback function |
complete | Function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
Success returns a description of the parameters:
Parameters | Type | Description |
---|---|---|
errMsg | String | The result of the call |
extConfig | Object | Data customized by third-party platforms |
wx.getExtConfig
unable to determine compatibility
wx.canIUse
and developers need to determine
wx.getExtConfig
exists to be compatible
Example code:
if(wx.getExtConfig) {
wx.getExtConfig({
success: function (res) {
console.log(res.extConfig)
}
})
}
Base library 1.1.0 starts to support, and low versions need to be compatible
Gets the synchronization interface for data fields customized by third-party platforms.
Return to the instructions:
Parameters | Type | Description |
---|---|---|
extConfig | Object | Data customized by third-party platforms |
wx.getExtConfigSync
temporarily unable to determine compatibility through
wx.canIUse
developers need to determine for themselves
wx.getExtConfigSync
exists to be compatible
Example code:
let extConfig = wx.getExtConfigSync? wx.getExtConfigSync(): {}
console.log(extConfig)