button 使用 open-type='getUserInfo' 没有弹出授权
发布于 4 年前 作者 guiyingwei 5514 次浏览 来自 问答

使用button组件登录时,有用户反馈登录不了,点击按钮无反应,也没弹出授权窗口。

初步分析是encryptedData,iv等数据没返回。

ps:调试时即使用户不授权也会弹出授权窗口。

大致代码:

<button class=“loginBtn” open-type=‘getUserInfo’ bindgetuserinfo=‘getUserInfo’>微信登录</button>

getUserInfo: function(e) {
 
    let that = this;
 
    let userInfo = e.detail.userInfo;
 
    let encryptedData = e.detail.encryptedData;
 
    let iv = e.detail.iv;
 
    wx.login({
 
     http.request({
 
            params: {
 
                  code: res.code,
 
                  encryptedData: encryptedData,
 
                  iv: iv
},
 
      })
 
})
 
}
4 回复

问题解决了嘛?解决方案是怎样的能提供一下嘛

有没有解决方法

麻烦提供一下出现问题的机型和微信版本,并且给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

我的手机型号是:华为G9 plus,微信7.0.0,就是这种现象,

button 使用 open-type=‘getUserInfo’ 没有弹出授权

回到顶部