收藏
回答

wx.getExtConfig体验版本调试模式好使,非调试模式就获取不到配置信息

问题模块
API和组件

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

最后一次编辑于  2017-11-22  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答