收藏
回答

200人测试10个手机小程序登陆授权无法调起?兼容问题?

用户点击登陆button之后,opentype是binduserinfo,然后手机上面没有弹起来登陆授权


<button class='save' open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">微信登录button>


bindGetUserInfo(res) {
     let self = this;
     wx.login({
         success: function (code) {
             http.post("user/login", self.getNeedData(res.detail, code.code)).then(msg => {
                 if (msg.code === 1) {
                   wx.setStorageSync("token", msg.data.userinfo.token);
                   wx.setStorageSync("user", msg.data.userinfo);
                   if (msg.data.userinfo.mobile ==''){
                     self.setData({
                       showStatus: true,
                     });
                   }else{
                     wx.switchTab({
                       url: '/pages/index/index',
                     })
                   }
                 }
             }).catch(err => {
                 console.log(err);
             })
         }
     })
 },


最后一次编辑于  2019-09-20
回答关注问题邀请回答
收藏

4 个回答

登录 后发表内容
问题标签