<button class="cu-btn bg-blue lg shadow" @click="bindGetUserInfo">点击授权登录</button>
js部分
bindGetUserInfo(e) {
let _this = this
uni.getUserProfile({
desc:'weixin',
success:res=>{
_this.login(res.userInfo.avatarUrl)
console.log(res,'授权成功');
},
fail:err=>{
console.log(err,'失败授权')
}
})
},