用uni.getUserProfile 这个方法得用点击事件click触发 所以之前那种button里的内容要改 <button class='bottom' type='primary' withCredentials="true" lang="zh_CN" @click="appLoginWx" ></button> appLoginWx(){ uni.getUserProfile({ desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 success: (res) => { } }) }
LikeU恋爱交友
可以了,这是正解,感谢
2021-06-20 12:42