fix: 修正进房异常提示 UI,增加用户访问失败时的返回处理

This commit is contained in:
eggmanQQQ
2024-08-06 16:46:25 +08:00
parent 75bdf84320
commit 541db3cb1e
4 changed files with 12 additions and 14 deletions

View File

@@ -27,8 +27,9 @@
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
[[self getView] onGetUserInfoSuccess:infoModel];
} fail:^(NSInteger code, NSString * _Nullable msg) {
}] uid:uid];
@kStrongify(self);
[[self getView] onGetUserInfoFailure];
} showLoading:YES errorToast:YES] uid:uid];
}
//
@@ -50,7 +51,7 @@
@kStrongify(self);
BOOL isLike = ((NSNumber *)data.data).boolValue;
[[self getView] getAttentionStateSuccess:isLike];
}] uid:uid isLikeUid:targetUid];
}] uid:uid isLikeUid:targetUid];
}

View File

@@ -13,8 +13,11 @@ NS_ASSUME_NONNULL_BEGIN
@optional
///获取用户信息成功
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo;
- (void)onGetUserInfoFailure;
///获取用户详细信息成功
- (void)onGetDetailInfoSuccess:(UserInfoModel *)userInfo;
///关注/取消关注
- (void)attentionUserSuccess:(BOOL)status;
///获取关注状态

View File

@@ -357,6 +357,10 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
[self.presenter getUserDetailInfoWithUid:@(self.uid).stringValue];
}
- (void)onGetUserInfoFailure {
[self.navigationController popViewControllerAnimated:YES];
}
- (void)onGetDetailInfoSuccess:(UserInfoModel *)userInfo {
self.userDataVC.giftWall = userInfo.userGiftWall;
self.userDataVC.luckyGiftWall = userInfo.userLuckyBagGiftWall;

View File

@@ -67,17 +67,7 @@
[room sendCompleted];
} fail:^(NSInteger code, NSString * _Nullable msg) {
[room sendError:nil];
if (msg.length > 0) {
TTAlertConfig *config = [[TTAlertConfig alloc]init];
config.message = msg;
config.actionStyle = TTAlertActionConfirmStyle;
[TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{
} cancelHandler:^{
}];
}
} showLoading:YES errorToast:NO] uid:roomUid intoUid:uid];
} showLoading:YES errorToast:YES] uid:roomUid intoUid:uid];
}
- (void)enterNIMRoom:(NSString *)roomId user:(UserInfoModel *)userInfo {