Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program API third-party platform


May 19, 2021 WeChat Mini Program Development Document


Table of contents


wx.getExtConfig(OBJECT)

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

Bug & Tip

  1. 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)
    }
  })
}

wx.getExtConfigSync()

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

Bug & Tip

  1. 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)