为什么我的wx.getUserInfo获取不了实际数据?
getusername: function(){
var that = this
wx.getUserInfo({
success: function(res) {
console.log('success',res)
that.setData({
name:res.userInfo.nickName,
path:res.userInfo.avatarUrl
});
},
fail:function(res){
console.log('fail')
}
})
},
[图片]