Cannot read property 'getUserInfo' of undefined?
请大神伸出援手,万分感谢!
onLoad(e) {
var that = this;
wx.getUserInfo({
success(res) {
wx.u.getUserInfo().then(res1 => { //红褐色部分为提示错误处
var bmobUser = res1.result;
if (bmobUser.avatarUrl == ‘’ || bmobUser.avatarUrl == undefined) {
wx.u.changeUserInfo(res.userInfo.avatarUrl, res.userInfo.nickName).then(res2 => { });
}
})
that.setData({
userInfo: res.userInfo
})
}
})
},