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

修改登录逻辑

parent 4b16a975
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
} }
NSString * urlString = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodCheckWechatBinding]; NSString * urlString = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodCheckWechatBinding];
urlString = @"http://yapi.quantgroups.com/mock/305/vcc/external/login/weChat_opId"; // urlString = @"http://yapi.quantgroups.com/mock/305/vcc/external/login/weChat_opId";
NSDictionary * infoDic = @{@"unionid":self.wechatInfoModel.unionid}; NSDictionary * infoDic = @{@"unionId":self.wechatInfoModel.unionid};
[QGHUDManager showHud:nil]; [QGHUDManager showHud:nil];
[[QGTalosNetwork shareManager] POST:urlString parameters:infoDic success:^(id _Nonnull responseObject) { [[QGTalosNetwork shareManager] POST:urlString parameters:infoDic success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud]; [QGHUDManager hideHud];
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
- (void)checkAppleBinding - (void)checkAppleBinding
{ {
NSString * urlString = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodCheckAppleBinding]; 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]; [QGHUDManager showHud:nil];
NSDictionary * infoDic = @{@"identityToken" : self.appleInfoModel.identityToken, NSDictionary * infoDic = @{@"identityToken" : self.appleInfoModel.identityToken,
@"authorizationCode" : self.appleInfoModel.authorizationCode, @"authorizationCode" : self.appleInfoModel.authorizationCode,
...@@ -169,19 +169,24 @@ ...@@ -169,19 +169,24 @@
//请求成功 //请求成功
if ([QGBaseNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) { if ([QGBaseNetwork checkBusinessCodeAndCodeWithResponseObjectObject:responseObject]) {
NSDictionary * dataDic = responseObject[@"data"]; NSDictionary * dataDic = responseObject[@"data"];
//0:未绑定,1:已绑定 //0:未绑定,1:已绑定 2 :校验未通过
BOOL checkStatus = [dataDic[@"checkStatus"] boolValue]; 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 loginSuccessSaveUserInfo:dataDic[@"loginInfo"]];
//关闭页面 //关闭页面
[self performSelector:@selector(dismissPressed) withObject:nil afterDelay:0.2]; [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 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