退出登录的时候报服务器错误的toast
This commit is contained in:
@@ -73,6 +73,9 @@
|
|||||||
/// 获取用户信息
|
/// 获取用户信息
|
||||||
- (void)getUserInfo {
|
- (void)getUserInfo {
|
||||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||||
|
if (uid == nil) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
|
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
|
||||||
[[self getView] onGetUserInfoSuccess:infoModel];
|
[[self getView] onGetUserInfoSuccess:infoModel];
|
||||||
|
@@ -99,9 +99,9 @@
|
|||||||
- (void)logoutCurrentAccount {
|
- (void)logoutCurrentAccount {
|
||||||
AccountModel * account = [[AccountInfoStorage instance] accountModel];
|
AccountModel * account = [[AccountInfoStorage instance] accountModel];
|
||||||
[Api logoutCurrentAccount:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
[Api logoutCurrentAccount:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
[self logout];
|
|
||||||
[[self getView] logoutCurrentAccountSuccess];
|
[[self getView] logoutCurrentAccountSuccess];
|
||||||
}] access_token:account.access_token];
|
}] access_token:account.access_token];
|
||||||
|
[self logout];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user