开黑组队banner数据移到派对
This commit is contained in:
@@ -86,6 +86,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *headwearPic;
|
||||
///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上
|
||||
@property (nonatomic,copy) NSString *headWearUrl;
|
||||
/// 是否在房间,用在发现新朋友
|
||||
@property (nonatomic, copy) NSString * inRoomUid;
|
||||
/// 是否在麦位,用在发现新朋友
|
||||
@property (nonatomic, assign) BOOL inMic;
|
||||
|
||||
#pragma mark - 相亲房的字段
|
||||
///是否为相亲模式VIP坑位
|
||||
@property (nonatomic,assign) BOOL vipMic;
|
||||
|
@@ -135,7 +135,6 @@
|
||||
|
||||
/// 一键匹配
|
||||
- (void)homeChatPick {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api homeChatPick:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] homeChatPickSuccess:data.data];
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
@@ -252,7 +252,7 @@
|
||||
[self.sexBtn setTitle:@"0" forState:UIControlStateNormal];
|
||||
}
|
||||
self.signLabel.text = roomInfo.userDesc;
|
||||
if (roomInfo.roomUid.length <= 0) {
|
||||
if (roomInfo.inRoomUid.length == 0) {
|
||||
self.livingView.hidden = YES;
|
||||
self.statusLabel.text = @"和TA聊";
|
||||
self.chatImageView.hidden = NO;
|
||||
|
@@ -131,8 +131,12 @@
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.dataSource.count > 0) {
|
||||
UserInfoModel *model = [self.dataSource safeObjectAtIndex1:indexPath.row];
|
||||
if (model.roomUid.length > 0) {
|
||||
[XPRoomViewController openRoom:model.roomUid fromNick:model.nick fromType:UserEnterRoomFromType_Home_Recommend fromUid:nil viewController:self];
|
||||
if (model.inRoomUid.length > 0) {
|
||||
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{
|
||||
/// 跳聊天
|
||||
NSString * sessionId = [NSString stringWithFormat:@"%ld",model.uid];
|
||||
|
@@ -80,8 +80,16 @@
|
||||
#pragma mark - XPHomeRecommendProtocol
|
||||
|
||||
- (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 addObjectsFromArray:list];
|
||||
[self.dataSource addObjectsFromArray:tempArr];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#import "XPMacro.h"
|
||||
#import "XPWeakTimer.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "Api+Home.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
/// View
|
||||
#import "XPPartyHeaderView.h"
|
||||
/// VC
|
||||
@@ -26,6 +28,7 @@
|
||||
#import "XPHomeContainerProtocol.h"
|
||||
///Model
|
||||
#import "HomeTagModel.h"
|
||||
#import "HomePlayRoomModel.h"
|
||||
|
||||
@interface XPPartyViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,XPHomeContainerProtocol,XPPartyHeaderViewDelegate>
|
||||
{
|
||||
@@ -60,11 +63,6 @@
|
||||
[self addTimer];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
|
||||
/// 测试数据
|
||||
HomeBannerInfoModel *model = [[HomeBannerInfoModel alloc] init];
|
||||
model.bannerPic = @"http://img.uat.lecheng163.com/Fk4qijdmBCqkcIsNtCpVuML2Dahq?imageslim";
|
||||
self.headerView.bannerList = @[model];
|
||||
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
@@ -91,6 +89,7 @@
|
||||
#pragma mark - InitHttp
|
||||
- (void)headerRefresh {
|
||||
[self.presenter getHomeTagList];
|
||||
[self requestBanner];
|
||||
}
|
||||
|
||||
- (void)initHeaderAndFooterRrfresh {
|
||||
@@ -102,6 +101,23 @@
|
||||
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
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.pagingView];
|
||||
|
Reference in New Issue
Block a user