4***@qq.com
4***@qq.com
  • 发布:2021-02-26 10:53
  • 更新:2021-05-14 09:45
  • 阅读:526

iOS uni.login微信没有返回数据(HbuilderX版本3.1.3)

分类:uni-app

用iOS自定义调试基座 登录微信,可以正常拉起微信和登录并返回程序,不报错
但是成功以后不调用success,fail,complete里任何一个。

前些天还是可以的 这些天忽然不好用了,更新到最新版本也没用

HbuilderX版本3.1.3

uni.getProvider({    
                service: 'oauth',    
                success: (res) => {    
                    //支持微信、qq和微博等    
                    if (res.provider.indexOf('weixin') >= 0) {    
                        uni.login({  
                          provider: 'weixin',  
                          success: (loginRes) => {  
                            console.log(loginRes)  
                            this.authInfo = {}  
                            this.authInfo.auth_tag = "weapp_openid";  
                            this.authInfo.auth_openid = loginRes.authResult.openid;  
                            uni.getUserInfo({  
                                success: res => {  
                                    console.log(res)  
                                    this.userInfo = res.userInfo;  
                                    if (this.userInfo.avatarUrl != '') this.authInfo.headimg = this.userInfo.avatarUrl;  
                                    if (this.userInfo.nickName != '') this.authInfo.nickname = this.userInfo.nickName;  
                                    this.authLogin()  
                                },  
                                fail: (err) =>{  
                                    console.log("loginfailed2", err)  
                                },    
                                complete(e) {    
                                    console.log(e);    
                                }   
                            });  
                          },  
                          fail: (err) =>{  
                            console.log("loginfailed", err)  
                          },    
                            complete(e) {    
                                console.log(e);    
                            }   
                        });   
                    }    
                }    
            }); 
2021-02-26 10:53 负责人:无 分享
已邀请:
turtle

turtle

我也碰到了这个问题,请问解决了吗

夏天的橙子

夏天的橙子

我现在ios也是不行,支付的代码从之前项目的代码复制过来的都不行,版本3.1.12

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