修复bug
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
[Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
userInfo = [UserInfoModel modelWithDictionary:data.data];
|
||||
[AccountInfoStorage instance].name = userInfo.nick;
|
||||
homeUserModel.nick = userInfo.nick;
|
||||
homeUserModel.avatar = userInfo.avatar;
|
||||
homeUserModel.isBindPhone = userInfo.isBindPhone;
|
||||
@@ -55,37 +56,19 @@
|
||||
} uid:accountModel.uid];
|
||||
});
|
||||
|
||||
__block NSString *isFlag = @"";
|
||||
|
||||
|
||||
if(isLoginPhone == YES){
|
||||
dispatch_group_enter(group);
|
||||
dispatch_async(queue, ^{
|
||||
[Api requestAuthorizationCodeInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 200){
|
||||
isFlag = [data.data boolValue] == YES ? @"1" : @"0" ;
|
||||
}else{
|
||||
isFlag = @"2";
|
||||
}
|
||||
dispatch_group_leave(group);
|
||||
}];
|
||||
});
|
||||
}
|
||||
|
||||
dispatch_group_notify(group, dispatch_get_main_queue(), ^{
|
||||
[XNDJTDDLoadingTool hideOnlyView:VC.view];
|
||||
if ([[AccountInfoStorage instance] getTicket].length <= 0 || userInfo == nil || [isFlag isEqualToString:@"2"]) {
|
||||
if ([[AccountInfoStorage instance] getTicket].length <= 0 || userInfo == nil) {
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"LoginPresenter1")];
|
||||
return;
|
||||
}
|
||||
[[AccountInfoStorage instance]saveHomeUserInfo:homeUserModel];
|
||||
if (userInfo.nick == nil || userInfo.avatar == nil) {
|
||||
if([isFlag isEqualToString:@"0"]){
|
||||
XPLoginAuthCodeVC *vc = [[XPLoginAuthCodeVC alloc]init];
|
||||
vc.pi_isPush = YES;
|
||||
[VC.navigationController pushViewController:vc animated:YES];
|
||||
}else{
|
||||
LoginFullInfoViewController * FullVC = [[LoginFullInfoViewController alloc] init];
|
||||
[VC.navigationController pushViewController:FullVC animated:YES];
|
||||
}
|
||||
return;
|
||||
}
|
||||
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"PKIDLoginViewController0")];
|
||||
|
Reference in New Issue
Block a user