1***@qq.com
1***@qq.com
  • 发布:2020-06-20 17:20
  • 更新:2020-06-20 17:20
  • 阅读:1523

IOS授权登录小程序 一直登录失败 安卓能正常登录使用

分类:uni-app

getUserInfo:function(e){
let that = this;
console.log(e);
console.log(e.detail.userInfo);
uni.login({
success:function(res){
console.log(res);
if(res.code){
// let that = this;
uni.getStorage({
key:"access_token",
success:function(e1){
console.log(e1);
console.log('333');

                                    com.requst(com.interfaceUrl.login,'POST',{  
                                        "code":res.code,  
                                        "_version":"2.8.9",  
                                        "_platform":"wx",  
                                        "user_info":JSON.stringify(e.detail.userInfo),  
                                        "encrypted_data":e.detail.encryptedData,  
                                        "iv":e.detail.iv,  
                                        "signature":e.detail.signature,  
                                        "parents":e1.data  
                                    },function(res){  
                                        console.log(res);  
                                        if(res.data){  
                                            uni.setStorage({  
                                                key:"info",  
                                                data:res.data,  
                                            })  
                                            that.$emit("getUserInfo",res.data)  
                                        }  

                                    })  

                            },  
                            fail() {  
                                com.requst(com.interfaceUrl.login,'POST',{  
                                    "code":res.code,  
                                    "_version":"2.8.9",  
                                    "_platform":"wx",  
                                    "user_info":JSON.stringify(e.detail.userInfo),  
                                    "encrypted_data":e.detail.encryptedData,  
                                    "iv":e.detail.iv,  
                                    "signature":e.detail.signature,  
                                    "parents":1  
                                },function(res){  
                                    console.log(res);  
                                    if(res.data){  
                                        uni.setStorage({  
                                            key:"info",  
                                            data:res.data,  
                                        })  
                                        that.$emit("getUserInfo",res.data)  
                                    }  

                                })  
                            }  
                        })  

                    }  
                }  
            })  
        },  
        geiuserfalse:function(){  
            console.log(33);  
            this.$emit('geiuserfalse','-1')  
        }
2020-06-20 17:20 负责人:无 分享
已邀请:

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