现在这样是不能获取用户的昵称和头像了吗?
register:function(){
uni.login({
provider:“weixin”,
success:function(resp){
// console.log(resp.code)
let code=resp.code
uni.getUserInfo({
provider:“weixin”,
success:function(resp){
let nickName=resp.userInfo.nickName
let avatarurl=resp.userInfo.avatarurl
console.log(nickName)
console,log(avatarurl)
}
})
}
})
登录后可查看更多问答,登录/注册