diff --git a/QXLive.xcodeproj/project.pbxproj b/QXLive.xcodeproj/project.pbxproj
index 4de5c6f..a4b47b1 100644
--- a/QXLive.xcodeproj/project.pbxproj
+++ b/QXLive.xcodeproj/project.pbxproj
@@ -785,7 +785,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.xscm.midi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -847,7 +847,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.xscm.midi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1157,7 +1157,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7270179B583CF68223E0AC0A /* Pods-QXLiveDev.debug.xcconfig */;
buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIconDev;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
@@ -1201,7 +1201,7 @@
"$(inherited)",
"$(SDKROOT)/usr/lib/swift",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -1221,7 +1221,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = C9712338C60B86BE40C57C07 /* Pods-QXLiveDev.release.xcconfig */;
buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIconDev;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
@@ -1265,7 +1265,7 @@
"$(inherited)",
"$(SDKROOT)/usr/lib/swift",
);
- MARKETING_VERSION = 1.0.0;
+ MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
diff --git a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index b839bcc..ebc1369 100644
--- a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -42,8 +42,8 @@
filePath = "QXLive/Config/QXAgoraEngine.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "363"
- endingLineNumber = "363"
+ startingLineNumber = "364"
+ endingLineNumber = "364"
landmarkName = "-rtcEngine:remoteVideoStats:"
landmarkType = "7">
@@ -58,8 +58,8 @@
filePath = "QXLive/Config/QXAgoraEngine.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "367"
- endingLineNumber = "367"
+ startingLineNumber = "368"
+ endingLineNumber = "368"
landmarkName = "-rtcEngine:firstRemoteVideoFrameOfUid:size:elapsed:"
landmarkType = "7">
@@ -74,8 +74,8 @@
filePath = "QXLive/Config/QXAgoraEngine.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "373"
- endingLineNumber = "373"
+ startingLineNumber = "374"
+ endingLineNumber = "374"
landmarkName = "-rtcEngine:remoteVideoStateChangedOfUid:state:reason:elapsed:"
landmarkType = "7">
@@ -90,8 +90,8 @@
filePath = "QXLive/Config/QXAgoraEngine.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "388"
- endingLineNumber = "388"
+ startingLineNumber = "389"
+ endingLineNumber = "389"
landmarkName = "-rtcEngine:channelMediaRelayStateDidChange:error:"
landmarkType = "7">
@@ -160,22 +160,6 @@
landmarkType = "7">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QXLive/Base/QXGlobal.h b/QXLive/Base/QXGlobal.h
index 121b01f..3e4ea39 100644
--- a/QXLive/Base/QXGlobal.h
+++ b/QXLive/Base/QXGlobal.h
@@ -47,6 +47,8 @@ typedef void (^showFinishBlock)(void);
@property (nonatomic,strong) QXRoomViewController *roomVC;
+@property (nonatomic,strong) NSMutableDictionary *offLineDict;
+
@property (nonatomic,strong)NSString *superRoomId;
-(void)miniRoomWithRoomId:(NSString*)roomId roomCover:(NSString*)roomCover;
diff --git a/QXLive/Base/QXGlobal.m b/QXLive/Base/QXGlobal.m
index 05aa153..b8bbbcc 100644
--- a/QXLive/Base/QXGlobal.m
+++ b/QXLive/Base/QXGlobal.m
@@ -231,6 +231,7 @@
weakSelf.isClickJoinRoom = YES;
[[QXRoomMessageManager shared] joinGroupWithRoomId:roomId];
[QXMineNetwork joinRoomWithRoomId:roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
+ [UIApplication sharedApplication].idleTimerDisabled = YES;
// hideLoadingInView(KEYWINDOW)
// roomModel.room_info.pk_room_id = @"33";
weakSelf.isClickJoinRoom = NO;
@@ -262,6 +263,7 @@
[QXMineNetwork joinRoomWithRoomId:roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
// hideLoadingInView(KEYWINDOW)
// roomModel.room_info.pk_room_id = @"33";
+ [UIApplication sharedApplication].idleTimerDisabled = YES;
weakSelf.isClickJoinRoom = NO;
weakSelf.roomVC = [[QXRoomViewController alloc] init];
weakSelf.roomVC.roomId = roomId;
@@ -307,6 +309,7 @@
[[QXAgoraEngine sharedEngine] destroyEngine];
/// 退出直播群
[[QXRoomMessageManager shared] quitGroupWithRoomId:roomId];
+ [[QXGlobal shareGlobal].offLineDict removeAllObjects];
if (_roomVC) {
/// 回收麦位视图内存
[_roomVC.seatContentView destroyViews];
@@ -344,4 +347,10 @@
UIImpactFeedbackGenerator *generator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleHeavy];
[generator impactOccurred];
}
+-(NSMutableDictionary *)offLineDict{
+ if (!_offLineDict) {
+ _offLineDict = [NSMutableDictionary dictionary];
+ }
+ return _offLineDict;
+}
@end
diff --git a/QXLive/Config/QXAgoraEngine.m b/QXLive/Config/QXAgoraEngine.m
index e6c7777..b51ae04 100755
--- a/QXLive/Config/QXAgoraEngine.m
+++ b/QXLive/Config/QXAgoraEngine.m
@@ -74,7 +74,7 @@
}
-(void)rtcEngine:(AgoraRtcEngineKit *)engine didOccurError:(AgoraErrorCode)errorCode{
-
+ QXLOG(@"声网状态---%ld",errorCode)
}
//设置频道模式为直播
- (void)setChannelProfile {
@@ -135,9 +135,10 @@
//离开频道
-(void)leaveChannel {
- [self.agoraKit leaveChannel:^(AgoraChannelStats * _Nonnull stat) {
-
+ int result = [self.agoraKit leaveChannel:^(AgoraChannelStats * _Nonnull stat) {
+ QXLOG(@"声网进入退出频道回调");
}];
+ QXLOG(@"声网退出频道result---------%@",result);
//需要退出聊天室
self.chatRoom = nil;
self.currentChannel = nil;
diff --git a/QXLive/Dynamic(语圈)/View/QXSendGiftView.m b/QXLive/Dynamic(语圈)/View/QXSendGiftView.m
index 64c64b2..62a907c 100644
--- a/QXLive/Dynamic(语圈)/View/QXSendGiftView.m
+++ b/QXLive/Dynamic(语圈)/View/QXSendGiftView.m
@@ -438,7 +438,8 @@
return;
}
/// 2为背包
- NSString *type = self.categoryView.selectedIndex==0?@"2":@"1";
+// NSString *type = self.categoryView.selectedIndex==0?@"2":@"1";
+ NSString *type = @"1";
[QXDynamicNetwork dynamicGiveGiftWithId:self.dynamicId
gift_id:self.giftModel.gift_id
num:self.giftCount
@@ -517,19 +518,29 @@
[QXMineNetwork giftLabelSuccessBlock:^(NSArray * _Nonnull list) {
[weakSelf.titles removeAllObjects];
[weakSelf.titles addObjectsFromArray:list];
- if (self.type != QXSendGiftViewTypeFind) {
- QXGiftLabelModel *md = [[QXGiftLabelModel alloc] init];
- md.name = @"背包";
- md.id = @"-10";
- [weakSelf.titles insertObject:md atIndex:0];
- }
NSMutableArray *arr = [NSMutableArray array];
- for (QXGiftLabelModel*md in weakSelf.titles) {
- [arr addObject:md.name];
+
+ if (weakSelf.type != QXSendGiftViewTypeFind) {
+ QXGiftLabelModel *model = [[QXGiftLabelModel alloc] init];
+ model.name = @"背包";
+ model.id = @"-10";
+ [weakSelf.titles insertObject:model atIndex:0];
+ weakSelf.categoryView.titles = arr;
+ for (QXGiftLabelModel*md in weakSelf.titles) {
+ [arr addObject:md.name];
+ }
+ [weakSelf.categoryView setDefaultSelectedIndex:1];
+ [weakSelf.categoryView reloadData];
+ }else{
+ for (QXGiftLabelModel*md in weakSelf.titles) {
+ [arr addObject:md.name];
+ }
+ weakSelf.categoryView.titles = arr;
+ [weakSelf.categoryView setDefaultSelectedIndex:0];
+ [weakSelf.categoryView reloadData];
}
- weakSelf.categoryView.titles = arr;
- [weakSelf.categoryView setDefaultSelectedIndex:1];
- [weakSelf.categoryView reloadData];
+
+
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
@@ -563,6 +574,12 @@
// }else{
// self.funnyView.hidden = YES;
// }
+ if (self.type == QXSendGiftViewTypeFind) {
+ self.cornLabel.text = self.coin;
+ self.sendAllBtn.hidden = YES;
+ self.rechargeBtn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
+ return;
+ }
if (index == 0) {
self.sendAllBtn.hidden = NO;
self.cornLabel.text = self.giftBagPrice;
diff --git a/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.h b/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.h
index 208e6a4..b25a38f 100644
--- a/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.h
+++ b/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.h
@@ -6,11 +6,12 @@
//
#import "QXBaseViewController.h"
+#import "QXSearchModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXHomeSearchResultVC : QXBaseViewController
-@property (nonatomic,strong)NSArray *resultArray;
+@property (nonatomic,strong)QXSearchListModel *model;
@end
NS_ASSUME_NONNULL_END
diff --git a/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.m b/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.m
index 1f81510..7653e7d 100644
--- a/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.m
+++ b/QXLive/HomePage(声播)/Controlller/QXHomeSearchResultVC.m
@@ -7,8 +7,11 @@
#import "QXHomeSearchResultVC.h"
#import "QXHomeRoomCell.h"
+#import "QXSearchHeaderReusableView.h"
+#import "QXSearchUserCell.h"
+#import "QXUserHomePageViewController.h"
-@interface QXHomeSearchResultVC ()
+@interface QXHomeSearchResultVC ()
@property (nonatomic,strong)UICollectionView *collectionView;
@end
@@ -30,33 +33,75 @@
[self.view addSubview:self.collectionView];
}
--(void)setResultArray:(NSArray *)resultArray{
- _resultArray = resultArray;
+
+-(void)setModel:(QXSearchListModel *)model{
+ _model = model;
[self.collectionView reloadData];
}
#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
- return 1;
+ return 2;
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
- return self.resultArray.count;
+ if (section == 0) {
+ return self.model.rooms.count;
+ }else{
+ return self.model.users.count;
+ }
}
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
- QXHomeRoomCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXHomeRoomCell" forIndexPath:indexPath];
- cell.searchModel = self.resultArray[indexPath.row];
- return cell;
+ if (indexPath.section == 0) {
+ QXHomeRoomCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXHomeRoomCell" forIndexPath:indexPath];
+ cell.model = self.model.rooms[indexPath.row];
+ return cell;
+
+ }else{
+ QXSearchUserCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXSearchUserCell" forIndexPath:indexPath];
+ cell.model = self.model.users[indexPath.row];
+ return cell;
+ }
}
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
- return CGSizeMake((SCREEN_WIDTH-15*3-1)/2.0, (SCREEN_WIDTH-15*3-1)/2.0);
+ if (indexPath.section == 0) {
+ return CGSizeMake((SCREEN_WIDTH-15*3-1)/2.0, (SCREEN_WIDTH-15*3-1)/2.0);
+ }else{
+ return CGSizeMake(SCREEN_WIDTH, 92);
+ }
}
+- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{
+ if ([kind isEqualToString:UICollectionElementKindSectionHeader]) {
+ QXSearchHeaderReusableView *reusableView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"QXSearchHeaderReusableView" forIndexPath:indexPath];
+ if (indexPath.section == 0) {
+ reusableView.title = @"相关房间";
+ }else{
+ reusableView.title = @"相关用户";
+ }
+ return reusableView;
+ }else{
+ return nil;
+ }
+}
+- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{
+ return CGSizeMake(SCREEN_WIDTH, 48);
+}
+- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section{
+ return CGSizeZero;
+}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
- QXSearchModel *model = self.resultArray[indexPath.row];
- [[QXGlobal shareGlobal] joinRoomWithRoomId:model.id isRejoin:NO navagationController:self.navigationController];
+ if (indexPath.section == 0) {
+ QXRoomListModel *model = self.model.rooms[indexPath.row];
+ [[QXGlobal shareGlobal] joinRoomWithRoomId:model.room_id isRejoin:NO navagationController:self.navigationController];
+ }else{
+ QXUserHomeModel *model = self.model.users[indexPath.row];
+ QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
+ vc.user_id = model.user_id;
+ [self.navigationController pushViewController:vc animated:YES];
+ }
}
@@ -66,11 +111,14 @@
layout.minimumLineSpacing = 15;
layout.minimumInteritemSpacing = 15;
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
- _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 16, SCREEN_WIDTH, SCREEN_HEIGHT-(NavContentHeight+TabbarContentHeight)) collectionViewLayout:layout];
+ _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 16, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight) collectionViewLayout:layout];
_collectionView.delegate = self;
_collectionView.dataSource = self;
+ _collectionView.bounces = YES;
_collectionView.backgroundColor = [UIColor clearColor];
[_collectionView registerNib:[UINib nibWithNibName:@"QXHomeRoomCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"QXHomeRoomCell"];
+ [_collectionView registerNib:[UINib nibWithNibName:@"QXSearchUserCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"QXSearchUserCell"];
+ [_collectionView registerClass:[QXSearchHeaderReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"QXSearchHeaderReusableView"];
}
return _collectionView;
}
diff --git a/QXLive/HomePage(声播)/Controlller/QXSearchViewController.m b/QXLive/HomePage(声播)/Controlller/QXSearchViewController.m
index 402f81f..3db6a84 100644
--- a/QXLive/HomePage(声播)/Controlller/QXSearchViewController.m
+++ b/QXLive/HomePage(声播)/Controlller/QXSearchViewController.m
@@ -18,8 +18,7 @@
@interface QXSearchViewController ()
@property(nonatomic,strong)UICollectionView* collectionView;
@property(nonatomic,strong)QXSearchTopView *topView;
-
-@property(nonatomic,strong)NSMutableArray *resultArray;
+@property(nonatomic,strong)QXSearchListModel *model;
@end
@implementation QXSearchViewController
@@ -56,23 +55,22 @@
-(void)searchActionWithKeywords:(NSString *)keywords{
MJWeakSelf
- [QXMineNetwork searchApiWithType:2 search:keywords successBlock:^(NSDictionary * _Nonnull dict) {
- [weakSelf.resultArray removeAllObjects];
- NSArray *arr = [NSArray yy_modelArrayWithClass:[QXSearchModel class] json:dict];
- if (arr.count == 0) {
+ [QXMineNetwork searchListApiWithKetwords:keywords successBlock:^(NSDictionary * _Nonnull dict) {
+ QXSearchListModel *model = [QXSearchListModel yy_modelWithJSON:dict];
+ weakSelf.model = model;
+ if (weakSelf.model.users.count == 0 && weakSelf.model.rooms.count == 0) {
showToast(@"暂无搜索结果");
return;
}
- [weakSelf.resultArray addObjectsFromArray:arr];
[weakSelf pushToResultVC];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
-
+ showToast(msg);
}];
}
-(void)pushToResultVC{
QXHomeSearchResultVC *vc = [[QXHomeSearchResultVC alloc] init];
- vc.resultArray = self.resultArray;
+ vc.model = self.model;
[self.navigationController pushViewController:vc animated:YES];
}
@@ -135,11 +133,6 @@
}
return _topView;
}
--(NSMutableArray *)resultArray{
- if (!_resultArray) {
- _resultArray = [NSMutableArray array];
- }
- return _resultArray;
-}
+
@end
diff --git a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController+Friend.m b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController+Friend.m
index c22ba86..8f8f118 100644
--- a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController+Friend.m
+++ b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController+Friend.m
@@ -105,9 +105,17 @@
[self.skyView updateProgress:model];
[self.ageView updateProgress:model];
[self.timeView updateProgress:model];
+ if (model.status.intValue == 1) {
+ self.acTagView.end_time = model.end_time;
+ [self.view addSubview:self.acTagView];
+ }else{
+ [self.acTagView stopTimer];
+ [self.acTagView removeFromSuperview];
+ }
}
-(void)meetActivityGiftInfoIsUpdate:(QXRoomChatListModel *)giftInfo{
[self.meetView updateUserAndGiftInfoWithModel:giftInfo];
+ self.acTagView.end_time = giftInfo.end_time.longLongValue;
}
@end
diff --git a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.h b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.h
index a5f8f1b..e973343 100644
--- a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.h
+++ b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.h
@@ -19,6 +19,7 @@
#import "QXAgePraizeView.h"/// 岁月之城
#import "QXTimePraizeView.h"/// 时空之巅
#import "QXMeetActivityView.h"
+#import "QXActivityTagView.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXRoomViewController : QXBaseViewController
@@ -39,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXSendGiftView *sendGiftView;
-
+@property (nonatomic,strong)QXActivityTagView *acTagView;
@property (nonatomic,strong)QXSkyPraizeView *skyView;
@property (nonatomic,strong)QXAgePraizeView *ageView;
@property (nonatomic,strong)QXTimePraizeView *timeView;
diff --git a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m
index fc87655..993d6a7 100644
--- a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m
+++ b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m
@@ -29,6 +29,7 @@
#import "QXMessageViewController.h"
#import "QXRoomSubsidyViewController.h"
#import "QXRoomViewController+Friend.h"
+#import "QXAllRoomHourRankView.h"
@interface QXRoomViewController ()<
QXRoomBottomViewDelegate,
@@ -71,6 +72,10 @@ QXRoomUserInfoViewDelegate
@property (nonatomic,strong)QXCabinMovieView *movieView;
/// 连送按钮
@property (nonatomic,strong)QXContinuousGiftView *continuousView;
+
+
+@property (nonatomic,strong)QXAllRoomHourRankView *hourRankView;
+@property (nonatomic,strong)QXAllRoomHourRankTagView *hourRankIconView;
@end
@implementation QXRoomViewController
@@ -196,6 +201,7 @@ QXRoomUserInfoViewDelegate
[self joinRoom];
}
+ [self.view addSubview:self.hourRankIconView];
[self setupEffectView];
// [self.view addSubview:self.headlineView];
@@ -410,6 +416,13 @@ QXRoomUserInfoViewDelegate
[[QXAgoraEngineEx sharedEngine] quitEXChannelWithLastPkRoomId:self.roomModel.room_info.last_pk_room_id];
}
}
+ if (self.roomModel.gift_cycle.xlh_info.xlh_status.intValue == 1) {
+ self.acTagView.end_time = self.roomModel.gift_cycle.xlh_info.end_time;
+ [self.view addSubview:self.acTagView];
+ }else{
+ [self.acTagView stopTimer];
+ [self.acTagView removeFromSuperview];
+ }
}
@@ -1867,6 +1880,19 @@ QXRoomUserInfoViewDelegate
}
return _timeView;
}
+-(QXActivityTagView *)acTagView{
+ if (!_acTagView) {
+ _acTagView = [[QXActivityTagView alloc] init];
+ MJWeakSelf
+ _acTagView.startBlock = ^{
+ [weakSelf.skyView hide];
+ weakSelf.meetView.roomId = weakSelf.roomId;
+ [weakSelf.meetView showInView:weakSelf.view];
+ };
+
+ }
+ return _acTagView;
+}
-(QXMeetActivityView *)meetView{
if (!_meetView) {
_meetView = [[QXMeetActivityView alloc] init];
@@ -1894,5 +1920,22 @@ QXRoomUserInfoViewDelegate
_timeView = nil;
}
}
+-(QXAllRoomHourRankTagView *)hourRankIconView{
+ if (!_hourRankIconView) {
+ _hourRankIconView = [[QXAllRoomHourRankTagView alloc] init];
+ MJWeakSelf
+ _hourRankIconView.startBlock = ^{
+ [weakSelf.hourRankView showInView:weakSelf.view];
+ };
+ }
+ return _hourRankIconView;
+}
+
+-(QXAllRoomHourRankView *)hourRankView{
+ if (!_hourRankView) {
+ _hourRankView = [[QXAllRoomHourRankView alloc] init];
+ }
+ return _hourRankView;
+}
@end
diff --git a/QXLive/HomePage(声播)/Model/QXRoomHourRankModel.h b/QXLive/HomePage(声播)/Model/QXRoomHourRankModel.h
new file mode 100644
index 0000000..72ee500
--- /dev/null
+++ b/QXLive/HomePage(声播)/Model/QXRoomHourRankModel.h
@@ -0,0 +1,27 @@
+//
+// QXRoomHourRankModel.h
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface QXRoomHourRankModel : NSObject
+@property (nonatomic,strong)NSString *time_range;
+@property (nonatomic,strong)NSArray *lists;
+@end
+
+
+@interface QXRoomHourRankSubModel : NSObject
+@property (nonatomic,strong)NSString *room_id;
+@property (nonatomic,strong)NSString *room_name;
+@property (nonatomic,strong)NSString *label_id;
+@property (nonatomic,strong)NSString *room_cover;
+@property (nonatomic,strong)NSString *total_price;
+@property (nonatomic,strong)NSString *label_icon;
+@property (nonatomic,assign)NSInteger xlh_status;
+@end
+NS_ASSUME_NONNULL_END
diff --git a/QXLive/HomePage(声播)/Model/QXRoomHourRankModel.m b/QXLive/HomePage(声播)/Model/QXRoomHourRankModel.m
new file mode 100644
index 0000000..d30debc
--- /dev/null
+++ b/QXLive/HomePage(声播)/Model/QXRoomHourRankModel.m
@@ -0,0 +1,22 @@
+//
+// QXRoomHourRankModel.m
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import "QXRoomHourRankModel.h"
+
+@implementation QXRoomHourRankModel
++(NSDictionary *)modelContainerPropertyGenericClass{
+ return @{
+ @"lists": @"QXRoomHourRankSubModel"
+ };
+}
+@end
+
+
+@implementation QXRoomHourRankSubModel
+
+
+@end
diff --git a/QXLive/HomePage(声播)/Model/QXSearchModel.h b/QXLive/HomePage(声播)/Model/QXSearchModel.h
index e1c960a..96b4a81 100644
--- a/QXLive/HomePage(声播)/Model/QXSearchModel.h
+++ b/QXLive/HomePage(声播)/Model/QXSearchModel.h
@@ -6,6 +6,7 @@
//
#import
+#import "QXRoomListModel.h"
/**
"id": "string",
"name": "string",
@@ -34,4 +35,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *hot_value;
@end
+
+@interface QXSearchListModel : NSObject
+@property (nonatomic, strong) NSArray* users;
+@property (nonatomic, strong) NSArray* rooms;
+@end
NS_ASSUME_NONNULL_END
diff --git a/QXLive/HomePage(声播)/Model/QXSearchModel.m b/QXLive/HomePage(声播)/Model/QXSearchModel.m
index 7a4f30b..e21b0ef 100644
--- a/QXLive/HomePage(声播)/Model/QXSearchModel.m
+++ b/QXLive/HomePage(声播)/Model/QXSearchModel.m
@@ -10,3 +10,13 @@
@implementation QXSearchModel
@end
+
+
+@implementation QXSearchListModel
++(NSDictionary *)modelContainerPropertyGenericClass{
+ return @{
+ @"users" : @"QXUserHomeModel",
+ @"rooms": @"QXRoomListModel"
+ };
+}
+@end
diff --git a/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.h b/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.h
new file mode 100644
index 0000000..86ade8f
--- /dev/null
+++ b/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.h
@@ -0,0 +1,47 @@
+//
+// QXAllRoomHourRankView.h
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import
+#import "QXRoomHourRankModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface QXAllRoomHourRankView : UIView
+-(void)showInView:(UIView *)view;
+-(void)hide;
+@end
+
+@interface QXAllRoomHourRankCell : UICollectionViewCell
+@property (nonatomic,strong)UIImageView *rankNumberImageView;
+@property (nonatomic,strong)UILabel *rankNumberLabel;
+@property (nonatomic,strong)UIImageView *roomCoverImageView;
+@property (nonatomic,strong)UILabel *nameLabel;
+@property (nonatomic,strong)UIImageView *animationView;
+@property (nonatomic,strong)UIImageView *labelImageView;
+@property (nonatomic,strong)UIImageView *hotImageView;
+@property (nonatomic,strong)UILabel *hotLabel;
+
+
+@property (nonatomic,strong)UIView *activityBgView;
+@property (nonatomic,strong)UIImageView *activityImageView;
+@property (nonatomic,strong)UIImageView *activityStatusBgImageView;
+@property (nonatomic,strong)UILabel *statusLabel;
+
+
+@property (nonatomic,assign)NSInteger rankNumber;
+@property (nonatomic,strong)QXRoomHourRankSubModel *model;
+@end
+
+
+@interface QXAllRoomHourRankTagView : UIView
+@property (nonatomic,strong)UIImageView *bgImageView;
+@property (nonatomic,strong)UILabel *titleLabel;
+@property (nonatomic,strong)UIButton *button;
+
+@property (nonatomic,copy)void(^startBlock)(void);
+@end
+NS_ASSUME_NONNULL_END
diff --git a/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.m b/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.m
new file mode 100644
index 0000000..112d8cc
--- /dev/null
+++ b/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.m
@@ -0,0 +1,422 @@
+//
+// QXAllRoomHourRankView.m
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import "QXAllRoomHourRankView.h"
+#import "QXMineNetwork.h"
+#import "NSString+QX.h"
+
+@interface QXAllRoomHourRankView()
+
+@property (nonatomic,strong)UIView *bgView;
+/// 顶部视图
+/// 顶部容器
+@property (nonatomic,strong)UIView *topView;
+/// 顶部背景视图
+@property (nonatomic,strong)UIImageView *topImageView;
+/// 帮助按钮
+@property (nonatomic,strong)UIButton *helpBtn;
+/// 时间背景
+@property (nonatomic,strong)UIImageView *timeBgImageView;
+/// 时间标签
+@property (nonatomic,strong)UILabel *timeLabel;
+
+/// 列表视图
+@property (nonatomic,strong)UICollectionView *collectionView;
+
+@property (nonatomic,strong)NSMutableArray *dataArray;
+@property (nonatomic,assign)NSInteger page;
+@end
+
+@implementation QXAllRoomHourRankView
+
+- (instancetype)init
+{
+ self = [super init];
+ if (self) {
+ self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ self.page = 1;
+ [self initSubviews];
+ }
+ return self;
+}
+
+-(void)initSubviews{
+ UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hide)];
+ tap.delegate = self;
+ [self addGestureRecognizer:tap];
+ self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
+
+ self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(256), self.height)];
+ self.bgView.backgroundColor = RGB16(0x32057F);
+ [self addSubview:self.bgView];
+
+
+ self.topView = [[UIView alloc] init];
+ [self.bgView addSubview:self.topView];
+ [self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.top.left.right.equalTo(self.bgView);
+ make.height.mas_equalTo(ScaleWidth(ScaleWidth(281)));
+ }];
+
+ self.topImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_hour_rank_top_bg"]];
+ [self.topView addSubview:self.topImageView];
+ [self.topImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(self.topView);
+ }];
+
+ self.timeBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_hour_rank_top_time_bg"]];
+ [self.topView addSubview:self.timeBgImageView];
+
+ [self.timeBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.centerX.equalTo(self.topView);
+ make.top.mas_equalTo(ScaleWidth(119));
+ make.height.mas_equalTo(ScaleWidth(23));
+ make.width.mas_equalTo(ScaleWidth(150));
+ }];
+
+ self.timeLabel = [[UILabel alloc] init];
+ self.timeLabel.text = @"榜单时间";
+ self.timeLabel.font = [UIFont systemFontOfSize:12];
+ self.timeLabel.textAlignment = NSTextAlignmentCenter;
+ self.timeLabel.textColor = RGB16(0xffffff);
+ [self.bgView addSubview:self.timeLabel];
+ [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(self.timeBgImageView);
+ }];
+
+ self.helpBtn = [[UIButton alloc] init];
+ [self.helpBtn setImage:[UIImage imageNamed:@"room_hour_rank_help"] forState:(UIControlStateNormal)];
+ [self.bgView addSubview:self.helpBtn];
+ [self.helpBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.right.equalTo(self.bgView);
+ make.top.mas_equalTo(ScaleWidth(40));
+ make.height.mas_equalTo(ScaleWidth(24));
+ make.width.mas_equalTo(ScaleWidth(24));
+ }];
+
+ UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
+ layout.minimumLineSpacing = 4;
+ layout.minimumInteritemSpacing = 4;
+ layout.itemSize = CGSizeMake(self.bgView.width, 88);
+ self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
+ self.collectionView.delegate = self;
+ self.collectionView.dataSource = self;
+ self.collectionView.bounces = YES;
+ self.collectionView.backgroundColor = [UIColor clearColor];
+ MJWeakSelf
+ self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
+ weakSelf.page = 1;
+ [weakSelf getRankList];
+ }];
+ self.collectionView.mj_footer = [MJRefreshBackStateFooter footerWithRefreshingBlock:^{
+ weakSelf.page++;
+ [weakSelf getRankList];
+ }];
+ [self.collectionView registerClass:[QXAllRoomHourRankCell class] forCellWithReuseIdentifier:@"QXAllRoomHourRankCell"];
+ [self.bgView addSubview:self.collectionView];
+ [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.left.right.equalTo(self.bgView);
+ make.top.equalTo(self.topView.mas_bottom).offset(10);
+ make.bottom.equalTo(self.bgView);
+ }];
+}
+-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
+ return touch.view == self;
+}
+-(void)getRankList{
+ MJWeakSelf
+ [QXMineNetwork roomHourRankWithPage:self.page successBlock:^(QXRoomHourRankModel * _Nonnull model) {
+ if (weakSelf.page == 0) {
+ [weakSelf.dataArray removeAllObjects];
+ }
+ weakSelf.timeLabel.text = [NSString stringWithFormat:@"榜单时间 %@",model.time_range];
+ [weakSelf.dataArray addObjectsFromArray:model.lists];
+ [weakSelf.collectionView reloadData];
+ if (model.lists.count == 0) {
+ weakSelf.collectionView.mj_footer.state = MJRefreshStateNoMoreData;
+ }else{
+ [weakSelf.collectionView.mj_footer endRefreshing];
+ }
+ [weakSelf.collectionView.mj_header endRefreshing];
+ } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
+ [weakSelf.collectionView.mj_header endRefreshing];
+ [weakSelf.collectionView.mj_footer endRefreshing];
+ }];
+}
+
+-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
+ return self.dataArray.count;
+}
+-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
+ QXAllRoomHourRankCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXAllRoomHourRankCell" forIndexPath:indexPath];
+ cell.rankNumber = indexPath.row;
+ cell.model = self.dataArray[indexPath.row];
+ return cell;
+}
+-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
+ QXRoomHourRankSubModel *model = self.dataArray[indexPath.row];
+ [[QXGlobal shareGlobal] joinRoomWithRoomId:model.room_id isRejoin:NO navagationController:self.navigationController];
+}
+
+-(void)showInView:(UIView *)view{
+ [self getRankList];
+ self.bgView.x = SCREEN_WIDTH;
+ [view addSubview:self];
+ [UIView animateWithDuration:0.3 animations:^{
+ self.bgView.x = SCREEN_WIDTH-ScaleWidth(256);
+ }];
+}
+-(void)hide{
+ [UIView animateWithDuration:0.3 animations:^{
+ self.bgView.x = SCREEN_WIDTH;
+ } completion:^(BOOL finished) {
+ [self removeFromSuperview];
+ }];
+}
+-(NSMutableArray *)dataArray{
+ if (!_dataArray) {
+ _dataArray = [NSMutableArray array];
+ }
+ return _dataArray;
+}
+@end
+
+
+@implementation QXAllRoomHourRankCell
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initSubviews];
+ }
+ return self;
+}
+
+-(void)initSubviews{
+ self.rankNumberImageView = [[UIImageView alloc] init];
+ [self.contentView addSubview:self.rankNumberImageView];
+ [self.rankNumberImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.left.mas_equalTo(5);
+ make.top.equalTo(self.contentView);
+ make.width.mas_equalTo(32);
+ make.height.mas_equalTo(32);
+ }];
+
+ self.rankNumberLabel = [[UILabel alloc] init];
+ self.rankNumberLabel.textAlignment = NSTextAlignmentCenter;
+ self.rankNumberLabel.textColor = RGB16(0xA6A77E);
+ self.rankNumberLabel.font = [UIFont systemFontOfSize:12];
+ [self.contentView addSubview:self.rankNumberLabel];
+ [self.rankNumberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(self.rankNumberImageView);
+ }];
+
+ self.roomCoverImageView = [[UIImageView alloc] init];
+ self.roomCoverImageView.contentMode = UIViewContentModeScaleAspectFill;
+ self.roomCoverImageView.layer.borderWidth = 1;
+ self.roomCoverImageView.layer.borderColor = RGB16(0xD000FF).CGColor;
+ [self.contentView addSubview:self.roomCoverImageView];
+ [self.roomCoverImageView addRoundedCornersWithRadius:6];
+ [self.roomCoverImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.left.mas_equalTo(21);
+ make.centerY.equalTo(self.contentView);
+ make.width.height.mas_equalTo(64);
+ }];
+
+ self.animationView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"activity_room_animate"]];
+ [self.contentView addSubview:self.animationView];
+ [self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.right.equalTo(self.roomCoverImageView.mas_right).offset(-3);
+ make.top.equalTo(self.roomCoverImageView.mas_top).offset(3);
+ make.width.height.mas_equalTo(12);
+ }];
+
+ self.activityBgView = [[UIView alloc] init];
+ [self.contentView addSubview:self.activityBgView];
+ [self.activityBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.right.right.mas_equalTo(-5);
+ make.top.mas_equalTo(8);
+ make.width.mas_equalTo(44);
+ make.height.mas_equalTo(48);
+ }];
+
+ self.activityStatusBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"activity_status_ing"]];
+// self.activityStatusBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"activity_status_will"]];
+ [self.activityBgView addSubview:self.activityStatusBgImageView];
+ [self.activityStatusBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.left.right.bottom.equalTo(self.activityBgView);
+ make.height.mas_equalTo(14);
+ }];
+
+ self.statusLabel = [[UILabel alloc] init];
+ self.statusLabel.font = [UIFont systemFontOfSize:10];
+ self.statusLabel.textColor = RGB16(0xffffff);
+ self.statusLabel.textAlignment = NSTextAlignmentCenter;
+ [self.activityBgView addSubview:self.statusLabel];
+ [self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(self.activityStatusBgImageView);
+ }];
+
+
+ self.activityImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ac_tag_icon"]];
+ [self.activityBgView addSubview:self.activityImageView];
+ [self.activityImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.top.equalTo(self.activityBgView);
+ make.centerX.equalTo(self.activityBgView);
+ make.width.height.mas_equalTo(36);
+ }];
+
+ self.nameLabel = [[UILabel alloc] init];
+ self.nameLabel.textColor = RGB16(0xffffff);
+ self.nameLabel.font = [UIFont boldSystemFontOfSize:12];
+ [self.contentView addSubview:self.nameLabel];
+ [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.left.equalTo(self.roomCoverImageView.mas_right).offset(8);
+ make.right.equalTo(self.activityBgView.mas_left).offset(-8);
+ make.top.equalTo(self.roomCoverImageView);
+ make.height.mas_equalTo(15);
+ }];
+
+ self.labelImageView = [[UIImageView alloc] init];
+ [self.contentView addSubview:self.labelImageView];
+ [self.labelImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.width.mas_equalTo(44);
+ make.height.mas_equalTo(24);
+ make.centerY.equalTo(self.contentView);
+ make.left.equalTo(self.nameLabel);
+ }];
+
+ self.hotImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_hot_icon"]];
+ [self.contentView addSubview:self.hotImageView];
+ [self.hotImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.width.height.mas_equalTo(15);
+ make.bottom.equalTo(self.roomCoverImageView.mas_bottom).offset(2);
+ make.left.equalTo(self.nameLabel);
+ }];
+
+ self.hotLabel = [[UILabel alloc] init];
+ self.hotLabel.font = [UIFont systemFontOfSize:12];
+ self.hotLabel.textColor = RGB16(0xffffff);
+ [self.contentView addSubview:self.hotLabel];
+ [self.hotLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.centerY.equalTo(self.hotImageView);
+ make.left.equalTo(self.hotImageView.mas_right);
+ }];
+
+ [self.contentView bringSubviewToFront:self.rankNumberImageView];
+ [self.contentView bringSubviewToFront:self.rankNumberLabel];
+ [self.contentView bringSubviewToFront:self.activityStatusBgImageView];
+ [self.contentView bringSubviewToFront:self.statusLabel];
+}
+-(void)setRankNumber:(NSInteger)rankNumber{
+ _rankNumber = rankNumber;
+ if (rankNumber == 0) {
+ self.rankNumberLabel.hidden = YES;
+ self.rankNumberImageView.image = [UIImage imageNamed:@"activity_room_rank_first"];
+ return;
+ }
+ if (rankNumber == 1) {
+ self.rankNumberLabel.hidden = YES;
+ self.rankNumberImageView.image = [UIImage imageNamed:@"activity_room_rank_second"];
+ return;
+ }
+ if (rankNumber == 2) {
+ self.rankNumberLabel.hidden = YES;
+ self.rankNumberImageView.image = [UIImage imageNamed:@"activity_room_rank_third"];
+ return;
+ }
+
+ self.rankNumberLabel.hidden = NO;
+ self.rankNumberLabel.text = [NSString stringWithFormat:@"%ld",rankNumber+1];
+ self.rankNumberImageView.image = [UIImage imageNamed:@"activity_room_rank_other"];
+}
+-(void)setModel:(QXRoomHourRankSubModel *)model{
+ _model = model;
+ [self.roomCoverImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover]];
+ self.nameLabel.text = model.room_name;
+ [self.labelImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon]];
+ self.hotLabel.text = [NSString qx_showHotCountNum:model.total_price.longLongValue];
+ if (model.xlh_status == 0) {
+ self.activityBgView.hidden = YES;
+ }else if (model.xlh_status == 2){
+ self.activityBgView.hidden = NO;
+ self.activityStatusBgImageView.image = [UIImage imageNamed:@"activity_status_will"];
+ self.statusLabel.text = @"即将开始";
+ }else{
+ self.activityBgView.hidden = NO;
+ self.activityStatusBgImageView.image = [UIImage imageNamed:@"activity_status_ing"];
+ self.statusLabel.text = @"进行中";
+ }
+}
+@end
+
+
+
+@implementation QXAllRoomHourRankTagView
+
+- (instancetype)init
+{
+ self = [super init];
+ if (self) {
+ self.frame = CGRectMake(SCREEN_WIDTH-60, NavContentHeight, 60, 25);
+ [self initSubviews];
+ }
+ return self;
+}
+
+-(void)initSubviews{
+ UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
+ [self addGestureRecognizer:panRecognizer];
+ self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_hour_rank_icon"]];
+ [self addSubview:self.bgImageView];
+
+ [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(self);
+ }];
+
+ self.titleLabel = [[UILabel alloc] init];
+ self.titleLabel.font = [UIFont systemFontOfSize:11];
+ self.titleLabel.text = @"小时榜";
+ self.titleLabel.textColor = RGB16(0xffffff);
+ self.titleLabel.textAlignment = NSTextAlignmentRight;
+ [self addSubview:self.titleLabel];
+ [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(self);
+ }];
+
+ self.button = [[UIButton alloc] init];
+ [self.button addTarget:self action:@selector(buttonAction) forControlEvents:(UIControlEventTouchUpInside)];
+ [self addSubview:self.button];
+ [self.button mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.edges.equalTo(self);
+ }];
+}
+
+-(void)buttonAction{
+ if (self.startBlock) {
+ self.startBlock();
+ }
+}
+
+-(void)handlePan:(UIPanGestureRecognizer*)recognizer{
+ if (recognizer.state == UIGestureRecognizerStateEnded) {
+ NSLog(@"拖动结束");
+ }
+ CGPoint translation = [recognizer translationInView:self.viewController.view];
+ CGPoint panCenter = CGPointMake(recognizer.view.center.x + translation.x,
+ recognizer.view.center.y + translation.y);
+ if (panCenter.y < kSafeAreaTop || panCenter.y> SCREEN_HEIGHT-kSafeAreaBottom) {
+ return;
+ }
+
+
+ recognizer.view.center = CGPointMake(SCREEN_WIDTH-60/2,
+ recognizer.view.center.y + translation.y);
+ [recognizer setTranslation:CGPointZero inView:self.viewController.view];
+}
+@end
diff --git a/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m b/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m
index 73e56c9..2fbecc0 100644
--- a/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m
+++ b/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m
@@ -171,13 +171,17 @@
// 主持
case QXRoomRoleTypeCompere:{
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
- toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+// toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+ /// 暂时不需要房间补贴
+ toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
}else{
- toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
+// toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
+ /// 暂时不需要房间补贴
+ toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
@@ -203,10 +207,14 @@
// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
// }
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
- toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+ /// 暂时不需要房间补贴
+ toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
}else{
// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
- toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+ /// 暂时不需要房间补贴
+ toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
}
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
@@ -223,10 +231,14 @@
// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
// }
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
- toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+ /// 暂时不需要房间补贴
+ toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
}else{
// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
- toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
+ /// 暂时不需要房间补贴
+ toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
}
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
diff --git a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatContentView.m b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatContentView.m
index 63f473e..f82e0d3 100644
--- a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatContentView.m
+++ b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatContentView.m
@@ -200,6 +200,7 @@
NSDictionary *parm = notice.object;
NSString *uid = [NSString stringWithFormat:@"%@",[parm objectForKey:@"user_id"]];
BOOL isOnline = [[parm objectForKey:@"is_online"] boolValue];
+ [QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithBool:!isOnline] forKey:uid];
if ([uid isEqualToString:self.pitModel.user_id]) {
if (isOnline) {
self.offlineImageView.hidden = YES;
@@ -208,6 +209,7 @@
[self stopAudioAnimation];
}
}
+ QXLOG(@"在线状态%@",QXGlobal.shareGlobal.offLineDict);
}
-(void)speakInfo:(NSNotification*)notice{
id object = notice.object;
@@ -219,6 +221,7 @@
if ((info.uid == self.pitModel.user_id.longLongValue)) {
if (info.volume > 0) {
self.offlineImageView.hidden = YES;
+ [QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithBool:NO] forKey:[NSString stringWithFormat:@"%ld",info.uid]];
[self startAudioAnimation];
}else{
[self stopAudioAnimation];
@@ -358,8 +361,14 @@
}else{
self.lockImageView.hidden = YES;
}
+
if (pitModel.user_id.longValue > 0) {
- self.noUserImageView.hidden = YES;
+ BOOL is_offline = [[[QXGlobal shareGlobal].offLineDict objectForKey:pitModel.user_id?pitModel.user_id:@"0"] boolValue];
+ if (is_offline) {
+ self.offlineImageView.hidden = NO;
+ }else{
+ self.offlineImageView.hidden = YES;
+ }
self.numberLabel.hidden = YES;
self.headerView.hidden = NO;
self.nameLabel.hidden = NO;
diff --git a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeAuctionView.m b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeAuctionView.m
index 3b1b389..fea372e 100644
--- a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeAuctionView.m
+++ b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeAuctionView.m
@@ -198,6 +198,7 @@
//
self.helpBtn = [[UIButton alloc] init];
[self.helpBtn setImage:[UIImage imageNamed:@"room_auction_help"] forState:(UIControlStateNormal)];
+ [self.helpBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.bgView addSubview:self.helpBtn];
[self.helpBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(5);
@@ -1047,6 +1048,20 @@
[self.rankView showInView:self.viewController.view];
}
+-(void)helpAction{
+ NSString *Id = @"";
+ if ([self.roomModel.room_info.label_id isEqualToString:@"1"]) {
+ /// 真爱
+ Id = @"23";
+ }else{
+ /// 亲密
+ Id = @"22";
+ }
+ NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,Id];
+ QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
+ vc.urlStr = urlString;
+ [self.viewController.navigationController pushViewController:vc animated:YES];
+}
-(void)changeAuctionWithType:(UIButton*)sender{
NSString *type = @"";
@@ -1075,6 +1090,7 @@
}
-(void)auctionTypeDidChanged:(NSString *)type{
+ self.roomModel.room_info.label_id = type;
if ([type isEqualToString:@"2"]) {
self.realLoveBtn.selected = NO;
self.intimacyBtn.selected = YES;
diff --git a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeFrientView.m b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeFrientView.m
index 828116e..fe01920 100644
--- a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeFrientView.m
+++ b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeFrientView.m
@@ -881,6 +881,29 @@
self.myPitNumber = toPitNumber;
}
}
+ /// 循环麦位视图数组
+ for (UIView *view in self.allSeatViewArray) {
+ /// 如果当前视图的类型为麦位视图
+ if ([view isKindOfClass:[QXRoomSeatContentView class]]) {
+ QXRoomSeatContentView *seatView = (QXRoomSeatContentView*)view;
+ /// 如果换麦的用户id等于视图上当前绑定的用户id
+ if ([userInfo.user_id isEqualToString:seatView.pitModel.user_id]) {
+ /// 如果视图的麦位号不是目标麦位号 (为了处理后端推送异常是产生多个同一个用户)
+ if (seatView.pitModel.pit_number.intValue != toPitNumber) {
+ /// 置空麦位用户
+ QXRoomPitModel *model = seatView.pitModel;
+ model.user_id = @"0";
+ model.avatar = @"";
+ model.dress = @"";
+ model.sex = @"";
+ model.nickname = @"";
+ model.user_code = @"";
+ model.charm = @"";
+ seatView.pitModel = model;
+ }
+ }
+ }
+ }
}
-(void)didClickUserHeaderWithPitModel:(QXRoomPitModel *)pitModel seatView:(QXRoomSeatContentView *)seatView{
@@ -1145,6 +1168,7 @@
if ([model.room_id isExist]) {
QXGlobal.shareGlobal.superRoomId = self.roomModel.room_info.room_id;
if ([model.user1_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id] || [model.user2_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
+ [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id];
[[QXGlobal shareGlobal] joinRoomWithRoomId:model.room_id isRejoin:NO navagationController:self.viewController.navigationController];
}
}
diff --git a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeNormalView.m b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeNormalView.m
index 5dfbb34..4b46c26 100644
--- a/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeNormalView.m
+++ b/QXLive/HomePage(声播)/View/房间/麦位视图/QXRoomSeatTypeNormalView.m
@@ -187,7 +187,7 @@ static NSInteger maxSeat = 8;
}
}
--(void) didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
+-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
if (pit_number > 10) {
return;
}
@@ -379,6 +379,29 @@ static NSInteger maxSeat = 8;
if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
self.myPitNumber = toPitNumber;
}
+ /// 循环麦位视图数组
+ for (UIView *view in self.seatArray) {
+ /// 如果当前视图的类型为麦位视图
+ if ([view isKindOfClass:[QXRoomSeatContentView class]]) {
+ QXRoomSeatContentView *seatView = (QXRoomSeatContentView*)view;
+ /// 如果换麦的用户id等于视图上当前绑定的用户id
+ if ([userInfo.user_id isEqualToString:seatView.pitModel.user_id]) {
+ /// 如果视图的麦位号不是目标麦位号 (为了处理后端推送异常是产生多个同一个用户)
+ if (seatView.pitModel.pit_number.intValue != toPitNumber) {
+ /// 置空麦位用户
+ QXRoomPitModel *model = seatView.pitModel;
+ model.user_id = @"0";
+ model.avatar = @"";
+ model.dress = @"";
+ model.sex = @"";
+ model.nickname = @"";
+ model.user_code = @"";
+ model.charm = @"";
+ seatView.pitModel = model;
+ }
+ }
+ }
+ }
}
-(void)setSeatIsLock:(NSString *)isLock pitNumber:(NSString *)pitNumber{
diff --git a/QXLive/HomePage(声播)/View/首页/QXGiftScrollView.m b/QXLive/HomePage(声播)/View/首页/QXGiftScrollView.m
index 30c5423..c1e17ec 100644
--- a/QXLive/HomePage(声播)/View/首页/QXGiftScrollView.m
+++ b/QXLive/HomePage(声播)/View/首页/QXGiftScrollView.m
@@ -58,11 +58,12 @@ static NSInteger maxCount = 5;
}
}else{
for (QXGiftScrollModel*md in list) {
- [self.dataArray removeLastObject];
- [self.titles removeLastObject];
[self.dataArray insertObject:md atIndex:0];
[self.titles insertObject:md.fromUserName atIndex:0];
-
+ }
+ if (self.dataArray.count > 5) {
+ [self.dataArray removeLastObject];
+ [self.titles removeLastObject];
}
}
self.cycleScrollView.imageURLStringsGroup = self.titles;
diff --git a/QXLive/HomePage(声播)/View/首页/搜索/QXSearchHeaderReusableView.h b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchHeaderReusableView.h
new file mode 100644
index 0000000..6f29f2a
--- /dev/null
+++ b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchHeaderReusableView.h
@@ -0,0 +1,16 @@
+//
+// QXSearchHeaderReusableView.h
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface QXSearchHeaderReusableView : UICollectionReusableView
+@property (nonatomic,strong)NSString *title;
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/QXLive/HomePage(声播)/View/首页/搜索/QXSearchHeaderReusableView.m b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchHeaderReusableView.m
new file mode 100644
index 0000000..3f12778
--- /dev/null
+++ b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchHeaderReusableView.m
@@ -0,0 +1,37 @@
+//
+// QXSearchHeaderReusableView.m
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import "QXSearchHeaderReusableView.h"
+@interface QXSearchHeaderReusableView()
+@property (nonatomic,strong)UILabel *titleLabel;
+@end
+@implementation QXSearchHeaderReusableView
+- (instancetype)initWithFrame:(CGRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+ [self initSubviews];
+ }
+ return self;
+}
+-(void)setTitle:(NSString *)title{
+ _title = title;
+ self.titleLabel.text = title;
+}
+
+-(void)initSubviews{
+ self.titleLabel = [[UILabel alloc] init];
+ self.titleLabel.font = [UIFont boldSystemFontOfSize:16];
+ self.titleLabel.textColor = RGB16(0x333333);
+ [self addSubview:self.titleLabel];
+ [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.left.mas_equalTo(16);
+ make.height.mas_equalTo(24);
+ make.bottom.equalTo(self).offset(-8);
+ }];
+}
+@end
diff --git a/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.h b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.h
new file mode 100644
index 0000000..34a7b27
--- /dev/null
+++ b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.h
@@ -0,0 +1,21 @@
+//
+// QXSearchUserCell.h
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface QXSearchUserCell : UICollectionViewCell
+@property (weak, nonatomic) IBOutlet UIImageView *avatarImageView;
+@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
+@property (weak, nonatomic) IBOutlet UILabel *IdLabel;
+@property (weak, nonatomic) IBOutlet UIButton *optionBtn;
+@property (weak, nonatomic) IBOutlet UIImageView *sexImageView;
+@property (nonatomic,strong)QXUserHomeModel *model;
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.m b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.m
new file mode 100644
index 0000000..4bbeff5
--- /dev/null
+++ b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.m
@@ -0,0 +1,37 @@
+//
+// QXSearchUserCell.m
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import "QXSearchUserCell.h"
+
+@implementation QXSearchUserCell
+-(void)setModel:(QXUserHomeModel *)model{
+ _model = model;
+ [self.avatarImageView sd_setImageWithURL:[NSURL URLWithString:model.avatar]];
+ self.nameLabel.text = model.nickname;
+ self.IdLabel.text = [NSString stringWithFormat:@"ID:%@",model.user_code];
+ UIImage *sexImage = [UIImage imageNamed:model.sex.intValue==1?@"user_sex_boy":@"user_sex_girl"];
+ self.sexImageView.image = sexImage;
+ if (self.model.room_id.intValue > 0) {
+ self.optionBtn.selected = YES;
+ }else{
+ self.optionBtn.selected = NO;
+ }
+}
+- (IBAction)chatAction:(UIButton *)sender {
+ if (self.model.room_id.intValue > 0) {
+ // 去房间
+ [[QXGlobal shareGlobal] joinRoomWithRoomId:self.model.room_id isRejoin:NO navagationController:self.navigationController];
+ }else{
+ [[QXGlobal shareGlobal] chatWithUserID:self.model.user_id nickname:self.model.nickname avatar:self.model.avatar navagationController:self.viewController.navigationController];
+ }
+}
+- (void)awakeFromNib {
+ [super awakeFromNib];
+ // Initialization code
+}
+
+@end
diff --git a/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.xib b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.xib
new file mode 100644
index 0000000..28ee1de
--- /dev/null
+++ b/QXLive/HomePage(声播)/View/首页/搜索/QXSearchUserCell.xib
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QXLive/Login(登录)/Controlller/QXLoginViewController.m b/QXLive/Login(登录)/Controlller/QXLoginViewController.m
index 66fcd2f..236d5af 100644
--- a/QXLive/Login(登录)/Controlller/QXLoginViewController.m
+++ b/QXLive/Login(登录)/Controlller/QXLoginViewController.m
@@ -360,7 +360,7 @@
[AlipaySDK startLogWithBlock:^(NSString *log) {
QXLOG(@"alilog-----%@",log);
}];
- [[AlipaySDK defaultService] auth_V2WithInfo:authStr fromScheme:@"QXLive" callback:^(NSDictionary *resultDic) {
+ [[AlipaySDK defaultService] auth_V2WithInfo:authStr fromScheme:@"midilive" callback:^(NSDictionary *resultDic) {
NSString *result = resultDic[@"result"];
NSString *authCode = nil;
if (result.length>0) {
diff --git a/QXLive/Login(登录)/Model/QXAppVersionModel.h b/QXLive/Login(登录)/Model/QXAppVersionModel.h
new file mode 100644
index 0000000..70ea8d3
--- /dev/null
+++ b/QXLive/Login(登录)/Model/QXAppVersionModel.h
@@ -0,0 +1,29 @@
+//
+// QXAppVersionModel.h
+// QXLive
+//
+// Created by 启星 on 2025/9/27.
+//
+
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface QXAppVersionModel : NSObject
+/// id
+@property (nonatomic,strong)NSString* id;
+/// 版本号
+@property (nonatomic,strong)NSString* version;
+
+@property (nonatomic,strong)NSString* url;
+
+@property (nonatomic,strong)NSString* content;
+/// 强制更新 1 是 0否
+@property (nonatomic,strong)NSString* is_force;
+
+@property (nonatomic,strong)NSString* apiversion;
+
+@property (nonatomic,strong)NSString* code;
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/QXLive/Login(登录)/Model/QXAppVersionModel.m b/QXLive/Login(登录)/Model/QXAppVersionModel.m
new file mode 100644
index 0000000..1921c03
--- /dev/null
+++ b/QXLive/Login(登录)/Model/QXAppVersionModel.m
@@ -0,0 +1,12 @@
+//
+// QXAppVersionModel.m
+// QXLive
+//
+// Created by 启星 on 2025/9/27.
+//
+
+#import "QXAppVersionModel.h"
+
+@implementation QXAppVersionModel
+
+@end
diff --git a/QXLive/Login(登录)/Services/QXLoginNetwork.h b/QXLive/Login(登录)/Services/QXLoginNetwork.h
index 8ff91d2..4e5dc79 100644
--- a/QXLive/Login(登录)/Services/QXLoginNetwork.h
+++ b/QXLive/Login(登录)/Services/QXLoginNetwork.h
@@ -7,6 +7,8 @@
#import
#import "QXLoginModel.h"
+#import "QXAppVersionModel.h"
+
typedef NS_ENUM(NSInteger) {
/// 验证码
LoginTypePhoneCode = 0,
@@ -124,7 +126,11 @@ NS_ASSUME_NONNULL_BEGIN
successBlock:(void(^)(id responseObject))successBlock
failBlock:(void(^)(NSError* error,NSString*msg))failBlock;
-
+/**
+ app更新
+ */
++(void)getAppVersionSuccessBlock:(void(^)(QXAppVersionModel* model))successBlock
+ failBlock:(void(^)(NSError* error,NSString*msg))failBlock;
@end
NS_ASSUME_NONNULL_END
diff --git a/QXLive/Login(登录)/Services/QXLoginNetwork.m b/QXLive/Login(登录)/Services/QXLoginNetwork.m
index d00bba5..b5b010b 100644
--- a/QXLive/Login(登录)/Services/QXLoginNetwork.m
+++ b/QXLive/Login(登录)/Services/QXLoginNetwork.m
@@ -238,4 +238,17 @@
}
}];
}
++(void)getAppVersionSuccessBlock:(void (^)(QXAppVersionModel * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
+
+ [[QXRequset shareInstance] postWithUrl:QXAppVersion parameters:@{@"system":@"iOS"} needCache:NO success:^(id responseObject) {
+ if (successBlock) {
+ QXAppVersionModel *model = [QXAppVersionModel yy_modelWithJSON:responseObject[@"data"]];
+ successBlock(model);
+ }
+ } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
+ if (failBlock) {
+ failBlock(error,msg);
+ }
+ }];
+}
@end
diff --git a/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m b/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m
index b65c1de..671ec5d 100644
--- a/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m
+++ b/QXLive/Mine(音域)/Controller/设置/QXAboutViewController.m
@@ -41,7 +41,8 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
}
- (void)loadData {
// H5ServerUrl
- NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/aboutUs",H5ServerUrl];
+ NSInteger safeTop = kSafeAreaTop;
+ NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/aboutUs?h=%ld",H5ServerUrl,safeTop];
NSURL* url=[NSURL URLWithString:urlStr];
NSURLRequest *request =[NSURLRequest requestWithURL:url];
[self.contentWebView loadRequest:request];
diff --git a/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m b/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m
index 73a611f..c4637e8 100644
--- a/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m
+++ b/QXLive/Mine(音域)/Controller/钱包/QXAliBindViewController.m
@@ -49,10 +49,10 @@
[self.bankNameTextField addRoundedCornersWithRadius:11];
[self.view addSubview:self.bankNameTextField];
- self.bankNumberTextField = [[QXLoginTextField alloc] initWithFrame:CGRectMake(16, self.bankNameTextField.bottom+12, SCREEN_WIDTH-32, 44) type:(LoginTextTypeBankAddress)];
- self.bankNumberTextField.backgroundColor = RGB16(0xEFF2F8);
- [self.bankNumberTextField addRoundedCornersWithRadius:11];
- [self.view addSubview:self.bankNumberTextField];
+ self.bankAddressTextField = [[QXLoginTextField alloc] initWithFrame:CGRectMake(16, self.bankNameTextField.bottom+12, SCREEN_WIDTH-32, 44) type:(LoginTextTypeBankAddress)];
+ self.bankAddressTextField.backgroundColor = RGB16(0xEFF2F8);
+ [self.bankAddressTextField addRoundedCornersWithRadius:11];
+ [self.view addSubview:self.bankAddressTextField];
self.commitBtn = [[UIButton alloc] initWithFrame:CGRectMake(38, self.bankNumberTextField.bottom+16, SCREEN_WIDTH-38*2, 42)];
}
@@ -67,6 +67,37 @@
self.commitBtn.titleLabel.font = [UIFont systemFontOfSize:14];
self.commitBtn.backgroundColor = QXConfig.themeColor;
[self.view addSubview:self.commitBtn];
+ [self getAliBind];
+}
+
+-(void)getAliBind{
+ //2 支付宝 3 银行卡
+ NSString *type = self.isAli?@"2":@"3";
+ MJWeakSelf
+ [QXMineNetwork walletBindDetailWithUserId:QXGlobal.shareGlobal.loginModel.user_id type:type successBlock:^(NSDictionary * _Nonnull dict) {
+ if (weakSelf.isAli) {
+ NSString* result = [NSString stringWithFormat:@"%@",dict[@"alipay_account"]];
+ if ([result isExist]) {
+ weakSelf.aliTextField.textField.text = result;
+ }
+ }else{
+ NSString* bank_card_number = [NSString stringWithFormat:@"%@",dict[@"bank_card_number"]];
+ NSString* bank_card = [NSString stringWithFormat:@"%@",dict[@"bank_card"]];
+ NSString* open_bank = [NSString stringWithFormat:@"%@",dict[@"open_bank"]];
+ if ([bank_card_number isExist]) {
+ weakSelf.bankNumberTextField.textField.text = bank_card_number;
+ }
+ if ([bank_card isExist]) {
+ weakSelf.bankNumberTextField.textField.text = bank_card_number;
+ }
+ if ([open_bank isExist]) {
+ weakSelf.bankAddressTextField.textField.text = open_bank;
+ }
+ }
+
+ } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
+
+ }];
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[self.view endEditing:YES];
diff --git a/QXLive/Mine(音域)/Controller/钱包/QXWalletViewController.m b/QXLive/Mine(音域)/Controller/钱包/QXWalletViewController.m
index 9f4bd3a..9b4c1d5 100644
--- a/QXLive/Mine(音域)/Controller/钱包/QXWalletViewController.m
+++ b/QXLive/Mine(音域)/Controller/钱包/QXWalletViewController.m
@@ -144,11 +144,11 @@
weakSelf.isBind = YES;
return;
}
- if (model.ali.is_pay_open.intValue == 1 && model.ali.is_bind.intValue == 1) {
+ if (model.ali.is_with_draw_open.intValue == 1 && model.ali.is_bind.intValue == 1) {
weakSelf.isBind = YES;
return;
}
- if (model.bank.is_pay_open.intValue == 1 && model.bank.is_bind.intValue == 1) {
+ if (model.bank.is_with_draw_open.intValue == 1 && model.bank.is_bind.intValue == 1) {
weakSelf.isBind = YES;
return;
}
diff --git a/QXLive/Mine(音域)/Model/QXRoomModel.h b/QXLive/Mine(音域)/Model/QXRoomModel.h
index ac100df..d61d0ec 100644
--- a/QXLive/Mine(音域)/Model/QXRoomModel.h
+++ b/QXLive/Mine(音域)/Model/QXRoomModel.h
@@ -10,7 +10,7 @@
#import "QXSongListModel.h"
NS_ASSUME_NONNULL_BEGIN
-@class QXRoomInfoModel,QXRoomPitModel,QXRoomOwnerModel,QXHeadLineModel,QXRoomAuction,QXRoomAuctionUser,QXRoomCpUser,QXRoomPkInfo,QXRoomFriendInfo,QXRoomFriendHeartListModel;
+@class QXRoomInfoModel,QXRoomPitModel,QXRoomOwnerModel,QXHeadLineModel,QXRoomAuction,QXRoomAuctionUser,QXRoomCpUser,QXRoomPkInfo,QXRoomFriendInfo,QXRoomFriendHeartListModel,QXRoomActivitySubModel,QXRoomActivityModel;
@interface QXRoomModel : NSObject
/// 房间信息
@property (nonatomic,strong)QXRoomInfoModel *room_info;
@@ -32,6 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXRoomFriendInfo *friend_info;
/// k歌麦位
@property (nonatomic,strong)NSArray< QXRoomPitModel*> *song_pit_list;
+/// 活动
+@property (nonatomic,strong)QXRoomActivityModel *gift_cycle;
@end
@@ -342,4 +344,15 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *heartNum;
@property (nonatomic,strong)NSString *heartId;
@end
+
+@interface QXRoomActivityModel : NSObject
+@property (nonatomic,strong)QXRoomActivitySubModel *xlh_info;
+@end
+
+@interface QXRoomActivitySubModel : NSObject
+@property (nonatomic,strong)NSString *activities_name;
+@property (nonatomic,strong)NSString *icon;
+@property (nonatomic,strong)NSString *xlh_status;
+@property (nonatomic,assign)long end_time;
+@end
NS_ASSUME_NONNULL_END
diff --git a/QXLive/Mine(音域)/Model/QXRoomModel.m b/QXLive/Mine(音域)/Model/QXRoomModel.m
index ca1cea1..c973c90 100644
--- a/QXLive/Mine(音域)/Model/QXRoomModel.m
+++ b/QXLive/Mine(音域)/Model/QXRoomModel.m
@@ -20,6 +20,7 @@
@"pk_info" : @"QXRoomPkInfo",
@"song_pit_list":@"QXRoomPitModel",
@"friend_info":@"QXRoomFriendInfo",
+ @"gift_cycle":@"QXRoomActivityModel",
};
}
@@ -129,4 +130,17 @@
@implementation QXRoomFriendHeartListModel
+@end
+
+@implementation QXRoomActivityModel
++(NSDictionary *)modelContainerPropertyGenericClass{
+ return @{
+ @"xlh_info" : @"QXRoomActivitySubModel"
+ };
+}
+@end
+
+@implementation QXRoomActivitySubModel
+
+
@end
diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.h b/QXLive/Mine(音域)/Services/QXMineNetwork.h
index 69f9083..1d1c019 100644
--- a/QXLive/Mine(音域)/Services/QXMineNetwork.h
+++ b/QXLive/Mine(音域)/Services/QXMineNetwork.h
@@ -22,6 +22,7 @@
#import "QXPayTypeModel.h"
#import "QXDayTaskModel.h"
#import "QXRoomUserCharmModel.h"
+#import "QXRoomHourRankModel.h"
NS_ASSUME_NONNULL_BEGIN
@@ -443,6 +444,13 @@ NS_ASSUME_NONNULL_BEGIN
search:(NSString*)search
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
+/**
+ 搜索接口 (房间,用户)
+
+ */
++(void)searchListApiWithKetwords:(NSString*)keywords
+ successBlock:(void (^)(NSDictionary* dict))successBlock
+ failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
设置主持收益比例
@@ -1047,6 +1055,26 @@ NS_ASSUME_NONNULL_BEGIN
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
+/**
+ 绑定详情
+"id": "string",
+"alipay_name": "string",
+"alipay_account": "string",
+"bank_card_number": "string",
+"bank_user_name": "string",
+"bank_card": "string",
+"open_bank": "string"
+ */
++(void)walletBindDetailWithUserId:(NSString*)user_id
+ type:(NSString*)type
+ successBlock:(void (^)(NSDictionary* dict))successBlock
+ failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
+
+
+
++(void)roomHourRankWithPage:(NSInteger)page
+ successBlock:(void (^)(QXRoomHourRankModel* model))successBlock
+ failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@end
diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.m b/QXLive/Mine(音域)/Services/QXMineNetwork.m
index 08f74df..d9d007c 100644
--- a/QXLive/Mine(音域)/Services/QXMineNetwork.m
+++ b/QXLive/Mine(音域)/Services/QXMineNetwork.m
@@ -904,6 +904,22 @@
}];
}
++(void)searchListApiWithKetwords:(NSString*)keywords
+ successBlock:(void (^)(NSDictionary* dict))successBlock
+ failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
+ NSDictionary *parameters =@{
+ @"search":keywords?keywords:@"",
+ };
+ [[QXRequset shareInstance] postWithUrl:QXSearchListApi parameters:parameters needCache:NO success:^(id responseObject) {
+ if (successBlock) {
+ successBlock(responseObject[@"data"]);
+ }
+ } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
+ failBlock(error,msg);
+ }];
+}
+
+
/**
设置主持收益比例
*/
@@ -2063,4 +2079,34 @@
failBlock(error,msg);
}];
}
+
++(void)walletBindDetailWithUserId:(NSString *)user_id type:(NSString *)type successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
+ NSDictionary *parameters =@{
+ @"user_id":user_id?user_id:@"",
+ @"type":type?type:@""
+ };
+ [[QXRequset shareInstance] postWithUrl:QXWalletBindDetail parameters:parameters needCache:NO success:^(id responseObject) {
+ if (successBlock) {
+ successBlock(responseObject[@"data"]);
+ }
+ } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
+ failBlock(error,msg);
+ }];
+}
+
++(void)roomHourRankWithPage:(NSInteger)page successBlock:(void (^)(QXRoomHourRankModel * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
+ NSDictionary *parameters =@{
+ @"page":[NSNumber numberWithInteger:page]
+ };
+ [[QXRequset shareInstance] postWithUrl:QXRoomHourRank parameters:parameters needCache:NO success:^(id responseObject) {
+ if (successBlock) {
+ QXRoomHourRankModel *model = [QXRoomHourRankModel yy_modelWithJSON:responseObject[@"data"]];
+ successBlock(model);
+ }
+ } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
+ failBlock(error,msg);
+ }];
+}
+
+
@end
diff --git a/QXLive/Mine(音域)/View/充值/QXRechargeView.m b/QXLive/Mine(音域)/View/充值/QXRechargeView.m
index a0dccd7..640067c 100644
--- a/QXLive/Mine(音域)/View/充值/QXRechargeView.m
+++ b/QXLive/Mine(音域)/View/充值/QXRechargeView.m
@@ -88,10 +88,10 @@
[QXMineNetwork getRechargeListSuccessBlock:^(NSArray * _Nonnull list) {
[weakSelf.rechargeDataArray removeAllObjects];
[weakSelf.rechargeDataArray addObjectsFromArray:list];
- QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
- model.money = @"0";
- model.coins = @"0";
- [weakSelf.rechargeDataArray addObject:model];
+// QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
+// model.money = @"0";
+// model.coins = @"0";
+// [weakSelf.rechargeDataArray addObject:model];
[weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -264,19 +264,18 @@
showToast(@"请选择充值金额");
return;
}
- if (self.isPop) {
- [self hide];
- }
- MJWeakSelf
+
+ @weakify(self)
[QXMineNetwork rechargePayWithMoney:self.selectedModel.money coin:self.selectedModel.coins type:self.selectedPayTypeModel.type userId:QXGlobal.shareGlobal.loginModel.user_id successBlock:^(NSDictionary * _Nonnull dict) {
- if (weakSelf.selectedPayTypeModel.type.intValue == 2) {
+ @strongify(self)
+ if (self.selectedPayTypeModel.type.intValue == 2) {
NSDictionary *resultDict = dict[@"data"];
NSString *order = [NSString stringWithFormat:@"%@",resultDict[@"ali"]];
[[AlipaySDK defaultService] payOrder:order fromScheme:@"midilive" callback:^(NSDictionary *resultDic) {
NSLog(@"支付宝H5支付回调 - %@", resultDic);
}];
- }else if (weakSelf.selectedPayTypeModel.type.intValue == 1) {
+ }else if (self.selectedPayTypeModel.type.intValue == 1) {
NSDictionary *resultDict = dict[@"data"][@"wx"];
NSString *appid = resultDict[@"appid"];
NSString *partnerId = resultDict[@"partnerid"];
@@ -297,7 +296,7 @@
}];
}
- else if (weakSelf.selectedPayTypeModel.type.intValue == 4) {
+ else if (self.selectedPayTypeModel.type.intValue == 4) {
NSMutableDictionary*dic = [NSMutableDictionary dictionaryWithDictionary:dict[@"data"][@"tl"]];
[dic removeObjectForKey:@"json_data"];
NSString *json = [dic jsonStringEncoded];
@@ -312,7 +311,7 @@
NSString *doubleEncodedQuery = [queryString stringByAddingPercentEncodingWithAllowedCharacters:customSet3];
NSString *jumpStr = [NSString stringWithFormat:@"alipays://platformapi/startapp?appId=2021001104615521&page=pages/orderDetail/orderDetail&%@&query=%@",encodedString,doubleEncodedQuery];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:jumpStr] options:@{} completionHandler:nil];
- }else if (weakSelf.selectedPayTypeModel.type.intValue == 5) {
+ }else if (self.selectedPayTypeModel.type.intValue == 5) {
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_e64a1a89a0ad";
NSDictionary *dic = dict[@"data"][@"tl"];
@@ -328,7 +327,9 @@
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease;
[WXApi sendReq:launchMiniProgramReq completion:nil];
}
-
+ if (self.isPop) {
+ [self hide];
+ }
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg)
}];
diff --git a/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.m b/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.m
index 6b55e5a..9e338f9 100644
--- a/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.m
+++ b/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.m
@@ -31,10 +31,10 @@
-(void)setType:(NSInteger)type{
_type = type;
if (type == 0) {
- self.roomSubsidyBtn.hidden = NO;
+// self.roomSubsidyBtn.hidden = NO;
self.roomDetailBtn.hidden = NO;
}else{
- self.roomSubsidyBtn.hidden = YES;
+// self.roomSubsidyBtn.hidden = YES;
self.roomDetailBtn.hidden = NO;
}
diff --git a/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.xib b/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.xib
index e120e86..70e4974 100644
--- a/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.xib
+++ b/QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.xib
@@ -104,7 +104,7 @@
-