开黑组队banner数据移到派对

This commit is contained in:
chenshuanglin
2023-03-16 22:16:45 +08:00
parent 49c910b83d
commit 125e301857
6 changed files with 42 additions and 10 deletions

View File

@@ -86,6 +86,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *headwearPic; @property (nonatomic,copy) NSString *headwearPic;
///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上 ///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上
@property (nonatomic,copy) NSString *headWearUrl; @property (nonatomic,copy) NSString *headWearUrl;
/// 是否在房间,用在发现新朋友
@property (nonatomic, copy) NSString * inRoomUid;
/// 是否在麦位,用在发现新朋友
@property (nonatomic, assign) BOOL inMic;
#pragma mark - 相亲房的字段 #pragma mark - 相亲房的字段
///是否为相亲模式VIP坑位 ///是否为相亲模式VIP坑位
@property (nonatomic,assign) BOOL vipMic; @property (nonatomic,assign) BOOL vipMic;

View File

@@ -135,7 +135,6 @@
/// ///
- (void)homeChatPick { - (void)homeChatPick {
NSString * uid = [AccountInfoStorage instance].getUid;
[Api homeChatPick:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [Api homeChatPick:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] homeChatPickSuccess:data.data]; [[self getView] homeChatPickSuccess:data.data];
}fail:^(NSInteger code, NSString * _Nullable msg) { }fail:^(NSInteger code, NSString * _Nullable msg) {

View File

@@ -252,7 +252,7 @@
[self.sexBtn setTitle:@"0" forState:UIControlStateNormal]; [self.sexBtn setTitle:@"0" forState:UIControlStateNormal];
} }
self.signLabel.text = roomInfo.userDesc; self.signLabel.text = roomInfo.userDesc;
if (roomInfo.roomUid.length <= 0) { if (roomInfo.inRoomUid.length == 0) {
self.livingView.hidden = YES; self.livingView.hidden = YES;
self.statusLabel.text = @"和TA聊"; self.statusLabel.text = @"和TA聊";
self.chatImageView.hidden = NO; self.chatImageView.hidden = NO;

View File

@@ -131,8 +131,12 @@
[tableView deselectRowAtIndexPath:indexPath animated:YES]; [tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.dataSource.count > 0) { if (self.dataSource.count > 0) {
UserInfoModel *model = [self.dataSource safeObjectAtIndex1:indexPath.row]; UserInfoModel *model = [self.dataSource safeObjectAtIndex1:indexPath.row];
if (model.roomUid.length > 0) { if (model.inRoomUid.length > 0) {
[XPRoomViewController openRoom:model.roomUid fromNick:model.nick fromType:UserEnterRoomFromType_Home_Recommend fromUid:nil viewController:self]; if (model.inMic) {
[XPRoomViewController openRoom:model.inRoomUid fromNick:model.nick fromType:UserEnterRoomFromType_Follow_User fromUid:[NSString stringWithFormat:@"%ld",model.uid] viewController:self];
}else{
[XPRoomViewController openRoom:model.inRoomUid fromNick:nil fromType:UserEnterRoomFromType_Home_Recommend fromUid:nil viewController:self];
}
}else{ }else{
/// ///
NSString * sessionId = [NSString stringWithFormat:@"%ld",model.uid]; NSString * sessionId = [NSString stringWithFormat:@"%ld",model.uid];

View File

@@ -80,8 +80,16 @@
#pragma mark - XPHomeRecommendProtocol #pragma mark - XPHomeRecommendProtocol
- (void)getPlayGameWithTeamSuccess:(NSArray *)list{ - (void)getPlayGameWithTeamSuccess:(NSArray *)list{
/// banner
NSMutableArray *tempArr = list.mutableCopy;
for (HomePlayRoomModel *model in list) {
if (model.isBanner) {
[tempArr removeObject:model];
break;
}
}
[self.dataSource removeAllObjects]; [self.dataSource removeAllObjects];
[self.dataSource addObjectsFromArray:list]; [self.dataSource addObjectsFromArray:tempArr];
[self.tableView reloadData]; [self.tableView reloadData];
} }

View File

@@ -16,6 +16,8 @@
#import "XPMacro.h" #import "XPMacro.h"
#import "XPWeakTimer.h" #import "XPWeakTimer.h"
#import "NSArray+Safe.h" #import "NSArray+Safe.h"
#import "Api+Home.h"
#import "AccountInfoStorage.h"
/// View /// View
#import "XPPartyHeaderView.h" #import "XPPartyHeaderView.h"
/// VC /// VC
@@ -26,6 +28,7 @@
#import "XPHomeContainerProtocol.h" #import "XPHomeContainerProtocol.h"
///Model ///Model
#import "HomeTagModel.h" #import "HomeTagModel.h"
#import "HomePlayRoomModel.h"
@interface XPPartyViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,XPHomeContainerProtocol,XPPartyHeaderViewDelegate> @interface XPPartyViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,XPHomeContainerProtocol,XPPartyHeaderViewDelegate>
{ {
@@ -60,11 +63,6 @@
[self addTimer]; [self addTimer];
[self initHeaderAndFooterRrfresh]; [self initHeaderAndFooterRrfresh];
///
HomeBannerInfoModel *model = [[HomeBannerInfoModel alloc] init];
model.bannerPic = @"http://img.uat.lecheng163.com/Fk4qijdmBCqkcIsNtCpVuML2Dahq?imageslim";
self.headerView.bannerList = @[model];
} }
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
@@ -91,6 +89,7 @@
#pragma mark - InitHttp #pragma mark - InitHttp
- (void)headerRefresh { - (void)headerRefresh {
[self.presenter getHomeTagList]; [self.presenter getHomeTagList];
[self requestBanner];
} }
- (void)initHeaderAndFooterRrfresh { - (void)initHeaderAndFooterRrfresh {
@@ -102,6 +101,23 @@
self.pagingView.mainTableView.mj_header = header; self.pagingView.mainTableView.mj_header = header;
} }
- (void)requestBanner {
NSString * uid = [AccountInfoStorage instance].getUid;
[Api homePlayGameTeam:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if (code == 200) {
NSArray *array = [HomePlayRoomModel modelsWithArray:data.data];
for (HomePlayRoomModel *model in array) {
if (model.isBanner) {
self.headerView.bannerList = model.bannerVoList;
break;
}
}
}else{
}
} uid:uid pageNum:@"1" pageSize:@"20"];
}
#pragma mark - Private Method #pragma mark - Private Method
- (void)initSubViews { - (void)initSubViews {
[self.view addSubview:self.pagingView]; [self.view addSubview:self.pagingView];