2021年4月28日24时,基础库版本很低的使getUserInfo还能获取到用户的昵称和头像么 ?
{
!this.props.userInfo.country && (
<Block>
{
isUseProfile ? <Button className='auth-button' onClick={this.getUserInfoClick} /> :
<Button className='auth-button' openType='getUserInfo' onGetUserInfo={this.getUserInfoClick}></Button>
}
</Block>
)
}
getUserInfoClick = (e) => {
if(wx.getUserProfile) {
getUserInfo(res => {
console.log(res, '存了用户的昵称和头像')
this.props.login(res)
})
} else {
this.props.login(e.detail.userInfo)
}
}