Compare commits
1 Commits
081aa5622c
...
1.1.18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
491b97f3cb |
@@ -754,7 +754,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -793,7 +793,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.17;
|
||||
MARKETING_VERSION = 1.1.18;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -820,7 +820,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -859,7 +859,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.17;
|
||||
MARKETING_VERSION = 1.1.18;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@@ -57,6 +57,8 @@ typedef void (^showFinishBlock)(void);
|
||||
|
||||
@property (nonatomic,strong)NSString *superRoomId;
|
||||
|
||||
@property (nonatomic,strong)NSMutableArray *messageArray;
|
||||
|
||||
-(void)miniRoomWithRoomId:(NSString*)roomId roomCover:(NSString*)roomCover;
|
||||
|
||||
|
||||
|
||||
@@ -496,4 +496,10 @@
|
||||
-(void)dirfViewBecomeToFront{
|
||||
[[QXDrifNobilityJoinRoomView shareView] dirfViewBecomeToFront];
|
||||
}
|
||||
-(NSMutableArray *)messageArray{
|
||||
if (!_messageArray) {
|
||||
_messageArray = [NSMutableArray array];
|
||||
}
|
||||
return _messageArray;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#import "QXInvitePopView.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXSignInAppView.h"
|
||||
#import "QXHomeAppStoreView.h"
|
||||
|
||||
@interface QXHomeViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate,GKCycleScrollViewDataSource,GKCycleScrollViewDelegate,QXGiftScrollViewDelegate,SDCycleScrollViewDelegate,QXHomeTopViewDelegate>
|
||||
@property (nonatomic, strong) JXPagerView *pagingView;
|
||||
@@ -62,6 +63,7 @@
|
||||
|
||||
@property (nonatomic,strong)QXRechargePermissionModel *permissionModel;
|
||||
@property (nonatomic,strong)QXRoomListModel *recommendRoom;
|
||||
@property (nonatomic,strong)QXHomeAppStoreView *appStoreView;
|
||||
/// 今日签到状态
|
||||
//@property (nonatomic,strong)NSString* signStatus;
|
||||
@end
|
||||
@@ -151,16 +153,22 @@
|
||||
// }];
|
||||
[self getBanner];
|
||||
// [self getRechargePermission];
|
||||
// self.appStoreView.hidden = YES;
|
||||
// [self.view addSubview:self.appStoreView];
|
||||
|
||||
self.appStoreView.hidden = YES;
|
||||
[self.view addSubview:self.appStoreView];
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
self.pagingView.hidden = YES;
|
||||
self.appStoreView.hidden = NO;
|
||||
}else{
|
||||
self.appStoreView.hidden = YES;
|
||||
self.pagingView.hidden = NO;
|
||||
|
||||
}
|
||||
self.rechargePermissionView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(SCREEN_WIDTH-80-17, SCREEN_HEIGHT-(TabbarContentHeight+90+80), 80, 80) delegate:self placeholderImage:nil];
|
||||
self.rechargePermissionView.pageControlBottomOffset = -15;
|
||||
self.rechargePermissionView.backgroundColor = [UIColor clearColor];
|
||||
self.rechargePermissionView.hidden = YES;
|
||||
[self.view addSubview:self.rechargePermissionView];
|
||||
[self getRecommendRoom];
|
||||
// [self getSignStatus];
|
||||
}
|
||||
- (void)viewDidLayoutSubviews {
|
||||
[super viewDidLayoutSubviews];
|
||||
@@ -506,6 +514,9 @@
|
||||
}
|
||||
[self.bannerArry removeAllObjects];
|
||||
[self.bannerArry addObjectsFromArray:list];
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
self.appStoreView.bannerArray = list;
|
||||
}
|
||||
// self.appStoreView.bannerArray = list;
|
||||
self.bannerScrollView.imageURLStringsGroup = arr;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
@@ -755,12 +766,12 @@
|
||||
return _rechargePermissionArray;
|
||||
}
|
||||
|
||||
//-(QXAppstoreHomeView *)appStoreView{
|
||||
// if (!_appStoreView) {
|
||||
// _appStoreView = [[QXAppstoreHomeView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight-TabbarContentHeight)];
|
||||
// }
|
||||
// return _appStoreView;
|
||||
//}
|
||||
-(QXHomeAppStoreView *)appStoreView{
|
||||
if (!_appStoreView) {
|
||||
_appStoreView = [[QXHomeAppStoreView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight-TabbarContentHeight)];
|
||||
}
|
||||
return _appStoreView;
|
||||
}
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXHotRoomViewController : QXBaseViewController
|
||||
@property (nonatomic,strong)NSArray<QXRoomListModel *>*list;
|
||||
@property (nonatomic,strong)NSString *labelId;
|
||||
@property (nonatomic,strong)NSString *labelName;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "QXHotRoomViewController.h"
|
||||
#import "QXHomeRoomCell.h"
|
||||
#import "QXHomePageNetwork.h"
|
||||
@interface QXHotRoomViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
}
|
||||
-(void)setNavgationItems{
|
||||
[super setNavgationItems];
|
||||
self.navigationItem.title = @"热门房间";
|
||||
self.navigationItem.title = [self.labelName isExist]?self.labelName:@"热门房间";
|
||||
}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
@@ -29,6 +30,21 @@
|
||||
-(void)initSubViews{
|
||||
[self.view addSubview:self.collectionView];
|
||||
}
|
||||
-(void)setLabelId:(NSString *)labelId{
|
||||
_labelId = labelId;
|
||||
[self getRoomList];
|
||||
}
|
||||
|
||||
-(void)getRoomList{
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork homeRoomListWithPage:0 is_top:NO label_id:self.labelId successBlock:^(NSArray<QXRoomListModel *> * _Nonnull list, BOOL isAppStore) {
|
||||
@strongify(self)
|
||||
self.list = list;
|
||||
[self.collectionView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout
|
||||
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
|
||||
return 1;
|
||||
|
||||
45
QXLive/HomePage(声播)/View/首页/QXHomeAppStoreView.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// QXHomeAppStoreView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXRoomListModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
/// 签约房
|
||||
QXHomeAppStoreViewTypeSign = 0,
|
||||
/// ktv
|
||||
QXHomeAppStoreViewTypeKtv = 1,
|
||||
/// 唱歌
|
||||
QXHomeAppStoreViewTypeSinger = 2,
|
||||
}QXHomeAppStoreViewType;
|
||||
@interface QXHomeAppStoreView : UIView
|
||||
@property (nonatomic,strong)NSArray *bannerArray;
|
||||
@end
|
||||
|
||||
@interface QXHomeAppStoreTypeView : UIView
|
||||
@property (nonatomic,strong)UIImageView *imageView;
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@property (nonatomic,strong)UIButton *button;
|
||||
@property (nonatomic,assign)QXHomeAppStoreViewType viewType;
|
||||
@end
|
||||
|
||||
@interface QXHomeAppStoreTypeCell : UITableViewCell
|
||||
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UIImageView *roomConverImageView;
|
||||
@property (nonatomic,strong)UILabel *roomNameLabel;
|
||||
@property (nonatomic,strong)UIImageView *onlineImageView;
|
||||
@property (nonatomic,strong)UILabel *roomIdLabel;
|
||||
@property (nonatomic,strong)UIImageView *iconImageView;
|
||||
@property (nonatomic,strong)UIImageView *hotImageView;
|
||||
@property (nonatomic,strong)UILabel *hotLabel;
|
||||
@property (strong, nonatomic) QXRoomListModel *model;
|
||||
|
||||
+(instancetype)cellWithTableView:(UITableView*)tableView;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
353
QXLive/HomePage(声播)/View/首页/QXHomeAppStoreView.m
Normal file
@@ -0,0 +1,353 @@
|
||||
//
|
||||
// QXHomeAppStoreView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/17.
|
||||
//
|
||||
|
||||
#import "QXHomeAppStoreView.h"
|
||||
#import "SDCycleScrollView/SDCycleScrollView.h"
|
||||
#import "QXHomePageNetwork.h"
|
||||
#import "QXUserHomePageViewController.h"
|
||||
#import "QXHotRoomViewController.h"
|
||||
|
||||
@interface QXHomeAppStoreView()<SDCycleScrollViewDelegate,UITableViewDataSource,UITableViewDelegate>
|
||||
@property (nonatomic,strong)SDCycleScrollView *bannaerView;
|
||||
@property (nonatomic,strong)QXHomeAppStoreTypeView *signView;
|
||||
@property (nonatomic,strong)QXHomeAppStoreTypeView *ktvView;
|
||||
@property (nonatomic,strong)QXHomeAppStoreTypeView *singerView;
|
||||
@property (nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
@end
|
||||
@implementation QXHomeAppStoreView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.bannaerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(16, 0, SCREEN_WIDTH-32, ScaleWidth(136)) delegate:self placeholderImage:nil];
|
||||
[self.bannaerView addRoundedCornersWithRadius:15];
|
||||
[self addSubview:self.bannaerView];
|
||||
|
||||
self.ktvView = [[QXHomeAppStoreTypeView alloc] init];
|
||||
self.ktvView.viewType = QXHomeAppStoreViewTypeKtv;
|
||||
[self addSubview:self.ktvView];
|
||||
[self.ktvView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(ScaleWidth(107));
|
||||
make.height.mas_equalTo(ScaleWidth(118));
|
||||
make.centerX.equalTo(self);
|
||||
make.top.mas_equalTo(163);
|
||||
}];
|
||||
|
||||
self.signView = [[QXHomeAppStoreTypeView alloc] init];
|
||||
self.signView.viewType = QXHomeAppStoreViewTypeSign;
|
||||
[self addSubview:self.signView];
|
||||
[self.signView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(ScaleWidth(107));
|
||||
make.height.mas_equalTo(ScaleWidth(118));
|
||||
make.right.equalTo(self.ktvView.mas_left).offset(-12);
|
||||
make.top.equalTo(self.ktvView);
|
||||
}];
|
||||
|
||||
|
||||
self.singerView = [[QXHomeAppStoreTypeView alloc] init];
|
||||
self.singerView.viewType = QXHomeAppStoreViewTypeSinger;
|
||||
[self addSubview:self.singerView];
|
||||
[self.singerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(ScaleWidth(107));
|
||||
make.height.mas_equalTo(ScaleWidth(118));
|
||||
make.left.equalTo(self.ktvView.mas_right).offset(12);
|
||||
make.top.equalTo(self.ktvView);
|
||||
}];
|
||||
MJWeakSelf
|
||||
[self.ktvView addTapBlock:^(id _Nonnull obj) {
|
||||
QXHotRoomViewController *vc = [[QXHotRoomViewController alloc] init];
|
||||
vc.labelId = @"2";
|
||||
vc.labelName = @"练歌厅";
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}];
|
||||
|
||||
[self.signView addTapBlock:^(id _Nonnull obj) {
|
||||
QXHotRoomViewController *vc = [[QXHotRoomViewController alloc] init];
|
||||
vc.labelId = @"7";
|
||||
vc.labelName = @"签约厅";
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}];
|
||||
|
||||
[self.singerView addTapBlock:^(id _Nonnull obj) {
|
||||
QXHotRoomViewController *vc = [[QXHotRoomViewController alloc] init];
|
||||
vc.labelId = @"6";
|
||||
vc.labelName = @"点唱厅";
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}];
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:(UITableViewStyleGrouped)];
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.rowHeight = 98;
|
||||
self.tableView.backgroundColor = UIColor.clearColor;
|
||||
[self addSubview:self.tableView];
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.ktvView.mas_bottom).offset(10);
|
||||
make.bottom.equalTo(self);
|
||||
make.left.right.equalTo(self);
|
||||
}];
|
||||
[self getRoomList];
|
||||
}
|
||||
-(void)getRoomList{
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork homeRoomListWithPage:0 is_top:NO label_id:@"2" successBlock:^(NSArray<QXRoomListModel *> * _Nonnull list, BOOL isAppStore) {
|
||||
@strongify(self)
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.dataArray addObjectsFromArray:list];
|
||||
[self.tableView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
-(void)setBannerArray:(NSArray *)bannerArray{
|
||||
_bannerArray = bannerArray;
|
||||
NSMutableArray *arr = [NSMutableArray array];
|
||||
for (QXBanner *banner in bannerArray) {
|
||||
[arr addObject:banner.image];
|
||||
}
|
||||
self.bannaerView.imageURLStringsGroup = arr;
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXHomeAppStoreTypeCell *cell = [QXHomeAppStoreTypeCell cellWithTableView:tableView];
|
||||
cell.model = self.dataArray[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, 30)];
|
||||
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 0, self.width-32, 30)];
|
||||
titleLabel.font = [UIFont boldSystemFontOfSize:20];
|
||||
titleLabel.textColor = RGB16(0xffffff);
|
||||
[header addSubview:titleLabel];
|
||||
titleLabel.text = @"热门练歌房";
|
||||
return header;
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
return 30;
|
||||
}
|
||||
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
return nil;
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 0;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXRoomListModel *model = self.dataArray[indexPath.row];
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:model.room_id isRejoin:NO navagationController:self.navigationController];
|
||||
}
|
||||
|
||||
-(void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index{
|
||||
if (!QXGlobal.shareGlobal.isLogin) {
|
||||
[[QXGlobal shareGlobal] logOut];
|
||||
return;
|
||||
}
|
||||
|
||||
QXBanner *banner = self.bannerArray[index];
|
||||
if ([banner.type isEqualToString:@"2"]) {
|
||||
QXBaseWebViewController *webVc = [[QXBaseWebViewController alloc] init];
|
||||
webVc.urlStr = banner.url;
|
||||
[self.navigationController pushViewController:webVc animated:YES];
|
||||
}else if ([banner.type isEqualToString:@"3"]){
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:banner.aid isRejoin:NO navagationController:self.navigationController];
|
||||
}else if ([banner.type isEqualToString:@"4"]){
|
||||
QXUserHomePageViewController *userHomePage = [[QXUserHomePageViewController alloc] init];
|
||||
userHomePage.user_id = banner.aid;
|
||||
[self.navigationController pushViewController:userHomePage animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
-(NSMutableArray *)dataArray{
|
||||
if (!_dataArray) {
|
||||
_dataArray = [NSMutableArray array];
|
||||
}
|
||||
return _dataArray;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation QXHomeAppStoreTypeView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)setViewType:(QXHomeAppStoreViewType )viewType{
|
||||
_viewType = viewType;
|
||||
switch (viewType) {
|
||||
case QXHomeAppStoreViewTypeSign:
|
||||
{
|
||||
self.backgroundColor = RGB16(0xF76386);
|
||||
self.imageView.image = [UIImage imageNamed:@"app_home_store_sign"];
|
||||
self.titleLabel.text = @"签约";
|
||||
}
|
||||
break;
|
||||
case QXHomeAppStoreViewTypeKtv:
|
||||
{
|
||||
self.backgroundColor = RGB16(0xAC97FE);
|
||||
self.imageView.image = [UIImage imageNamed:@"app_home_store_ktv"];
|
||||
self.titleLabel.text = @"练歌";
|
||||
}
|
||||
break;
|
||||
case QXHomeAppStoreViewTypeSinger:
|
||||
{
|
||||
self.backgroundColor = RGB16(0x05E8AB);
|
||||
self.imageView.image = [UIImage imageNamed:@"app_home_store_singer"];
|
||||
self.titleLabel.text = @"点唱";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.imageView = [[UIImageView alloc] init];
|
||||
[self addSubview:self.imageView];
|
||||
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(ScaleWidth(60));
|
||||
make.centerX.equalTo(self);
|
||||
make.centerY.equalTo(self).offset(-10);
|
||||
}];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.titleLabel.textColor = RGB16(0xffffff);
|
||||
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[self addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self);
|
||||
make.top.equalTo(self.imageView.mas_bottom).offset(5);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
[self addRoundedCornersWithRadius:20];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXHomeAppStoreTypeCell
|
||||
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
NSString *cellId = @"QXHomeAppStoreTypeCell";
|
||||
QXHomeAppStoreTypeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
||||
if (!cell) {
|
||||
cell = [[QXHomeAppStoreTypeCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:cellId];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubviews];
|
||||
self.contentView.backgroundColor = UIColor.clearColor;
|
||||
self.backgroundColor = UIColor.clearColor;
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)setModel:(QXRoomListModel *)model{
|
||||
_model = model;
|
||||
[self.roomConverImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover]];
|
||||
self.roomIdLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_number];
|
||||
self.roomNameLabel.text = [NSString stringWithFormat:@"%@",model.room_name];
|
||||
self.hotLabel.text = [NSString qx_showHotCountNum:model.hot_value.longLongValue];
|
||||
[self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon]];
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
self.bgView = [[UIView alloc] init];
|
||||
self.bgView.backgroundColor = RGB16(0x342F3E);
|
||||
[self.bgView addRoundedCornersWithRadius:16];
|
||||
[self.contentView addSubview:self.bgView];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.right.mas_equalTo(-16);
|
||||
make.top.mas_equalTo(8);
|
||||
make.bottom.mas_equalTo(-8);
|
||||
}];
|
||||
|
||||
self.roomConverImageView = [[UIImageView alloc] init];
|
||||
self.roomConverImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[self.bgView addSubview:self.roomConverImageView];
|
||||
[self.roomConverImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.bottom.equalTo(self.bgView);
|
||||
make.width.mas_equalTo(self.roomConverImageView.mas_height);
|
||||
}];
|
||||
|
||||
self.iconImageView = [[UIImageView alloc] init];
|
||||
self.iconImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self.bgView addSubview:self.iconImageView];
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-7);
|
||||
make.height.mas_equalTo(30);
|
||||
make.width.mas_equalTo(56);
|
||||
make.top.mas_equalTo(8);
|
||||
}];
|
||||
|
||||
self.roomNameLabel = [[UILabel alloc] init];
|
||||
self.roomNameLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.roomNameLabel.textColor = RGB16(0xffffff);
|
||||
self.roomNameLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.bgView addSubview:self.roomNameLabel];
|
||||
[self.roomNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.roomConverImageView.mas_right).offset(12);
|
||||
make.top.mas_equalTo(10);
|
||||
make.height.mas_equalTo(16);
|
||||
make.right.equalTo(self.iconImageView.mas_left).offset(-10);
|
||||
}];
|
||||
//
|
||||
self.onlineImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"app_home_store_online"]];
|
||||
[self.bgView addSubview:self.onlineImageView];
|
||||
[self.onlineImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.roomNameLabel.mas_bottom).offset(5);
|
||||
make.height.mas_equalTo(18);
|
||||
make.left.equalTo(self.roomNameLabel);
|
||||
make.width.mas_equalTo(49);
|
||||
}];
|
||||
//
|
||||
self.roomIdLabel = [[UILabel alloc] init];
|
||||
self.roomIdLabel.textColor = RGB16(0xCCCDC8);
|
||||
self.roomIdLabel.font = [UIFont systemFontOfSize:11];
|
||||
[self.bgView addSubview:self.roomIdLabel];
|
||||
[self.roomIdLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.roomNameLabel);
|
||||
make.top.equalTo(self.onlineImageView.mas_bottom).offset(5);
|
||||
make.height.mas_equalTo(16);
|
||||
}];
|
||||
//
|
||||
self.hotLabel = [[UILabel alloc] init];
|
||||
self.hotLabel.font = [UIFont systemFontOfSize:11];
|
||||
self.hotLabel.textColor = RGB16(0xCCCDC8);
|
||||
[self.bgView addSubview:self.hotLabel];
|
||||
[self.hotLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-15);
|
||||
make.centerY.equalTo(self.roomIdLabel);
|
||||
make.height.mas_equalTo(16);
|
||||
}];
|
||||
//
|
||||
self.hotImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_hot_icon"]];
|
||||
[self.bgView addSubview:self.hotImageView];
|
||||
[self.hotImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self.hotLabel.mas_left).offset(-3);
|
||||
make.height.width.mas_equalTo(16);
|
||||
make.centerY.equalTo(self.hotLabel);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
@@ -975,8 +975,10 @@
|
||||
[self.delegate didInsertMessge:model];
|
||||
}
|
||||
}else if (meesageType == QXRoomMessageTypeClearMessage) {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClearAllMessage)]) {
|
||||
[self.delegate didClearAllMessage];
|
||||
if ([self.groupId isEqualToString:groupId]) {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClearAllMessage)]) {
|
||||
[self.delegate didClearAllMessage];
|
||||
}
|
||||
}
|
||||
}else if (meesageType == QXRoomMessageTypeSongLrc){
|
||||
NSString *json = [NSString stringWithFormat:@"%@",msg.Text[@"text"]];
|
||||
|
||||
@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXGroupMemberViewController : QXBaseViewController
|
||||
@property (nonatomic,strong)NSString *groupId;
|
||||
/// 是否为群主 1 是群主 2不是群主
|
||||
/// 是否为群主 1 是群主 2管理员 3普通群成员
|
||||
@property (nonatomic,strong)NSString*isOwner;
|
||||
@end
|
||||
|
||||
|
||||
@@ -102,9 +102,39 @@
|
||||
cell.cellType = QXBlackListCellTypeGroupMember;
|
||||
cell.groupMemberModel = self.dataArray[indexPath.row];
|
||||
cell.delegate = self;
|
||||
cell.removeBtn.hidden = !(self.isOwner.intValue==1);
|
||||
// cell.removeBtn.hidden = !(self.isOwner.intValue==1);
|
||||
cell.removeBtn.hidden = YES;
|
||||
return cell;
|
||||
}
|
||||
-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
BOOL canEdit = self.isOwner.intValue==1 || self.isOwner.intValue==2;
|
||||
return canEdit;
|
||||
}
|
||||
-(UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXUserHomeModel *model = self.dataArray[indexPath.row];
|
||||
MJWeakSelf
|
||||
UIContextualAction *deletAction = [UIContextualAction contextualActionWithStyle:(UIContextualActionStyleDestructive) title:model.is_mute.intValue==1?@"解除禁言":@"禁言" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
|
||||
[weakSelf didClickGroupMemberMoreBtnWithGroupMemberModel:model];
|
||||
completionHandler(YES);
|
||||
}];
|
||||
UIContextualAction *editAction = [UIContextualAction contextualActionWithStyle:(UIContextualActionStyleNormal) title:model.group_role.intValue==2?@"取消管理":@"设为管理" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
|
||||
[weakSelf setGroupManagerWithModel:model];
|
||||
completionHandler(YES);
|
||||
}];
|
||||
editAction.backgroundColor = RGB16(0x3665F9);
|
||||
NSArray *eidtArr;
|
||||
if (self.isOwner.intValue == 1) {
|
||||
if (model.group_role.intValue == 1) {
|
||||
eidtArr = @[deletAction];
|
||||
}else{
|
||||
eidtArr = @[deletAction,editAction];
|
||||
}
|
||||
}else if (self.isOwner.intValue == 2){
|
||||
eidtArr = @[deletAction];
|
||||
}
|
||||
UISwipeActionsConfiguration *config = [UISwipeActionsConfiguration configurationWithActions:eidtArr];
|
||||
return config;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
QXUserHomeModel *model = self.dataArray[indexPath.row];
|
||||
@@ -112,12 +142,10 @@
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
-(void)didClickGroupMemberMoreBtnWithGroupMemberModel:(QXUserHomeModel *)groupMemberModel{
|
||||
UIAlertController*al =[UIAlertController alertControllerWithTitle:@"禁言" message:@"" preferredStyle:(UIAlertControllerStyleActionSheet)];
|
||||
if (groupMemberModel.is_mute.intValue == 1) {
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"解禁" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:0 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
[self muteMemberWithTime:0 groupMemberModel:groupMemberModel];
|
||||
}else{
|
||||
UIAlertController*al =[UIAlertController alertControllerWithTitle:@"禁言" message:@"" preferredStyle:(UIAlertControllerStyleActionSheet)];
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"禁言1天" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:86400 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
@@ -130,13 +158,17 @@
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"禁言30天" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:86400*30 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
|
||||
|
||||
}]];
|
||||
[self presentViewController:al animated:YES completion:nil];
|
||||
}
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
|
||||
|
||||
}]];
|
||||
[self presentViewController:al animated:YES completion:nil];
|
||||
}
|
||||
-(void)muteMemberWithTime:(uint32_t)time groupMemberModel:(QXUserHomeModel*)groupMemberModel{
|
||||
if (groupMemberModel.group_role.intValue == 4) {
|
||||
showToast(@"该成员信息错误");
|
||||
return;
|
||||
}
|
||||
[[V2TIMManager sharedInstance] muteGroupMember:self.groupId member:[NSString stringWithFormat:@"u%@",groupMemberModel.user_id] muteTime:time succ:^{
|
||||
if (time == 0) {
|
||||
showToast(@"解禁成功");
|
||||
@@ -153,6 +185,26 @@
|
||||
showToast(desc);
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)setGroupManagerWithModel:(QXUserHomeModel*)groupMemberModel{
|
||||
if (groupMemberModel.group_role.intValue == 4) {
|
||||
showToast(@"该成员信息错误");
|
||||
return;
|
||||
}
|
||||
uint32_t role = V2TIM_GROUP_MEMBER_ROLE_ADMIN;
|
||||
if (groupMemberModel.group_role.intValue == 2) {
|
||||
role = V2TIM_GROUP_MEMBER_ROLE_MEMBER;
|
||||
}
|
||||
[[V2TIMManager sharedInstance] setGroupMemberRole:self.groupId member:[NSString stringWithFormat:@"u%@",groupMemberModel.user_id] newRole:role succ:^{
|
||||
if (self.isSearch) {
|
||||
[self getMemberListWithSearch:self.textField.text];
|
||||
}else{
|
||||
[self getMemberListWithSearch:@""];
|
||||
}
|
||||
} fail:^(int code, NSString * _Nullable desc) {
|
||||
showToast(desc);
|
||||
}];
|
||||
}
|
||||
-(UITableView *)tableView{
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.seachBgView.bottom+10, SCREEN_WIDTH, SCREEN_HEIGHT-self.seachBgView.bottom-10) style:(UITableViewStylePlain)];
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
#import "QXMessageServices.h"
|
||||
#import "QXGroupMemberViewController.h"
|
||||
#import "ImSDK_Plus/V2TIMManager+Group.h"
|
||||
#import "ImSDK_Plus/V2TIMManager+Conversation.h"
|
||||
@interface QXIMGroupSettingVC ()<QXIMGroupSettingViewDelegate>
|
||||
@property (nonatomic,strong)UIScrollView *scrollView;
|
||||
@property (nonatomic,strong)QXIMGroupSettingView *settingView;
|
||||
@property (nonatomic,strong)QXGroupSettingInfoModel *model;
|
||||
@property (nonatomic,strong)V2TIMGroupInfoResult *groupInfo;
|
||||
@end
|
||||
|
||||
@implementation QXIMGroupSettingVC
|
||||
@@ -35,6 +37,18 @@
|
||||
self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight)];
|
||||
self.settingView = [[QXIMGroupSettingView alloc] initWithFrame:self.scrollView.bounds];
|
||||
self.settingView.delegate = self;
|
||||
@weakify(self);
|
||||
[[V2TIMManager sharedInstance] getGroupsInfo:@[self.groupId] succ:^(NSArray<V2TIMGroupInfoResult *> *groupResultList) {
|
||||
@strongify(self);
|
||||
V2TIMGroupInfoResult *groupInfo = [groupResultList firstObject];
|
||||
if (groupInfo.info.recvOpt == V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE) {
|
||||
self.settingView.isNotDisturb = YES;
|
||||
}else{
|
||||
self.settingView.isNotDisturb = NO;
|
||||
}
|
||||
} fail:^(int code, NSString * _Nullable desc) {
|
||||
|
||||
}];
|
||||
[self.scrollView addSubview:self.settingView];
|
||||
[self.view addSubview:self.scrollView];
|
||||
[self getGroupInfo];
|
||||
@@ -67,6 +81,27 @@
|
||||
}
|
||||
}];
|
||||
}
|
||||
-(void)groupMessageIsNotDisturb:(BOOL)isNotDisturb notDisturbSwitch:(UISwitch *)notDisturbSwitch{
|
||||
V2TIMReceiveMessageOpt opt;
|
||||
if (isNotDisturb) {
|
||||
opt = V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE;
|
||||
} else {
|
||||
opt = V2TIM_RECEIVE_MESSAGE;
|
||||
}
|
||||
[V2TIMManager.sharedInstance markConversation:@[ [NSString stringWithFormat:@"group_%@", self.groupId] ]
|
||||
markType:@(V2TIM_CONVERSATION_MARK_TYPE_FOLD)
|
||||
enableMark:NO
|
||||
succ:nil
|
||||
fail:^(int code, NSString * _Nullable desc) {
|
||||
if (isNotDisturb) {
|
||||
notDisturbSwitch.on = NO;
|
||||
}else{
|
||||
notDisturbSwitch.on = YES;
|
||||
}
|
||||
}];
|
||||
|
||||
[[V2TIMManager sharedInstance] setGroupReceiveMessageOpt:self.groupId opt:opt succ:nil fail:nil];
|
||||
}
|
||||
|
||||
-(void)getGroupInfo{
|
||||
MJWeakSelf
|
||||
|
||||
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (strong,nonatomic)NSString *notification;
|
||||
/// 群聊头像
|
||||
@property (strong,nonatomic)NSString *guild_cover;
|
||||
/// 是否为群主 1 是群主 2不是群主
|
||||
/// 是否为群主 1 是群主 2管理员 3群成员
|
||||
@property (strong,nonatomic)NSString *is_deacon;
|
||||
/// 群成员列表
|
||||
@property (strong,nonatomic)NSArray <QXUserModel*>*user_list;
|
||||
|
||||
@@ -13,10 +13,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@optional
|
||||
-(void)previewMemberList;
|
||||
-(void)groupSetMute:(BOOL)isMute muteSwitch:(UISwitch*)muteSwitch;
|
||||
/// 消息免打扰
|
||||
-(void)groupMessageIsNotDisturb:(BOOL)isNotDisturb notDisturbSwitch:(UISwitch*)notDisturbSwitch;
|
||||
-(void)saveGroupInfoWithGroupId:(NSString*)groupId notice:(NSString*)notice name:(NSString*)name;
|
||||
@end
|
||||
@interface QXIMGroupSettingView : UIView
|
||||
@property (nonatomic,strong)QXGroupSettingInfoModel*model;
|
||||
@property (nonatomic,assign)BOOL isNotDisturb;
|
||||
@property (nonatomic,weak)id<QXIMGroupSettingViewDelegate>delegate;
|
||||
@end
|
||||
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
@property (nonatomic,strong)UILabel *noticeTitleLabel;
|
||||
@property (nonatomic,strong)QXTextView *textView;
|
||||
|
||||
@property (nonatomic,strong)UILabel *messageDisturbLabel;
|
||||
@property (nonatomic,strong)UISwitch *messageDisturbSwitch;
|
||||
|
||||
@property (nonatomic,strong)UILabel *muteLabel;
|
||||
@property (nonatomic,strong)UISwitch *muteSwitch;
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
@@ -108,7 +111,18 @@
|
||||
[self addSubview:self.textView];
|
||||
|
||||
|
||||
self.muteLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.textView.bottom+10, 200, 40)];
|
||||
self.messageDisturbLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.textView.bottom+10, 200, 40)];
|
||||
self.messageDisturbLabel.text = @"消息免打扰";
|
||||
self.messageDisturbLabel.textColor = RGB16(0x000000);
|
||||
self.messageDisturbLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
[self addSubview:self.messageDisturbLabel];
|
||||
|
||||
self.messageDisturbSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(self.width-60-16, self.messageDisturbLabel.top+5, 60, 40)];
|
||||
[self.messageDisturbSwitch addTarget:self action:@selector(messageDisturbAction) forControlEvents:(UIControlEventValueChanged)];
|
||||
[self addSubview:self.messageDisturbSwitch];
|
||||
|
||||
|
||||
self.muteLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.messageDisturbLabel.bottom+10, 200, 40)];
|
||||
self.muteLabel.text = @"全员禁言";
|
||||
self.muteLabel.textColor = RGB16(0x000000);
|
||||
self.muteLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
@@ -138,20 +152,25 @@
|
||||
self.textView.text = model.notification;
|
||||
[self.muteSwitch setOn:model.mute_all_member.intValue==1];
|
||||
[self.collectionView reloadData];
|
||||
if (model.is_deacon.intValue == 2) {
|
||||
self.muteSwitch.hidden = YES;
|
||||
self.muteLabel.hidden = YES;
|
||||
self.saveBtn.hidden = YES;
|
||||
self.editGroupTextField.userInteractionEnabled = NO;
|
||||
self.textView.userInteractionEnabled = NO;
|
||||
}else{
|
||||
if (model.is_deacon.intValue == 1 || model.is_deacon.intValue == 2) {
|
||||
self.muteSwitch.hidden = NO;
|
||||
self.muteLabel.hidden = NO;
|
||||
self.saveBtn.hidden = NO;
|
||||
self.editGroupTextField.userInteractionEnabled = YES;
|
||||
self.textView.userInteractionEnabled = YES;
|
||||
}else{
|
||||
self.muteSwitch.hidden = YES;
|
||||
self.muteLabel.hidden = YES;
|
||||
self.saveBtn.hidden = YES;
|
||||
self.editGroupTextField.userInteractionEnabled = NO;
|
||||
self.textView.userInteractionEnabled = NO;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setIsNotDisturb:(BOOL)isNotDisturb{
|
||||
_isNotDisturb = isNotDisturb;
|
||||
self.messageDisturbSwitch.on = isNotDisturb;
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.model.user_list.count;
|
||||
}
|
||||
@@ -185,6 +204,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void)messageDisturbAction{
|
||||
if (self.messageDisturbSwitch.isOn) {
|
||||
QXLOG(@"打开免打扰");
|
||||
}else{
|
||||
QXLOG(@"关闭免打扰");
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(groupMessageIsNotDisturb:notDisturbSwitch:)]) {
|
||||
[self.delegate groupMessageIsNotDisturb:self.messageDisturbSwitch.isOn notDisturbSwitch:self.messageDisturbSwitch];
|
||||
}
|
||||
}
|
||||
|
||||
-(NSMutableArray *)dataArray{
|
||||
if (!_dataArray) {
|
||||
_dataArray = [NSMutableArray array];
|
||||
|
||||
@@ -278,19 +278,19 @@
|
||||
break;
|
||||
case QXMainHeaderOptionTypeWallet:{
|
||||
QXLOG(@"跳转钱包");
|
||||
BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:kWalletRuleHide];
|
||||
if (result) {
|
||||
QXWalletViewController * vc = [[QXWalletViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}else{
|
||||
QXWalletRuleView *ruleView = [[QXWalletRuleView alloc] init];
|
||||
MJWeakSelf
|
||||
ruleView.toWalletBlock = ^{
|
||||
QXWalletViewController*vc = [[QXWalletViewController alloc] init];
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
};
|
||||
[ruleView showInView:self.view];
|
||||
}
|
||||
// BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:kWalletRuleHide];
|
||||
// if (result) {
|
||||
QXWalletViewController * vc = [[QXWalletViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
// }else{
|
||||
// QXWalletRuleView *ruleView = [[QXWalletRuleView alloc] init];
|
||||
// MJWeakSelf
|
||||
// ruleView.toWalletBlock = ^{
|
||||
// QXWalletViewController*vc = [[QXWalletViewController alloc] init];
|
||||
// [weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
// };
|
||||
// [ruleView showInView:self.view];
|
||||
// }
|
||||
}
|
||||
break;
|
||||
case QXMainHeaderOptionTypeRoom:{
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#import "QXTimer.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXCOSUploadManager.h"
|
||||
//#import "QXRoomDetailHeaderView.h"
|
||||
|
||||
@interface QXCreateRoomViewController ()<UITextFieldDelegate>
|
||||
@property (nonatomic,strong) UILabel *roomCoverLabel;
|
||||
@@ -36,8 +37,13 @@
|
||||
@property (nonatomic,strong) UIButton *submitBtn; ///< 提交
|
||||
@property (nonatomic,assign)NSInteger selectedIndex;
|
||||
|
||||
@property (nonatomic,strong) QXTimer *timer;
|
||||
//@property (nonatomic,strong) UILabel *timeTitleLabel;
|
||||
//@property (nonatomic,strong) UILabel *startLabel;
|
||||
//@property (nonatomic,strong) UILabel *lineLabel;
|
||||
//@property (nonatomic,strong) UILabel *endLabel;
|
||||
|
||||
@property (nonatomic,strong) QXTimer *timer;
|
||||
//@property (nonatomic,strong)QXDatePickerView* pickerView;
|
||||
@end
|
||||
|
||||
@implementation QXCreateRoomViewController
|
||||
@@ -116,6 +122,34 @@
|
||||
make.right.equalTo(self.deleteBtn.mas_left).offset(-4);
|
||||
}];
|
||||
|
||||
// [self.view addSubview:self.timeTitleLabel];
|
||||
// [self.view addSubview:self.startLabel];
|
||||
// [self.view addSubview:self.lineLabel];
|
||||
// [self.view addSubview:self.endLabel];
|
||||
// [self.timeTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.equalTo(self.textFieldbgView.mas_bottom).offset(12);
|
||||
// make.left.equalTo(self.roomNameLabel);
|
||||
// make.height.mas_equalTo(24);
|
||||
// }];
|
||||
// [self.lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.equalTo(self.timeTitleLabel.mas_bottom).offset(12);
|
||||
// make.centerX.equalTo(self.view);
|
||||
// make.height.mas_equalTo(44);
|
||||
// make.width.mas_equalTo(20);
|
||||
// }];
|
||||
//
|
||||
// [self.startLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.equalTo(self.timeTitleLabel.mas_bottom).offset(12);
|
||||
// make.left.equalTo(self.roomNameLabel);
|
||||
// make.height.mas_equalTo(44);
|
||||
// make.right.equalTo(self.lineLabel.mas_left).offset(-3);
|
||||
// }];
|
||||
// [self.endLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.equalTo(self.timeTitleLabel.mas_bottom).offset(12);
|
||||
// make.left.equalTo(self.lineLabel.mas_right).offset(3);
|
||||
// make.height.mas_equalTo(44);
|
||||
// make.right.mas_equalTo(-16);
|
||||
// }];
|
||||
|
||||
|
||||
[self.view addSubview:self.roomNoticeLabel];
|
||||
@@ -325,6 +359,9 @@
|
||||
// sender.selected = !sender.selected;
|
||||
// self.typeBtn = sender;
|
||||
//}
|
||||
//-(void)selectedTimeAction{
|
||||
// [self.pickerView show];
|
||||
//}
|
||||
- (void)onSubmitBtnClick:(UIButton *)btn {
|
||||
|
||||
[self requestCreateMineRoomData];
|
||||
@@ -385,6 +422,58 @@
|
||||
}
|
||||
return _roomNoticeLabel;
|
||||
}
|
||||
//-(UILabel *)timeTitleLabel{
|
||||
// if (!_timeTitleLabel) {
|
||||
// _timeTitleLabel = [[UILabel alloc] init];
|
||||
// _timeTitleLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
// _timeTitleLabel.textColor = RGB16A(0x000000, 0.45);
|
||||
// _timeTitleLabel.text = @"营业时间";
|
||||
// }
|
||||
// return _timeTitleLabel;
|
||||
//}
|
||||
//-(UILabel *)startLabel{
|
||||
// if (!_startLabel) {
|
||||
// _startLabel = [[UILabel alloc] init];
|
||||
// _startLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
// _startLabel.textColor = RGB16(333333);
|
||||
// _startLabel.text = @"00:00";
|
||||
// _startLabel.backgroundColor = [UIColor colorWithHexString:@"#F0EEF7"];
|
||||
// [_startLabel addRoundedCornersWithRadius:11];
|
||||
// _startLabel.textAlignment = NSTextAlignmentCenter;
|
||||
// MJWeakSelf
|
||||
// [_startLabel addTapBlock:^(id _Nonnull obj) {
|
||||
// [weakSelf selectedTimeAction];
|
||||
// }];
|
||||
// }
|
||||
// return _startLabel;
|
||||
//}
|
||||
//-(UILabel *)lineLabel{
|
||||
// if (!_lineLabel) {
|
||||
// _lineLabel = [[UILabel alloc] init];
|
||||
// _lineLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
// _lineLabel.textColor = RGB16(333333);
|
||||
// _lineLabel.text = @"-";
|
||||
// _lineLabel.textAlignment = NSTextAlignmentCenter;
|
||||
// }
|
||||
// return _lineLabel;
|
||||
//}
|
||||
//-(UILabel *)endLabel{
|
||||
// if (!_endLabel) {
|
||||
// _endLabel = [[UILabel alloc] init];
|
||||
// _endLabel.font = [UIFont boldSystemFontOfSize:15];
|
||||
// _endLabel.textColor = RGB16(333333);
|
||||
// _endLabel.text = @"24:00";
|
||||
// _endLabel.backgroundColor = [UIColor colorWithHexString:@"#F0EEF7"];
|
||||
// [_endLabel addRoundedCornersWithRadius:11];
|
||||
// _endLabel.textAlignment = NSTextAlignmentCenter;
|
||||
// MJWeakSelf
|
||||
// [_endLabel addTapBlock:^(id _Nonnull obj) {
|
||||
// [weakSelf selectedTimeAction];
|
||||
// }];
|
||||
// }
|
||||
// return _endLabel;
|
||||
//}
|
||||
|
||||
|
||||
-(UILabel *)roomCoverLabel{
|
||||
if (!_roomCoverLabel) {
|
||||
@@ -467,4 +556,19 @@
|
||||
}
|
||||
return _warningLabel;
|
||||
}
|
||||
//-(QXDatePickerView *)pickerView{
|
||||
// if (!_pickerView) {
|
||||
// _pickerView = [[QXDatePickerView alloc] init];
|
||||
// _pickerView.pickerView.pickerMode = BRDatePickerModeHM;
|
||||
// _pickerView.pickerView.maxDate = [NSDate br_setHour:23 minute:59];
|
||||
// _pickerView.pickerView.minDate = [NSDate br_setHour:00 minute:00];
|
||||
// _pickerView.pickerView.selectDate = [NSDate br_setHour:00 minute:00];
|
||||
// MJWeakSelf
|
||||
// _pickerView.chooseDateBlock = ^(NSString * _Nonnull startTime, NSString * _Nonnull endTime) {
|
||||
// weakSelf.startLabel.text = startTime;
|
||||
// weakSelf.endLabel.text = endTime;
|
||||
// };
|
||||
// }
|
||||
// return _pickerView;
|
||||
//}
|
||||
@end
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
weakSelf.bankNumberTextField.textField.text = bank_card_number;
|
||||
}
|
||||
if ([bank_card isExist]) {
|
||||
weakSelf.bankNumberTextField.textField.text = bank_card_number;
|
||||
weakSelf.bankNameTextField.textField.text = bank_card;
|
||||
}
|
||||
if ([open_bank isExist]) {
|
||||
weakSelf.bankAddressTextField.textField.text = open_bank;
|
||||
@@ -107,7 +107,7 @@
|
||||
[QXMineNetwork walletBindWithUserId:QXGlobal.shareGlobal.loginModel.user_id type:self.model.type alipay_account:self.aliTextField.textField.text bank_card_number:self.bankNumberTextField.textField.text bank_card:self.bankNameTextField.textField.text open_bank:self.bankAddressTextField.textField.text successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg);
|
||||
}];;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -84,6 +84,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSString *queue_number;
|
||||
/// 酒吧房撩人所需金币数
|
||||
@property (nonatomic,strong)NSString *sexy_coin;
|
||||
/// 酒吧房撩人所需金币数
|
||||
@property (nonatomic,strong)NSString *start_time;
|
||||
/// 酒吧房撩人所需金币数
|
||||
@property (nonatomic,strong)NSString *end_time;
|
||||
@end
|
||||
|
||||
|
||||
@@ -357,6 +361,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSString *receive_type;
|
||||
/// 是否接受pk 1 接收 2不接受
|
||||
@property (nonatomic,strong)NSString *is_pk;
|
||||
/// 被闭麦用户
|
||||
@property (nonatomic,strong)NSString *close_users;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -133,8 +133,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSString *is_use_code;
|
||||
|
||||
@property (nonatomic,strong)NSString *in_room_id;
|
||||
|
||||
/// 是否被禁言
|
||||
@property (nonatomic,strong)NSString *is_mute;
|
||||
/// 群组角色 1 是群主 2管理员 3群成员 4非群成员
|
||||
@property (nonatomic,strong)NSString *group_role;
|
||||
|
||||
@property (nonatomic,strong)QXUserCpInfoModel *cp_info;
|
||||
|
||||
|
||||
@@ -662,7 +662,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
拍卖房关系列表
|
||||
1真爱拍 2 亲密拍
|
||||
1真爱拍 2 亲密拍 3 星球房
|
||||
*/
|
||||
+(void)roomRelationListWithType:(NSString*)type
|
||||
successBlock:(void (^)(NSArray<QXRoomRelationModel*>*list))successBlock
|
||||
@@ -1587,7 +1587,23 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
successBlock:(void (^)(NSArray* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
设置房间营业时间
|
||||
*/
|
||||
+(void)roomSetTimeWithRoomId:(NSString*)roomId
|
||||
start_time:(NSString*)start_time
|
||||
end_time:(NSString*)end_time
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
pk闭麦
|
||||
*/
|
||||
+(void)roomPkCloseMicWithPkId:(NSString*)pk_id
|
||||
type:(NSString*)type
|
||||
user_id:(NSString*)user_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -3110,6 +3110,7 @@
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":roomId?:@"",
|
||||
@"gift_id":gift_id?:@"",
|
||||
@"gift_remark_name":new_gift_name?:@""
|
||||
};
|
||||
@@ -3246,5 +3247,47 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
/**
|
||||
设置房间营业时间
|
||||
*/
|
||||
+(void)roomSetTimeWithRoomId:(NSString*)roomId
|
||||
start_time:(NSString*)start_time
|
||||
end_time:(NSString*)end_time
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":roomId?:@"",
|
||||
@"start_time":start_time?:@"",
|
||||
@"end_time":end_time?:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomSetTime parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
pk闭麦
|
||||
*/
|
||||
+(void)roomPkCloseMicWithPkId:(NSString*)pk_id
|
||||
type:(NSString*)type
|
||||
user_id:(NSString*)user_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"pk_id":pk_id?:@"",
|
||||
@"type":type?:@"",
|
||||
@"user_id":user_id?:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomPKCloseMic parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
[self.guildBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.headerView.mas_right);
|
||||
make.height.mas_equalTo(31);
|
||||
make.bottom.equalTo(self.headerView).offset(-10);
|
||||
make.bottom.equalTo(self.headerView).offset(5);
|
||||
make.width.mas_equalTo(94);
|
||||
}];
|
||||
|
||||
@@ -350,6 +350,7 @@
|
||||
make.top.equalTo(self.cpCardView.mas_bottom).offset(8);
|
||||
}];
|
||||
[self.whiteBgView bringSubviewToFront:self.playBtn];
|
||||
[self.whiteBgView bringSubviewToFront:self.toRoomBtn];
|
||||
[self bringSubviewToFront:self.followBtn];
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UIButton *cancelBtn;
|
||||
@property (nonatomic,strong)UIButton *doneBtn;
|
||||
@property (nonatomic,assign)BOOL isNoCompareDate;
|
||||
|
||||
@property (nonatomic,strong)UIButton *beginTimeBtn;
|
||||
@property (nonatomic,strong)UIView *beginTimeLine;
|
||||
|
||||
@@ -228,6 +228,9 @@
|
||||
}
|
||||
@end
|
||||
|
||||
@interface QXDatePickerView ()<UIGestureRecognizerDelegate>
|
||||
|
||||
@end
|
||||
@implementation QXDatePickerView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
@@ -242,6 +245,11 @@
|
||||
-(void)createViews{
|
||||
self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.5];
|
||||
self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, ScaleWidth(400))];
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hide)];
|
||||
tap.delegate = self;
|
||||
[self addGestureRecognizer:tap];
|
||||
|
||||
self.bgView.backgroundColor = [UIColor whiteColor];
|
||||
[self.bgView addRoundedCornersWithRadius:16 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
|
||||
[self addSubview:self.bgView];
|
||||
@@ -296,13 +304,19 @@
|
||||
[self.pickerView addPickerToView:self.pickerBGView];
|
||||
[self beginTimeAction];
|
||||
}
|
||||
|
||||
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
|
||||
return touch.view == self;
|
||||
}
|
||||
-(void)beginTimeAction{
|
||||
self.beginTimeBtn.selected = YES;
|
||||
self.beginTimeLine.backgroundColor = [UIColor colorWithHexString:@"#333333"];
|
||||
|
||||
self.endTimeBtn.selected = NO;
|
||||
self.endTimeLine.backgroundColor = [UIColor colorWithHexString:@"#BBBBBB"];
|
||||
|
||||
if (self.beginDate) {
|
||||
self.pickerView.selectDate = self.beginDate;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)endTimeAction{
|
||||
@@ -311,10 +325,26 @@
|
||||
|
||||
self.beginTimeBtn.selected = NO;
|
||||
self.beginTimeLine.backgroundColor = [UIColor colorWithHexString:@"#BBBBBB"];
|
||||
|
||||
if (self.endDate) {
|
||||
self.pickerView.selectDate = self.endDate;
|
||||
}
|
||||
}
|
||||
-(void)cancelAction{
|
||||
[self hide];
|
||||
}
|
||||
-(void)setIsNoCompareDate:(BOOL)isNoCompareDate{
|
||||
_isNoCompareDate = isNoCompareDate;
|
||||
}
|
||||
-(void)setBeginDate:(NSDate *)beginDate{
|
||||
_beginDate = beginDate;
|
||||
[self.beginTimeBtn setTitle:[NSString stringWithFormat:@"%02ld:%02ld",(long)beginDate.br_hour,beginDate.br_minute] forState:(UIControlStateNormal)];
|
||||
}
|
||||
-(void)setEndDate:(NSDate *)endDate{
|
||||
_endDate = endDate;
|
||||
[self.endTimeBtn setTitle:[NSString stringWithFormat:@"%02ld:%02ld",(long)endDate.br_hour,endDate.br_minute] forState:(UIControlStateNormal)];
|
||||
}
|
||||
|
||||
-(void)doneAction{
|
||||
if ([self.beginTimeBtn.titleLabel.text isEqualToString:@"开始时间"]) {
|
||||
showToast(@"请选择开始时间");
|
||||
@@ -324,10 +354,12 @@
|
||||
showToast(@"请选择结束时间");
|
||||
return;
|
||||
}
|
||||
NSComparisonResult result = [self.endDate compare:self.beginDate];
|
||||
if (result == NSOrderedAscending) {
|
||||
showToast(@"结束时间早于开始时间");
|
||||
return;
|
||||
if (!self.isNoCompareDate) {
|
||||
NSComparisonResult result = [self.endDate compare:self.beginDate];
|
||||
if (result == NSOrderedAscending) {
|
||||
showToast(@"结束时间早于开始时间");
|
||||
return;
|
||||
}
|
||||
}
|
||||
[self hide];
|
||||
if (self.chooseDateBlock) {
|
||||
|
||||
6
QXLive/Other/Assets.xcassets/home/appstore/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
22
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_ktv.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_ktv@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_ktv@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_ktv.imageset/app_home_store_ktv@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_ktv.imageset/app_home_store_ktv@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
22
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_online.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_online@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_online@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
22
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_sign.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_sign@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_sign@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_sign.imageset/app_home_store_sign@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_sign.imageset/app_home_store_sign@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
22
QXLive/Other/Assets.xcassets/home/appstore/app_home_store_singer.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_singer@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_home_store_singer@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
22
QXLive/Other/Assets.xcassets/room/room_set_room_time.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_set_room_time@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_set_room_time@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/room/room_set_room_time.imageset/room_set_room_time@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
QXLive/Other/Assets.xcassets/room/room_set_room_time.imageset/room_set_room_time@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
@@ -27,8 +27,6 @@ static NSString* RH5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
//static NSString* H5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
//static NSString* ServerUrl = @"https://vespa.qxyushen.top/";
|
||||
//static NSString* H5ServerUrl = @"https://vespa.qxyushen.top/h5/";
|
||||
//static NSString* ServerUrl = @"https://vsyusheng.qxhs.xyz/";
|
||||
//static NSString* H5ServerUrl = @"https://vsyusheng.qxhs.xyz/h5/";
|
||||
static NSString* ServerUrl = @"https://yushengapi.qxyushen.top/";
|
||||
static NSString* H5ServerUrl = @"https://yushengapi.qxyushen.top/h5/";
|
||||
static NSString* RServerUrl = @"https://details.qxhs.xyz/";
|
||||
@@ -612,7 +610,7 @@ static NSString * QXRoomCustomGiftList = @"api/GiftNew/get_custom_gift_list";
|
||||
static NSString * QXRoomSetCustom = @"api/GiftNew/set_custom_gift";
|
||||
/// 酒吧房麦位时长列表
|
||||
static NSString * QXRoomSeatTimeList = @"api/BarRoom/get_pit_time_list";
|
||||
///酒吧房麦位时长设置
|
||||
/// 酒吧房麦位时长设置
|
||||
static NSString * QXRoomSetSeatTime = @"api/BarRoom/set_pit_time";
|
||||
/// 约她礼物详情
|
||||
static NSString * QXRoomGetSeatGift = @"api/BarRoom/get_gift_info_ta";
|
||||
@@ -626,4 +624,8 @@ static NSString * QXRoomBarAsk = @"api/BarRoom/meeting_ta";
|
||||
static NSString * QXRoomBarCabinRoomList = @"api/BarRoom/black_room_list";
|
||||
/// 获取平台客服id
|
||||
static NSString * QXRoomServicesUserId = @"api/banner/app_customer_service";
|
||||
/// 设置房间营业时间
|
||||
static NSString * QXRoomSetTime = @"api/Room/set_room_business_time";
|
||||
/// pk闭麦
|
||||
static NSString * QXRoomPKCloseMic = @"api/RoomPk/close_pk_mic";
|
||||
#endif /* Api_h */
|
||||
|
||||
@@ -80,7 +80,8 @@
|
||||
/// 有人退出交友房私密小屋
|
||||
-(void)friendCabinRoomIsQuit{
|
||||
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId removeListener:YES];
|
||||
|
||||
[QXGlobal.shareGlobal.messageArray removeAllObjects];
|
||||
[QXGlobal.shareGlobal.messageArray addObjectsFromArray:self.chatListView.dataArray];
|
||||
NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
|
||||
for (int i = 0; i < viewControllers.count; i++) {
|
||||
UIViewController *vc = [viewControllers objectAtIndex:i];
|
||||
|
||||
@@ -519,6 +519,9 @@ QXUpSeatViewDelegate
|
||||
make.top.equalTo(self.seatContentView.mas_bottom);
|
||||
make.width.mas_equalTo(ScaleWidth(280));
|
||||
}];
|
||||
if (QXGlobal.shareGlobal.messageArray.count>0) {
|
||||
[self.chatListView insertMessageList:QXGlobal.shareGlobal.messageArray];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -608,6 +611,11 @@ QXUpSeatViewDelegate
|
||||
|
||||
if (isJoin) {
|
||||
MJWeakSelf
|
||||
// self.roomId = @"13";
|
||||
// self.roomModel.user_info.agora_token = @"0063e8f3add448d4692bc1d04c75ffe801bIAAB2cVP386pIGE2EB7gaxhd6U9EREnCFErEUuQRtGc6Plt0VDjz5DF8IgBgvQQFWaZsaQQAAQBZpmxpAwBZpmxpAgBZpmxpBABZpmxp";
|
||||
// self.roomModel.user_info.agora_rtm_token = @"007eJxTYCi+03HQjmPZmtSpHX0z5iR/DFc1e18nWl2iEeRn+2txzmEFBuNUizTjxJQUExOLFBMzS6OkZMMUA5Nkc9O0tFQLA8Ok3yHZmdXLcjJj44WZmRgYGViAGMRnApPMYJIFTDIyGLAyGBkCIUgdRBVUAAAq9yoa";
|
||||
// [self getRoomInfo];
|
||||
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
|
||||
[[QXAgoraEngine sharedEngine] joinChannel:self.roomId withRoom:self agora_token:self.roomModel.user_info.agora_token agora_rtm_token:self.roomModel.user_info.agora_rtm_token isUpSeat:self.seatContentView.myPitNumber>0 successBock:^{
|
||||
if (weakSelf.roomModel.song_user_info && (weakSelf.roomModel.room_info.type_id.intValue == 1 || weakSelf.roomModel.room_info.type_id.intValue == 3 || weakSelf.roomModel.room_info.type_id.intValue == 4 || weakSelf.roomModel.room_info.type_id.intValue == 8) && weakSelf.roomModel.room_info.label_id.intValue == 2) {
|
||||
if ([weakSelf.roomModel.song_user_info.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
@@ -676,6 +684,12 @@ QXUpSeatViewDelegate
|
||||
pkUserId = weakSelf.roomModel.pk_info.receive_pk_user_id;
|
||||
}
|
||||
[[QXAgoraEngineEx sharedEngine] joinExWithAgora_token:token channel:weakSelf.roomModel.pk_info.pk_room_id pkUserId:pkUserId];
|
||||
if ([self.roomModel.pk_info.close_users isExist]) {
|
||||
NSArray *arr = [self.roomModel.pk_info.close_users componentsSeparatedByString:@","];
|
||||
if ([arr containsObject:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
[[QXAgoraEngineEx sharedEngine] muteRemoteEXAudioStream:YES];
|
||||
}
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
@@ -1348,6 +1362,12 @@ QXUpSeatViewDelegate
|
||||
if (isSelected) {
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:YES];
|
||||
[[QXAgoraEngine sharedEngine] muteLocalAudioStream:NO];
|
||||
if ([self.roomModel.pk_info.close_users isExist]) {
|
||||
NSArray *arr = [self.roomModel.pk_info.close_users componentsSeparatedByString:@","];
|
||||
if ([arr containsObject:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
[[QXAgoraEngineEx sharedEngine] muteLocalEXAudioStream:YES fromUserInfo:nil];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
AgoraRtcAudioVolumeInfo *info = [[AgoraRtcAudioVolumeInfo alloc] init];
|
||||
info.uid = [QXGlobal shareGlobal].loginModel.user_id.longLongValue;
|
||||
|
||||
@@ -31,8 +31,10 @@ typedef NS_ENUM(NSInteger) {
|
||||
@class QXRoomChatListModel;
|
||||
@interface QXRoomChatListView : UIView
|
||||
@property (nonatomic,weak)id<QXRoomSeatDelegate>delegate;
|
||||
@property (nonatomic,strong,readonly)NSMutableArray *dataArray;
|
||||
|
||||
-(void)insertNoitce;
|
||||
-(void)insertMessageList:(NSArray*)messageList;
|
||||
-(void)insertMessage:(QXRoomChatListModel*)model;
|
||||
-(void)clearMessage;
|
||||
@end
|
||||
|
||||
@@ -40,7 +40,7 @@ NSArray<NSValue *> *findAllOccurrencesOfString(NSString *fullString, NSString *s
|
||||
|
||||
return [occurrences copy];
|
||||
}
|
||||
NSInteger maxMessageCount = 20;
|
||||
NSInteger maxMessageCount = 500;
|
||||
@interface QXRoomChatListView() <UITableViewDelegate,UITableViewDataSource,QXRoomSeatDelegate>
|
||||
@property (nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
@@ -194,9 +194,9 @@ NSInteger maxMessageCount = 20;
|
||||
// if (model.messageType == QXRoomChatMessageTypeGift) {
|
||||
// [self.giftArray addObject:model];
|
||||
// }
|
||||
// if (self.dataArray.count>maxMessageCount) {
|
||||
// [self.dataArray removeFirstObject];
|
||||
// }
|
||||
if (self.dataArray.count>maxMessageCount) {
|
||||
[self.dataArray removeFirstObject];
|
||||
}
|
||||
// if (self.chatArray.count>maxMessageCount) {
|
||||
// [self.chatArray removeFirstObject];
|
||||
// }
|
||||
@@ -246,6 +246,11 @@ NSInteger maxMessageCount = 20;
|
||||
[self scrollToBottom];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)insertMessageList:(NSArray *)messageList{
|
||||
[self.dataArray addObjectsFromArray:messageList];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
-(void)clearMessage{
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.giftArray removeAllObjects];
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
}
|
||||
-(void)getRelationShipList{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork roomRelationListWithType:@"2" successBlock:^(NSArray<QXRoomRelationModel *> * _Nonnull list) {
|
||||
[QXMineNetwork roomRelationListWithType:@"3" successBlock:^(NSArray<QXRoomRelationModel *> * _Nonnull list) {
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
[weakSelf.collectionView reloadData];
|
||||
|
||||
@@ -44,6 +44,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
QXRoomSettingTypeRoomBgMusic = 18,
|
||||
/// 背景图片
|
||||
QXRoomSettingTypeRoomBgImage = 19,
|
||||
/// 营业时间
|
||||
QXRoomSettingTypeRoomTime = 32,
|
||||
|
||||
/// 更多操作
|
||||
/// 离开房间
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#import "QXDrifRoomHourRankView.h"
|
||||
#import "QXRedPacketDriftView.h"
|
||||
#import "QXRoomActivityStatusModel.h"
|
||||
#import "QXRoomDetailHeaderView.h"
|
||||
|
||||
@interface QXRoomSettingView()<UIGestureRecognizerDelegate,UITableViewDelegate,UITableViewDataSource,QXRoomSettingViewDelegate>
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@@ -67,6 +68,8 @@
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomBgMusic;
|
||||
/// 房间背景
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomBgImage;
|
||||
/// 营业时间
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomTime;
|
||||
|
||||
/// 更多操作
|
||||
/// 离开房间
|
||||
@@ -104,6 +107,8 @@
|
||||
|
||||
|
||||
@property (nonatomic,strong)QXAlertView *alertView;
|
||||
|
||||
@property (nonatomic,strong)QXDatePickerView* pickerView;
|
||||
@end
|
||||
|
||||
@implementation QXRoomSettingView
|
||||
@@ -197,12 +202,12 @@
|
||||
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.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage,self.roomTime];
|
||||
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
}else{
|
||||
// toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
|
||||
/// 暂时不需要房间补贴
|
||||
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
toolsArr = @[self.roomMessage,self.roomOrderMic,self.roomBgImage,self.roomTime];
|
||||
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
}
|
||||
|
||||
@@ -227,12 +232,12 @@
|
||||
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.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage,self.roomTime];
|
||||
}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.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage,self.roomTime];
|
||||
}
|
||||
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
@@ -249,12 +254,12 @@
|
||||
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.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage,self.roomTime];
|
||||
}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.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
toolsArr = @[self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage,self.roomTime];
|
||||
}
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
moreArr = @[self.redBag,self.roomSetting,self.roomEffects,self.drifPop,self.roomReport];
|
||||
@@ -356,6 +361,31 @@
|
||||
[self.directView showInView:self.viewController.view];
|
||||
return;
|
||||
}
|
||||
if (model.type == QXRoomSettingTypeRoomTime) {
|
||||
NSArray*array = [self.roomModel.room_info.start_time componentsSeparatedByString:@":"];
|
||||
NSArray*array1 = [self.roomModel.room_info.end_time componentsSeparatedByString:@":"];
|
||||
NSInteger hour = 0;
|
||||
NSInteger minute = 0;
|
||||
NSInteger hour1 = 0;
|
||||
NSInteger minute1 = 0;
|
||||
if (array.count>2) {
|
||||
NSString *h = array[0];
|
||||
hour = h.integerValue;
|
||||
NSString *m = array[1];
|
||||
minute = m.integerValue;
|
||||
}
|
||||
|
||||
if (array1.count>2) {
|
||||
NSString *h = array1[0];
|
||||
hour1 = h.integerValue;
|
||||
NSString *m = array1[1];
|
||||
minute1 = m.integerValue;
|
||||
}
|
||||
self.pickerView.beginDate = [NSDate br_setHour:hour minute:minute];
|
||||
self.pickerView.endDate = [NSDate br_setHour:hour1 minute:minute1];
|
||||
[self.pickerView show];
|
||||
return;
|
||||
}
|
||||
if (model.type == QXRoomSettingTypeRoomWelcome) {
|
||||
// MJWeakSelf
|
||||
/// 房间欢迎语 暂时注销
|
||||
@@ -706,6 +736,15 @@
|
||||
}
|
||||
return _timeAc;
|
||||
}
|
||||
-(QXRoomSettingModel *)roomTime{
|
||||
if (!_roomTime) {
|
||||
_roomTime = [[QXRoomSettingModel alloc] init];
|
||||
_roomTime.icon = @"room_set_room_time";
|
||||
_roomTime.name = @"营业时间";
|
||||
_roomTime.type = QXRoomSettingTypeRoomTime;
|
||||
}
|
||||
return _roomTime;
|
||||
}
|
||||
-(QXRoomSettingModel *)redBagSound{
|
||||
if (!_redBagSound) {
|
||||
_redBagSound = [[QXRoomSettingModel alloc] init];
|
||||
@@ -741,8 +780,32 @@
|
||||
}
|
||||
return _alertView;
|
||||
}
|
||||
-(QXDatePickerView *)pickerView{
|
||||
if (!_pickerView) {
|
||||
_pickerView = [[QXDatePickerView alloc] init];
|
||||
_pickerView.pickerView.pickerMode = BRDatePickerModeHM;
|
||||
_pickerView.pickerView.maxDate = [NSDate br_setHour:23 minute:59];
|
||||
_pickerView.pickerView.minDate = [NSDate br_setHour:00 minute:00];
|
||||
_pickerView.pickerView.selectDate = [NSDate br_setHour:00 minute:00];
|
||||
_pickerView.isNoCompareDate = YES;
|
||||
MJWeakSelf
|
||||
_pickerView.chooseDateBlock = ^(NSString * _Nonnull startTime, NSString * _Nonnull endTime) {
|
||||
[weakSelf setRoomTimeWithStartTime:[NSString stringWithFormat:@"%@:00",startTime] endTime:[NSString stringWithFormat:@"%@:00",endTime]];
|
||||
};
|
||||
}
|
||||
return _pickerView;
|
||||
}
|
||||
|
||||
|
||||
-(void)setRoomTimeWithStartTime:(NSString*)startTime endTime:(NSString*)endTime{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork roomSetTimeWithRoomId:self.roomModel.room_info.room_id start_time:startTime end_time:endTime successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"设置成功");
|
||||
weakSelf.roomModel.room_info.start_time = startTime;
|
||||
weakSelf.roomModel.room_info.end_time = endTime;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -438,6 +438,9 @@
|
||||
}
|
||||
}
|
||||
-(void)barRoomSetCustomGiftWithUserId:(NSString *)userId had_custom_gift:(BOOL)had_custom_gift{
|
||||
if ([userId isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0;i < 6 ; i++) {
|
||||
QXRoomSeatBarSeatView *seatView = self.seatArray[i];
|
||||
if ([seatView.pitModel.user_id isEqualToString:userId]) {
|
||||
|
||||
@@ -212,19 +212,27 @@
|
||||
[self startTimerWithPart:roomModel.pk_info.pk_part];;
|
||||
self.leftSeatView.roomModel = roomModel;
|
||||
[self configBtn];
|
||||
if (roomModel.pk_info.my_room_value.longLongValue > roomModel.pk_info.pk_room_value.longLongValue) {
|
||||
self.leftResult.image = [UIImage imageNamed:@"room_pk_victory"];
|
||||
self.rightResult.image = [UIImage imageNamed:@"room_pk_defeated"];
|
||||
}else if (roomModel.pk_info.my_room_value.longLongValue < roomModel.pk_info.pk_room_value.longLongValue) {
|
||||
// 失败
|
||||
self.resultView.type = QXRoomPKResulttTypeDefeated;
|
||||
self.leftResult.image = [UIImage imageNamed:@"room_pk_defeated"];
|
||||
}else{
|
||||
self.leftResult.image = [UIImage imageNamed:@"room_pk_tie"];
|
||||
self.rightResult.image = [UIImage imageNamed:@"room_pk_tie"];
|
||||
if (self.roomModel.pk_info.pk_part.intValue == 4) {
|
||||
self.leftResult.hidden = NO;
|
||||
self.rightResult.hidden = NO;
|
||||
if (roomModel.pk_info.my_room_value.longLongValue > roomModel.pk_info.pk_room_value.longLongValue) {
|
||||
self.leftResult.image = [UIImage imageNamed:@"room_pk_victory"];
|
||||
self.rightResult.image = [UIImage imageNamed:@"room_pk_defeated"];
|
||||
}else if (roomModel.pk_info.my_room_value.longLongValue < roomModel.pk_info.pk_room_value.longLongValue) {
|
||||
// 失败
|
||||
self.resultView.type = QXRoomPKResulttTypeDefeated;
|
||||
self.leftResult.image = [UIImage imageNamed:@"room_pk_defeated"];
|
||||
}else{
|
||||
self.leftResult.image = [UIImage imageNamed:@"room_pk_tie"];
|
||||
self.rightResult.image = [UIImage imageNamed:@"room_pk_tie"];
|
||||
}
|
||||
}
|
||||
|
||||
[self performSelector:@selector(leftPlayHWDMP4) afterDelay:2];
|
||||
}
|
||||
-(void)leftPlayHWDMP4{
|
||||
[self.leftSeatView playHWDMP4];
|
||||
}
|
||||
|
||||
-(void)configBtn{
|
||||
if (self.roomModel.pk_info.pk_part.intValue == 2) {
|
||||
if ([self.roomModel.pk_info.invite_pk_user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id] && self.leftSeatView.myPitNumber == 9) {
|
||||
@@ -284,6 +292,24 @@
|
||||
|
||||
}
|
||||
self.rightSeatView.roomModel = pkRoomModel;
|
||||
if ([self.roomModel.pk_info.close_users isExist]) {
|
||||
NSArray *arr = [self.roomModel.pk_info.close_users componentsSeparatedByString:@","];
|
||||
QXRoomPitModel *ninePit;
|
||||
for (QXRoomPitModel *md in pkRoomModel.room_info.pit_list) {
|
||||
if (md.pit_number.intValue == 9) {
|
||||
ninePit = md;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ([arr containsObject:ninePit.user_id]) {
|
||||
self.muteRemoteBtn.selected = YES;
|
||||
}
|
||||
}
|
||||
|
||||
[self performSelector:@selector(rightPlayHWDMP4) afterDelay:2];
|
||||
}
|
||||
-(void)rightPlayHWDMP4{
|
||||
[self.rightSeatView playHWDMP4];
|
||||
}
|
||||
-(void)setMyPitNumber:(NSInteger)myPitNumber{
|
||||
_myPitNumber = myPitNumber;
|
||||
@@ -322,9 +348,11 @@
|
||||
}
|
||||
-(void)playHWDMP4{
|
||||
[self.leftSeatView playHWDMP4];
|
||||
[self.rightSeatView playHWDMP4];
|
||||
}
|
||||
-(void)stopHWDMP4{
|
||||
[self.leftSeatView stopHWDMP4];
|
||||
[self.rightSeatView stopHWDMP4];
|
||||
}
|
||||
-(void)roomClearUserCharmWithUserId:(NSString *)userId{
|
||||
[self.leftSeatView roomClearUserCharmWithUserId:userId];
|
||||
@@ -362,20 +390,27 @@
|
||||
}];
|
||||
}
|
||||
-(void)muteRemoteAction:(UIButton*)sender{
|
||||
// [[QXAgoraEngineEx sharedEngine] muteRemoteEXAudioStream:sender.selected];
|
||||
// return;
|
||||
sender.selected = !sender.selected;
|
||||
NSDictionary *dict = @{
|
||||
@"is_mute":[NSNumber numberWithInteger:sender.selected?1:0],
|
||||
};
|
||||
NSString *jsonStr = [dict jsonStringEncoded];
|
||||
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:QXRoomMessageTypeMuteRemoteAudio userId:self.pk_userId];
|
||||
[[QXAgoraEngineEx sharedEngine] muteRemoteEXAudioStream:sender.selected];
|
||||
// QXUserHomeModel *userModel = [QXUserHomeModel yy_modelWithJSON:msg.Text[@"FromUserInfo"]];
|
||||
AgoraRtcAudioVolumeInfo *userInfo = [[AgoraRtcAudioVolumeInfo alloc] init];
|
||||
userInfo.uid = [self.pk_userId longLongValue];
|
||||
userInfo.volume = 0;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:noticeUserSpeak object:userInfo];
|
||||
BOOL isClose = sender.selected;
|
||||
sender.userInteractionEnabled = NO;
|
||||
[QXMineNetwork roomPkCloseMicWithPkId:self.roomModel.pk_info.pk_id type:isClose?@"2":@"1" user_id:self.pk_userId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
sender.userInteractionEnabled = YES;
|
||||
sender.selected = !sender.selected;
|
||||
NSDictionary *parm = @{
|
||||
@"is_mute":[NSNumber numberWithInteger:sender.selected?1:0],
|
||||
};
|
||||
NSString *jsonStr = [parm jsonStringEncoded];
|
||||
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:QXRoomMessageTypeMuteRemoteAudio userId:self.pk_userId];
|
||||
[[QXAgoraEngineEx sharedEngine] muteRemoteEXAudioStream:sender.selected];
|
||||
// QXUserHomeModel *userModel = [QXUserHomeModel yy_modelWithJSON:msg.Text[@"FromUserInfo"]];
|
||||
AgoraRtcAudioVolumeInfo *userInfo = [[AgoraRtcAudioVolumeInfo alloc] init];
|
||||
userInfo.uid = [self.pk_userId longLongValue];
|
||||
userInfo.volume = 0;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:noticeUserSpeak object:userInfo];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
sender.userInteractionEnabled = YES;
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)didClickUserHeaderWithPitModel:(QXRoomPitModel *)pitModel userModel:(id)userModel isPkRoom:(BOOL)isPkRoom pkRoomId:(NSString *)pkRoomId isNoTakeOff:(BOOL)isNoTakeOff{
|
||||
@@ -446,13 +481,20 @@
|
||||
}
|
||||
|
||||
-(void)startTimerWithPart:(NSString*)part{
|
||||
|
||||
__block NSString *str = @"";
|
||||
if (part.intValue == 2) {
|
||||
str = @"等待开始";
|
||||
self.leftResult.hidden = YES;
|
||||
self.rightResult.hidden = YES;
|
||||
}else if (part.intValue == 3){
|
||||
str = @"进行中";
|
||||
self.leftResult.hidden = YES;
|
||||
self.rightResult.hidden = YES;
|
||||
}else if (part.intValue == 4){
|
||||
str = @"惩罚时间";
|
||||
self.leftResult.hidden = NO;
|
||||
self.rightResult.hidden = NO;
|
||||
}
|
||||
if (_timer) {
|
||||
[_timer invalidate];
|
||||
|
||||
@@ -331,8 +331,10 @@ static NSInteger maxSeat = 8;
|
||||
// }
|
||||
}
|
||||
self.myPitNumber = roomModel.user_info.pit_number.integerValue;
|
||||
[self performSelector:@selector(playHWDMP4) afterDelay:2];
|
||||
}
|
||||
|
||||
|
||||
-(void)clearCharm{
|
||||
for (QXRoomSeatContentView *seatView in self.seatArray) {
|
||||
QXRoomPitModel *model = seatView.pitModel;
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
self.bottomToolBtn.hidden = YES;
|
||||
}
|
||||
}
|
||||
#if DEBUG
|
||||
self.bottomToolBtn.hidden = YES;
|
||||
#endif
|
||||
}
|
||||
-(void)viewDidLayoutSubviews{
|
||||
[super viewDidLayoutSubviews];
|
||||
|
||||