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

发布于 7 年前作者 jun4715432 次浏览最后编辑 7 年前来自 ask

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

0 回复
暂无回复