wx.createUserInfoButton授权成功获取的名字出错. rawdata和userinfo里面不一样,我真正名字和头像是nickname,userinfo不 对
代码很简单:
this.button1 = wx.createUserInfoButton({
type: 'text',
text: '',
style: {
left: offx,
top: tops,
width: wids,
height: heis,
lineHeight: heis,
backgroundColor: 'rgba(0,0,0,0)',
color: '#ffffff',
textAlign: 'center',
fontSize: 16,
borderRadius: 4
}
})
this.button1.onTap(function (res) {
if (res.userInfo != undefined) {
console.log(res.userInfo);
});