用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);
}
});
}
}
});
2 个回复
turtle
我也碰到了这个问题,请问解决了吗
夏天的橙子
我现在ios也是不行,支付的代码从之前项目的代码复制过来的都不行,版本3.1.12