有木有
有木有
  • 发布:2021-04-06 18:03
  • 更新:2021-04-15 10:26
  • 阅读:2752

uniapp 微信小程序授权登录没有用户信息

分类:uni-app

uniapp 微信小程序授权登录没有用户信息
小程序那边好像换到getUserProfile了
主要是uni.getUserInfo接口小程序那边好像变了
有没有解决方案啊

2021-04-06 18:03 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

用uni.getUserProfile 这个方法得用点击事件click触发 所以之前那种button里的内容要改
<button class='bottom' type='primary' withCredentials="true" lang="zh_CN" @click="appLoginWx" ></button>

appLoginWx(){
uni.getUserProfile({
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {

        }  
})  

}

2***@qq.com

2***@qq.com

同求

惊天

惊天 - uni 开发

小程序端可以直接用 wx. getUserProfile

chenli

chenli

1***@qq.com

1***@qq.com

你们用的 @dcloudio/types@2.0.28 这个依赖库吗?我这里没有uni.getUserProfile()

该问题目前已经被锁定, 无法添加新回复