feat: 更新 VIP 页面内容 | 更新一级页面 UI
This commit is contained in:
@@ -107,7 +107,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
[self initSubViewConstraints];
|
||||
|
||||
[self requestCheckIp];
|
||||
// [self.presenter getHomeAllTopsData];
|
||||
[self.presenter getHomeTopData];
|
||||
[self.presenter getHomeTagList];
|
||||
}
|
||||
@@ -139,26 +138,22 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
XPAdImageTool.shareImageTool.isImLogin = NO;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)addTimer {
|
||||
// PIHomeCategoryTitleModel *tagModel = [self.tagModelList safeObjectAtIndex1:self.type];
|
||||
// XPHomePartyViewController *homeVC = [self.validListDict objectForKey:[NSNumber numberWithInteger:self.type]];
|
||||
// homeVC.tagModel = tagModel;
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
self.type = 0;
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
// [self.view addSubview:self.backImageView];
|
||||
// [self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.pagingView];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(openRoomNotification:) name:kOpenRoomNotification object:nil];
|
||||
|
||||
if([[AccountInfoStorage instance] getUid].length == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
if([ClientConfig shareConfig].roomId != nil){
|
||||
[self opRoom:[ClientConfig shareConfig].roomId];
|
||||
[ClientConfig shareConfig].roomId = nil;
|
||||
}
|
||||
|
||||
if([ClientConfig shareConfig].chatId != nil){
|
||||
NIMSession * session = [NIMSession session:[ClientConfig shareConfig].chatId type:NIMSessionTypeP2P];
|
||||
SessionViewController * sessionVC = [[SessionViewController alloc] initWithSession:session];
|
||||
@@ -181,7 +176,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
self.pagingView.mainTableView.mj_header = header;
|
||||
[ClientConfig shareConfig].inviteCode = @"";
|
||||
|
||||
// [self.pagingView.mainTableView.mj_header beginRefreshing];
|
||||
@kWeakify(self);
|
||||
self.recommendVC.refreshComplete = ^{
|
||||
@kStrongify(self);
|
||||
@@ -238,16 +232,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
// [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.leading.trailing.top.mas_equalTo(self.view);
|
||||
// make.height.mas_equalTo(kGetScaleWidth(223));
|
||||
// }];
|
||||
//
|
||||
// [self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.leading.trailing.top.mas_equalTo(self.view);
|
||||
// make.height.mas_equalTo(kNavigationHeight);
|
||||
// }];
|
||||
|
||||
[self.pagingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.view).mas_offset(kGetScaleWidth(10));
|
||||
make.leading.bottom.trailing.mas_equalTo(0);
|
||||
@@ -267,13 +251,15 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
|
||||
-(void)opRoom:(NSString *)roomUid{
|
||||
|
||||
@kWeakify(self);
|
||||
[Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if(code == 401){
|
||||
[self tokenInvalid];
|
||||
[self showErrorToast:msg];
|
||||
return;
|
||||
}
|
||||
|
||||
if (code == 200) {
|
||||
RoomInfoModel * roomInfo = [RoomInfoModel modelWithJSON:data.data];
|
||||
if (roomInfo.isReselect) {
|
||||
@@ -285,7 +271,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
[XPRoomViewController openRoom:roomUid viewController:self];
|
||||
}
|
||||
} else {
|
||||
|
||||
[self showErrorToast:msg];
|
||||
}
|
||||
} uid:roomUid intoUid:roomUid];
|
||||
@@ -296,14 +281,15 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
searchVC.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.navigationController presentViewController:searchVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - XPHomeRecommendViewControllerDelegate
|
||||
-(void)openRoom{
|
||||
NSString* roomUid = [AccountInfoStorage instance].getUid;
|
||||
[self opRoom:roomUid];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
|
||||
|
||||
if (self.headView.itemList.count == 0 && self.headView.bannerList.count == 0){
|
||||
return 0;
|
||||
}else if (self.headView.itemList.count > 0 && self.headView.bannerList.count == 0){
|
||||
|
Reference in New Issue
Block a user