diff --git a/YuMi/Modules/YMLogin/Presenter/LoginPresenter.m b/YuMi/Modules/YMLogin/Presenter/LoginPresenter.m index 4bf8ddfe..53ef1140 100644 --- a/YuMi/Modules/YMLogin/Presenter/LoginPresenter.m +++ b/YuMi/Modules/YMLogin/Presenter/LoginPresenter.m @@ -47,7 +47,7 @@ if (profile) { [AccountInfoStorage instance].thirdUserInfo.userName = profile.name; [AccountInfoStorage instance].thirdUserInfo.avatarUrl = profile.imageURL.absoluteString; - [self loginWithThirdPartWithType:ThirdLoginType_FB]; + } }]; } @@ -165,12 +165,15 @@ [FBSDKAccessToken setCurrentAccessToken:nil]; FBSDKLoginManager *manager = [[FBSDKLoginManager alloc] init]; [manager logOut]; + [XNDJTDDLoadingTool showOnlyView:kWindow]; [manager logInWithPermissions:@[@"public_profile"] fromViewController:presentingViewController handler:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) { if (error) { + [XNDJTDDLoadingTool hideOnlyView:kWindow]; [[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter1")]; } else if (result.isCancelled) { + [XNDJTDDLoadingTool hideOnlyView:kWindow]; [[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter0")]; } else { ThirdUserInfo * userInfo = [[ThirdUserInfo alloc] init]; @@ -178,6 +181,7 @@ userInfo.access_token = result.token.tokenString; userInfo.unionid = result.token.userID; [AccountInfoStorage instance].thirdUserInfo = userInfo; + [self loginWithThirdPartWithType:ThirdLoginType_FB]; } }]; }