Commit b80bae81 authored by IOS-张 博's avatar IOS-张 博

修改登录逻辑

parent 4b16a975
......@@ -120,8 +120,8 @@
}
NSString * urlString = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodCheckWechatBinding];
urlString = @"http://yapi.quantgroups.com/mock/305/vcc/external/login/weChat_opId";
NSDictionary * infoDic = @{@"unionid":self.wechatInfoModel.unionid};
// urlString = @"http://yapi.quantgroups.com/mock/305/vcc/external/login/weChat_opId";
NSDictionary * infoDic = @{@"unionId":self.wechatInfoModel.unionid};
[QGHUDManager showHud:nil];
[[QGTalosNetwork shareManager] POST:urlString parameters:infoDic success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud];
......@@ -157,7 +157,7 @@
- (void)checkAppleBinding
{
NSString * urlString = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodCheckAppleBinding];
urlString = @"http://yapi.quantgroups.com/mock/305/vcc/external/login/apple_idtoken";
// urlString = @"http://yapi.quantgroups.com/mock/305/vcc/external/login/apple_idtoken";
[QGHUDManager showHud:nil];
NSDictionary * infoDic = @{@"identityToken" : self.appleInfoModel.identityToken,
@"authorizationCode" : self.appleInfoModel.authorizationCode,
......@@ -169,19 +169,24 @@
//请求成功
if ([QGBaseNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
NSDictionary * dataDic = responseObject[@"data"];
//0:未绑定,1:已绑定
BOOL checkStatus = [dataDic[@"checkStatus"] boolValue];
//0:未绑定,1:已绑定 2 :校验未通过
NSInteger checkStatus = [dataDic[@"checkStatus"] integerValue];
//未绑定
if (checkStatus == 0)
{
[Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGBindingPhoneViewController) parameters:@{@"appleInfoModel":self.appleInfoModel} handlerBlock:nil];
}
//已绑定
if (checkStatus){
else if (checkStatus == 1){
//保存登录信息
[self loginSuccessSaveUserInfo:dataDic[@"loginInfo"]];
//关闭页面
[self performSelector:@selector(dismissPressed) withObject:nil afterDelay:0.2];
}
//未绑定
else
//未通过
else if(checkStatus == 2)
{
[Mediator performTarget:ClassNameWithHeadType(QGHeaderTypeQGBindingPhoneViewController) parameters:@{@"appleInfoModel":self.appleInfoModel} handlerBlock:nil];
[QGHUDManager showHud:@"Apple ID登录失效"];
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment