发布的小程序获取不到openid
在开发这工具和真机调试情况下都好用,发布后就获取不到什么原因呢
onLaunch: function () {
var that = this;
wx.login({
success: res => {
wx.request({
url: that.globalData.wx_url_1 + res.code + that.globalData.wx_url_2,
success: res => {
wx.getUserInfo({
success: function (res) {
…
}
});
that.globalData.openid = res.data.openid;
}
})
}
});
