wx.getExtConfig体验版本调试模式好使,非调试模式就获取不到配置信息
发布于 6 年前 作者 jun47 15360 次浏览 来自 问答

if (wx.getExtConfig) {

wx.getExtConfig({

success: function (res) {

console.log(res.extConfig)

console.log(res.extConfig.host)

getApp().globalData.API_URL = res.extConfig.host;

getApp().globalData.merchantId = res.extConfig.merchantId;

getApp().globalData.appid = res.extConfig.appid;

getApp().globalData.appSecret = res.extConfig.appSecret;

}

})

console.log(’&&&&&&’+that.globalData.API_URL)

}

appid:wx27fe3df512cfbb03

回到顶部