This commit is contained in:
启星
2025-12-04 14:11:00 +08:00
parent 2d37ab6844
commit 1c5a908dda
49 changed files with 505 additions and 192 deletions

View File

@@ -116,8 +116,8 @@ typedef void (^showFinishBlock)(void);
-(void)finishTask; -(void)finishTask;
-(void)vibrationFeedback; -(void)vibrationFeedback;
/// 进入房间后开始保活
-(void)startKeepAlive;
-(void)dirfViewDidToBackground; -(void)dirfViewDidToBackground;
-(void)dirfViewBecomeToFront; -(void)dirfViewBecomeToFront;
@end @end

View File

@@ -36,6 +36,8 @@
@property (nonatomic,assign)BOOL isClickJoinRoom; @property (nonatomic,assign)BOOL isClickJoinRoom;
@property (nonatomic,strong)QXTimer *timer; @property (nonatomic,strong)QXTimer *timer;
@property (nonatomic,strong)NSTimer *keepTimer;
@property (nonatomic,assign)NSInteger taskTime; @property (nonatomic,assign)NSInteger taskTime;
@end @end
@implementation QXGlobal @implementation QXGlobal
@@ -319,6 +321,29 @@
} }
} }
} }
-(void)startKeepAlive{
[self stopKeepTimer];
self.keepTimer = [NSTimer scheduledTimerWithTimeInterval:60
target:self
selector:@selector(checkAndUpdateRedPackets)
userInfo:nil
repeats:YES];
}
-(void)checkAndUpdateRedPackets{
if ([self.roomId isExist]) {
[QXMineNetwork appKeepAliveWithRoomId:self.roomId];
}
}
-(void)stopKeepTimer{
if (self.keepTimer) {
[self.keepTimer invalidate];
self.keepTimer = nil;
}
}
-(void)showAlertWithMessage:(NSString*)message roomId:(NSString*)roomId{ -(void)showAlertWithMessage:(NSString*)message roomId:(NSString*)roomId{
UIAlertController *al = [UIAlertController alertControllerWithTitle:@"温馨提示" message:message preferredStyle:(UIAlertControllerStyleAlert)]; UIAlertController *al = [UIAlertController alertControllerWithTitle:@"温馨提示" message:message preferredStyle:(UIAlertControllerStyleAlert)];
if ([roomId isExist] && self.roomId==nil) { if ([roomId isExist] && self.roomId==nil) {
@@ -347,6 +372,7 @@
} }
} }
-(void)quitRoomWithRoomId:(NSString *)roomId{ -(void)quitRoomWithRoomId:(NSString *)roomId{
[self stopKeepTimer];
[UIApplication sharedApplication].idleTimerDisabled = NO; [UIApplication sharedApplication].idleTimerDisabled = NO;
/// ///
[[QXRedPacketManager sharedManager] destoryRedpacketInfo]; [[QXRedPacketManager sharedManager] destoryRedpacketInfo];

View File

@@ -631,13 +631,13 @@
// 1 线 2线 // 1 线 2线
NSInteger type = 1; NSInteger type = 1;
type = [msg.Text[@"type"] integerValue]; type = [msg.Text[@"type"] integerValue];
BOOL isOnline = type == 1?YES:NO; // BOOL isOnline = type == 1?YES:NO;
// if (self.delegate && [self.delegate respondsToSelector:@selector(roomUserOnlineStatusDidChanged:userId:)]) { // if (self.delegate && [self.delegate respondsToSelector:@selector(roomUserOnlineStatusDidChanged:userId:)]) {
// [self.delegate roomUserOnlineStatusDidChanged:YES userId:userId]; // [self.delegate roomUserOnlineStatusDidChanged:YES userId:userId];
// } // }
NSDictionary *parm = @{ NSDictionary *parm = @{
@"user_id":userId, @"user_id":userId,
@"is_online":[NSNumber numberWithBool:isOnline], @"is_online":[NSNumber numberWithInteger:type],
}; };
[[NSNotificationCenter defaultCenter] postNotificationName:noticeRoomUserOnlineStatusDidChanged object:parm]; [[NSNotificationCenter defaultCenter] postNotificationName:noticeRoomUserOnlineStatusDidChanged object:parm];
} }

View File

@@ -77,7 +77,7 @@
-(void)moreAction{ -(void)moreAction{
if (self.data.groupID.length>0) { if (self.data.groupID.length>0) {
QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init]; QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init];
vc.groupId = [self.data.groupID stringByReplacingOccurrencesOfString:@"g" withString:@""]; vc.groupId = self.data.groupID;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
}else{ }else{
QXMenuPopView *menuView = [[QXMenuPopView alloc] initWithPoint:CGPointMake(SCREEN_WIDTH-60, NavContentHeight+10)]; QXMenuPopView *menuView = [[QXMenuPopView alloc] initWithPoint:CGPointMake(SCREEN_WIDTH-60, NavContentHeight+10)];
@@ -103,6 +103,7 @@
} }
- (void)initSubViews{ - (void)initSubViews{
// TUIConversationListBaseDataProvider markConversationAsRead
[TUIChatConfig_Classic sharedConfig].delegate = self; [TUIChatConfig_Classic sharedConfig].delegate = self;
if (self.data.groupID.length>0) { if (self.data.groupID.length>0) {
TUIGroupChatViewController *vc = [[TUIGroupChatViewController alloc] init]; TUIGroupChatViewController *vc = [[TUIGroupChatViewController alloc] init];

View File

@@ -74,14 +74,15 @@
[self.view addSubview:vc.view]; [self.view addSubview:vc.view];
} }
-(void)reloadConversions{ -(void)reloadConversions{
[self.vc.view removeFromSuperview]; // [self.vc.view removeFromSuperview];
[self.vc removeFromParentViewController]; // [self.vc removeFromParentViewController];
self.vc = nil; // self.vc = nil;
self.vc = [[TUIConversationListController alloc] init]; // self.vc = [[TUIConversationListController alloc] init];
self.vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, self.view.height-NavContentHeight); // self.vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, self.view.height-NavContentHeight);
self.vc.tableViewForAll.tableHeaderView = self.topView; // self.vc.tableViewForAll.tableHeaderView = self.topView;
[self addChildViewController:self.vc]; // [self addChildViewController:self.vc];
[self.view addSubview:self.vc.view]; // [self.view addSubview:self.vc.view];
[self.vc reloadConversationList];
} }
- (void)conversationListController:(UIViewController *)conversationController - (void)conversationListController:(UIViewController *)conversationController
@@ -98,6 +99,7 @@
data.title = conversation.title; data.title = conversation.title;
data.faceUrl = conversation.faceUrl; data.faceUrl = conversation.faceUrl;
vc.data = data; vc.data = data;
[self.vc.dataProvider markConversationAsRead:conversation];
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
// } // }

View File

@@ -62,7 +62,6 @@
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES]; [self.navigationController setNavigationBarHidden:YES animated:YES];
[self getUserInfo]; [self getUserInfo];
[self.tableView reloadData];
[self.tableHeaderView reloadData]; [self.tableHeaderView reloadData];
} }
@@ -96,6 +95,7 @@
[QXMineNetwork getMineInfoSuccessBlock:^(QXUserModel * _Nonnull userModel) { [QXMineNetwork getMineInfoSuccessBlock:^(QXUserModel * _Nonnull userModel) {
weakSelf.userModel = userModel; weakSelf.userModel = userModel;
weakSelf.tableHeaderView.userModel = userModel; weakSelf.tableHeaderView.userModel = userModel;
[weakSelf.tableView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}]; }];
@@ -232,7 +232,7 @@
} }
break; break;
case QXMainHeaderOptionTypeBodyPrice:{ case QXMainHeaderOptionTypeBodyPrice:{
[QXBodyPriceRuleView showInView:self.view]; [QXBodyPriceRuleView showInView:self.view currentBodyValue:self.userModel.market_value coin:self.userModel.market_value_coin bodyValue:self.userModel.market_value_market];
} }
break; break;
case QXMainHeaderOptionTypeWallet:{ case QXMainHeaderOptionTypeWallet:{
@@ -307,6 +307,7 @@
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView]; QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView];
cell.delegate = self; cell.delegate = self;
cell.singerIsAuth = self.userModel.singer_status.intValue==1;
if (indexPath.row == 0) { if (indexPath.row == 0) {
cell.isMore = NO; cell.isMore = NO;
}else{ }else{
@@ -316,7 +317,8 @@
} }
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 0) { if (indexPath.row == 0) {
return ScaleWidth(168); // return ScaleWidth(168);
return ScaleWidth(110);
}else{ }else{
// if (QXGlobal.shareGlobal.isOpenRecharge) { // if (QXGlobal.shareGlobal.isOpenRecharge) {
return ScaleWidth(168); return ScaleWidth(168);

View File

@@ -51,7 +51,7 @@
} }
-(void)getList{ -(void)getList{
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[QXMineNetwork getFamilyEarningWithUserId:self.userId successBlock:^(NSArray<QXFamilyEarningModel *> * _Nonnull list) { [QXMineNetwork getFamilyEarningWithUserId:self.userId page:self.page start_time:self.startTime end_time:self.endTime successBlock:^(NSArray<QXFamilyEarningModel *> * _Nonnull list) {
__strong typeof(weakSelf) strongSelf = weakSelf; __strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) { if (!strongSelf) {
NSLog(@"⚠️ self has been deallocated, skipping hide operation"); NSLog(@"⚠️ self has been deallocated, skipping hide operation");

View File

@@ -13,7 +13,7 @@
@interface QXFamilySubViewController ()<UITableViewDelegate,UITableViewDataSource,QXFamilyMemberCellDelegate> @interface QXFamilySubViewController ()<UITableViewDelegate,UITableViewDataSource,QXFamilyMemberCellDelegate>
@property (nonatomic,strong)UITableView *tableView; @property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)QXFamilyModel *model; @property (nonatomic,strong)QXFamilyModel *model;
@property (nonatomic,strong)UIView *noDataView;
@end @end
@implementation QXFamilySubViewController @implementation QXFamilySubViewController
@@ -41,17 +41,22 @@
-(void)getList{ -(void)getList{
BOOL isJoin = YES; BOOL isJoin = YES;
if (self.index == 0) { if (self.index == 0) {
isJoin = YES;
}else{
isJoin = NO; isJoin = NO;
}else{
isJoin = YES;
} }
MJWeakSelf MJWeakSelf
[QXMineNetwork getMyFamilyIsJoin:isJoin successBlock:^(QXFamilyModel * _Nonnull model) { [QXMineNetwork getMyFamilyIsJoin:isJoin successBlock:^(QXFamilyModel * _Nonnull model) {
weakSelf.model = model; weakSelf.model = model;
if (weakSelf.model.group_members_lists.count == 0) {
weakSelf.tableView.tableFooterView = weakSelf.noDataView;
}else{
weakSelf.tableView.tableFooterView = nil;
}
[weakSelf.tableView reloadData]; [weakSelf.tableView reloadData];
[weakSelf.tableView.mj_header endRefreshing]; [weakSelf.tableView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
[weakSelf.tableView.mj_header endRefreshing];
}]; }];
} }
-(void)needRefresh{ -(void)needRefresh{
@@ -128,6 +133,9 @@
return 0; return 0;
} }
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
return;
}
QXFamilyMemberModel*md = self.model.group_members_lists[indexPath.row]; QXFamilyMemberModel*md = self.model.group_members_lists[indexPath.row];
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init]; QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
vc.user_id = md.user_id; vc.user_id = md.user_id;
@@ -154,5 +162,29 @@
} }
return _tableView; return _tableView;
} }
-(UIView *)noDataView{
if (!_noDataView) {
_noDataView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(120)+30)];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"qx_no_data"]];
[_noDataView addSubview:imageView];
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(ScaleWidth(148));
make.height.mas_equalTo(ScaleWidth(99));
make.centerX.equalTo(_noDataView);
make.top.mas_equalTo(30);
}];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont systemFontOfSize:12];
titleLabel.text = @"暂无数据";
titleLabel.textColor = RGB16(0xffffff);
[_noDataView addSubview:titleLabel];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(_noDataView);
make.top.equalTo(imageView.mas_bottom);
}];
}
return _noDataView;
}
@end @end

View File

@@ -45,12 +45,18 @@
} }
-(void)initSubViews{ -(void)initSubViews{
self.page = 1; self.page = 1;
self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, NavContentHeight+12, 200, 17)]; self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, NavContentHeight+12, 200, 35)];
self.countLabel.textColor = RGB16A(0x000000,0.45); self.countLabel.textColor = RGB16(0x666666);
self.countLabel.font = [UIFont systemFontOfSize:12]; self.countLabel.font = [UIFont systemFontOfSize:12];
self.countLabel.text = @"共0首歌"; self.countLabel.text = @"共0首歌";
[self.view addSubview:self.countLabel]; [self.view addSubview:self.countLabel];
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.view.width-35-16, NavContentHeight+12, 35, 35)];
[recordBtn setImage:[[UIImage imageNamed:@"nobility_help_icon"] imageByTintColor:RGB16(0x666666)] forState:(UIControlStateNormal)];
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
[recordBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.view addSubview:recordBtn];
[self.view addSubview:self.tableView]; [self.view addSubview:self.tableView];
[self getSongList]; [self getSongList];
} }
@@ -74,7 +80,12 @@
}]; }];
} }
-(void)helpAction{
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"34"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.navigationController pushViewController:vc animated:YES];
}
-(void)didSeletedGift:(QXGiftModel *)giftModel giftCount:(nonnull NSString *)giftCount{ -(void)didSeletedGift:(QXGiftModel *)giftModel giftCount:(nonnull NSString *)giftCount{
giftModel.num = giftCount; giftModel.num = giftCount;
self.addSongView.giftModel = giftModel; self.addSongView.giftModel = giftModel;

View File

@@ -7,6 +7,7 @@
#import "QXRoomSingerAuthViewController.h" #import "QXRoomSingerAuthViewController.h"
#import "QXAudioRecorderView.h" #import "QXAudioRecorderView.h"
#import "QXMineNetwork.h"
@interface QXRoomSingerAuthViewController ()<QXAudioRecorderViewDelegate> @interface QXRoomSingerAuthViewController ()<QXAudioRecorderViewDelegate>
@property (nonatomic,strong)UIView *contentView; @property (nonatomic,strong)UIView *contentView;
@@ -39,7 +40,11 @@
[super setNavgationItems]; [super setNavgationItems];
self.navigationTintColor = RGB16(0xffffff); self.navigationTintColor = RGB16(0xffffff);
self.navigationItem.title = @"歌手认证"; self.navigationItem.title = @"歌手认证";
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[recordBtn setImage:[UIImage imageNamed:@"nobility_help_icon"] forState:(UIControlStateNormal)];
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
[recordBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:recordBtn];
} }
- (void)initSubViews{ - (void)initSubViews{
@@ -71,8 +76,13 @@
self.audioRecorderView.delegate = self; self.audioRecorderView.delegate = self;
self.audioRecorderView.hidden = YES; self.audioRecorderView.hidden = YES;
[self.view addSubview:self.audioRecorderView]; [self.view addSubview:self.audioRecorderView];
[self conifgViews];
}
-(void)conifgViews{
if ([self.singer_status isEqualToString:@"-1"] || [self.singer_status isEqualToString:@"2"]) { if ([self.singer_status isEqualToString:@"-1"] || [self.singer_status isEqualToString:@"2"]) {
self.audioRecorderView.hidden = NO; self.audioRecorderView.hidden = NO;
}else{
self.audioRecorderView.hidden = YES;
} }
if ([self.singer_status isEqualToString:@"-1"]) { if ([self.singer_status isEqualToString:@"-1"]) {
self.authStatusLabel.text = @"暂未认证"; self.authStatusLabel.text = @"暂未认证";
@@ -88,6 +98,12 @@
self.authStatusLabel.textColor = RGB16(0xFF2424); self.authStatusLabel.textColor = RGB16(0xFF2424);
} }
} }
-(void)helpAction{
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"33"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - AudioRecorderViewDelegate #pragma mark - AudioRecorderViewDelegate
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didChangeState:(AudioRecorderState)state{ - (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didChangeState:(AudioRecorderState)state{
@@ -112,5 +128,26 @@
// //
} }
-(void)didClickAuthWithFileUrl:(NSURL *)audioFileUrl{
NSData *data = [NSData dataWithContentsOfURL:audioFileUrl];
@weakify(self)
showLoadingInView(self.view);
[[QXCOSUploadManager shareManager] audioUploadFile:data withObjectKey:audioFileUrl.lastPathComponent complete:^(NSString * _Nonnull fileUrl, QXCOSUploadImageState state) {
@strongify(self);
dispatch_async(dispatch_get_main_queue(), ^{
hideLoadingInView(self.view);
if ([fileUrl isExist]) {
[QXMineNetwork singerAuthWithSong:fileUrl successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"上传成功");
self.singer_status = @"0";
[self conifgViews];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(@"上传失败");
}];
}else{
showToast(@"上传失败");
}
});
}];
}
@end @end

View File

@@ -25,6 +25,10 @@
self.page = 1; self.page = 1;
[self getHistorySubsidy]; [self getHistorySubsidy];
} }
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)getHistorySubsidy{ -(void)getHistorySubsidy{
MJWeakSelf MJWeakSelf
[QXMineNetwork dayTaskGiftBoxRecordSuccessBlock:^(NSArray<QXTaskGiftBoxRecordModel *> * _Nonnull list) { [QXMineNetwork dayTaskGiftBoxRecordSuccessBlock:^(NSArray<QXTaskGiftBoxRecordModel *> * _Nonnull list) {

View File

@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface QXFamilyMemberModel : NSObject @interface QXFamilyMemberModel : NSObject
/// 身价 /// 身价
@property(nonatomic,strong)NSString *market_value; @property(nonatomic,strong)NSString *market_value;
/// 0 离线 1 在线 /// 2离线 1 在线
@property(nonatomic,assign)NSInteger is_online; @property(nonatomic,assign)NSInteger is_online;
/// 昵称 /// 昵称
@property(nonatomic,strong)NSString *nickname; @property(nonatomic,strong)NSString *nickname;

View File

@@ -49,14 +49,18 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *hide_status; @property (nonatomic,strong)NSString *hide_status;
/// 当前状态:-1 未认证歌手, 0待审核 1已认证 2被拒绝 /// 当前状态:-1 未认证歌手, 0待审核 1已认证 2被拒绝
@property (nonatomic,strong)NSString *singer_status; @property (nonatomic,strong)NSString *singer_status;
/// 在线状态 /// 在线状态 1 在线 2 离线
@property (nonatomic,assign)BOOL is_online; @property (nonatomic,assign)NSInteger is_online;
/// 1 能聊天 0不能聊天 /// 1 能聊天 0不能聊天
@property (nonatomic,assign)NSInteger is_can_chat; @property (nonatomic,assign)NSInteger is_can_chat;
/// 需要充值金额 /// 需要充值金额
@property (nonatomic,strong)NSString* can_chat_money; @property (nonatomic,strong)NSString* can_chat_money;
/// 身价 /// 身价
@property (nonatomic,strong)NSString* market_value; @property (nonatomic,strong)NSString* market_value;
/// 身价配置 多少金币数
@property (nonatomic,strong)NSString* market_value_coin;
/// 身价配置 多少身价数
@property (nonatomic,strong)NSString* market_value_market;
@end @end
@@ -110,7 +114,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 魅力 /// 魅力
@property (nonatomic,strong)NSString* charm; @property (nonatomic,strong)NSString* charm;
/// 是否在线 /// 是否在线 1在线 2离线
@property (nonatomic,assign)NSInteger is_online; @property (nonatomic,assign)NSInteger is_online;
/// 礼物墙数量 /// 礼物墙数量

View File

@@ -1303,6 +1303,9 @@ NS_ASSUME_NONNULL_BEGIN
家族收益详情 家族收益详情
*/ */
+(void)getFamilyEarningWithUserId:(NSString*)userId +(void)getFamilyEarningWithUserId:(NSString*)userId
page:(NSInteger)page
start_time:(NSString*)start_time
end_time:(NSString*)end_time
successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock; failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@@ -1387,6 +1390,10 @@ NS_ASSUME_NONNULL_BEGIN
failBlock:(void (^)(NSError * error, NSString * msg))failBlock; failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
在线
*/
+(void)appKeepAliveWithRoomId:(NSString*)room_id;
@end @end

View File

@@ -2585,8 +2585,8 @@
+(void)getMyFamilyIsJoin:(BOOL)isJoin +(void)getMyFamilyIsJoin:(BOOL)isJoin
successBlock:(void (^)(QXFamilyModel* model))successBlock successBlock:(void (^)(QXFamilyModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{ failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSString *urlString = isJoin?QXMyJoinFamily:QXMyFamily;
[[QXRequset shareInstance] getWithUrl:QXMyFamily parameters:@{} needCache:NO success:^(id responseObject) { [[QXRequset shareInstance] getWithUrl:urlString parameters:@{} needCache:NO success:^(id responseObject) {
if (successBlock) { if (successBlock) {
QXFamilyModel *model = [QXFamilyModel yy_modelWithJSON:responseObject[@"data"]]; QXFamilyModel *model = [QXFamilyModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model); successBlock(model);
@@ -2601,12 +2601,16 @@
*/ */
+(void)getFamilyEarningWithUserId:(NSString*)userId +(void)getFamilyEarningWithUserId:(NSString*)userId
page:(NSInteger)page
start_time:(NSString*)start_time
end_time:(NSString*)end_time
successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{ failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{ NSDictionary *parameters =@{
@"user_id":userId?:@"", @"user_id":userId?:@"",
@"page":[NSNumber numberWithInteger:page]
}; };
[[QXRequset shareInstance] postWithUrl:QXHeartBeatSpace parameters:parameters needCache:NO success:^(id responseObject) { [[QXRequset shareInstance] postWithUrl:QXMyFamilyEarnings parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) { if (successBlock) {
NSArray *list = [NSArray yy_modelArrayWithClass:[QXFamilyEarningModel class] json:responseObject[@"data"]]; NSArray *list = [NSArray yy_modelArrayWithClass:[QXFamilyEarningModel class] json:responseObject[@"data"]];
successBlock(list); successBlock(list);
@@ -2796,4 +2800,11 @@
}]; }];
} }
+(void)appKeepAliveWithRoomId:(NSString *)room_id{
[[QXRequset shareInstance] getWithUrl:QXKeepAlive parameters:@{@"room_id":room_id?:@""} needCache:NO success:^(id responseObject) {
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
}];
}
@end @end

View File

@@ -17,7 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) IBOutlet UIButton *commitBtn; @property (weak, nonatomic) IBOutlet UIButton *commitBtn;
@property (weak, nonatomic) IBOutlet UIButton *closeBtn; @property (weak, nonatomic) IBOutlet UIButton *closeBtn;
@property (weak, nonatomic) IBOutlet UIView *bgView; @property (weak, nonatomic) IBOutlet UIView *bgView;
+(void)showInView:(UIView*)view; @property (weak, nonatomic) IBOutlet UILabel *bodyPriceLabel;
+(void)showInView:(UIView*)view currentBodyValue:(NSString*)currentBodyValue coin:(NSString*)coin bodyValue:(NSString*)bodyValue;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -10,12 +10,14 @@
@implementation QXBodyPriceRuleView @implementation QXBodyPriceRuleView
+(void)showInView:(UIView*)view{ +(void)showInView:(UIView *)view currentBodyValue:(NSString *)currentBodyValue coin:(NSString *)coin bodyValue:(NSString *)bodyValue{
UINib *nib = [UINib nibWithNibName:@"QXBodyPriceRuleView" bundle:[NSBundle mainBundle]]; UINib *nib = [UINib nibWithNibName:@"QXBodyPriceRuleView" bundle:[NSBundle mainBundle]];
QXBodyPriceRuleView *ruleView = [nib instantiateWithOwner:nil options:nil].firstObject; QXBodyPriceRuleView *ruleView = [nib instantiateWithOwner:nil options:nil].firstObject;
ruleView.frame = UIScreen.mainScreen.bounds; ruleView.frame = UIScreen.mainScreen.bounds;
ruleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; ruleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
ruleView.bgView.alpha = 0; ruleView.bgView.alpha = 0;
ruleView.currentPriceLabel.text = currentBodyValue;
ruleView.bodyPriceLabel.text = [NSString stringWithFormat:@"收礼身价,等于通过累计收礼的价值,每%@个金币等于%@身价",coin,bodyValue];
[view addSubview:ruleView]; [view addSubview:ruleView];
[UIView animateWithDuration:0.2 animations:^{ [UIView animateWithDuration:0.2 animations:^{
ruleView.bgView.alpha = 1; ruleView.bgView.alpha = 1;
@@ -23,6 +25,8 @@
}]; }];
} }
- (IBAction)closeAction:(id)sender { - (IBAction)closeAction:(id)sender {
[UIView animateWithDuration:0.2 animations:^{ [UIView animateWithDuration:0.2 animations:^{
self.bgView.alpha = 0; self.bgView.alpha = 0;

View File

@@ -237,7 +237,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="16p-zb-VAB"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="16p-zb-VAB">
<rect key="frame" x="0.0" y="0.0" width="117" height="24"/> <rect key="frame" x="0.0" y="0.0" width="117" height="24"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="竞拍溢价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DfF-lh-oXh"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DfF-lh-oXh">
<rect key="frame" x="34.333333333333343" y="4.3333333333333144" width="48" height="15"/> <rect key="frame" x="34.333333333333343" y="4.3333333333333144" width="48" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/> <fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.72549019607843135" green="0.57647058823529407" blue="0.11372549019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.72549019607843135" green="0.57647058823529407" blue="0.11372549019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -251,7 +251,7 @@
<constraint firstAttribute="height" constant="24" id="Oeu-V9-5eq"/> <constraint firstAttribute="height" constant="24" id="Oeu-V9-5eq"/>
</constraints> </constraints>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签约竞拍次数越多,签约成交比签约时身价更高,则竞拍溢价就越高" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4h-lx-wJ4"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价,等于 通过累计收礼的价值每1000个金币等于1身价" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4h-lx-wJ4">
<rect key="frame" x="8" y="32" width="101" height="79"/> <rect key="frame" x="8" y="32" width="101" height="79"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/> <fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.92941176470588238" green="0.66666666666666663" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.92941176470588238" green="0.66666666666666663" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -368,6 +368,7 @@
</constraints> </constraints>
<connections> <connections>
<outlet property="bgView" destination="bjS-Eu-Wht" id="7GC-AR-cpg"/> <outlet property="bgView" destination="bjS-Eu-Wht" id="7GC-AR-cpg"/>
<outlet property="bodyPriceLabel" destination="M4h-lx-wJ4" id="jHS-JF-ix4"/>
<outlet property="closeBtn" destination="ag3-iq-BzI" id="a0h-Fk-P2z"/> <outlet property="closeBtn" destination="ag3-iq-BzI" id="a0h-Fk-P2z"/>
<outlet property="commitBtn" destination="PHh-tS-kNh" id="iOS-08-gnl"/> <outlet property="commitBtn" destination="PHh-tS-kNh" id="iOS-08-gnl"/>
<outlet property="currentPriceLabel" destination="yoB-8g-xXJ" id="ZmR-gN-kho"/> <outlet property="currentPriceLabel" destination="yoB-8g-xXJ" id="ZmR-gN-kho"/>

View File

@@ -184,6 +184,7 @@
[weakSelf.delegate didClickOptionType:QXMainHeaderOptionTypeNobility]; [weakSelf.delegate didClickOptionType:QXMainHeaderOptionTypeNobility];
} }
}]; }];
self.nobilityBgView.hidden = YES;
[self addSubview:self.nobilityBgView]; [self addSubview:self.nobilityBgView];
self.nobilityImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_nobility_bg"]]; self.nobilityImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_nobility_bg"]];
@@ -347,13 +348,17 @@
} }
-(void)reloadData{ -(void)reloadData{
if ([self.toolsArray containsObject:self.rechargeModel]) {
return;
}
if (QXGlobal.shareGlobal.isOpenRecharge) { if (QXGlobal.shareGlobal.isOpenRecharge) {
self.nobilityBgView.hidden = NO;
if ([self.toolsArray containsObject:self.rechargeModel]) {
return;
}
[self.toolsArray insertObject:self.rechargeModel atIndex:0]; [self.toolsArray insertObject:self.rechargeModel atIndex:0];
[self.collectionView reloadData];
}else{
self.nobilityBgView.hidden = YES;
} }
[self.collectionView reloadData];
} }
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.toolsArray.count; return self.toolsArray.count;
@@ -410,6 +415,7 @@
self.nameLabel.shimmerColor = [UIColor colorWithHexString:userModel.nickname_color]; self.nameLabel.shimmerColor = [UIColor colorWithHexString:userModel.nickname_color];
[self.nameLabel startShimmer]; [self.nameLabel startShimmer];
}else{ }else{
self.nameLabel.shimmerColor = [UIColor clearColor];
[self.nameLabel stopShimmer]; [self.nameLabel stopShimmer];
} }
self.nameLabel.text = userModel.nickname; self.nameLabel.text = userModel.nickname;

View File

@@ -43,6 +43,7 @@ typedef NS_ENUM(NSInteger) {
@interface QXMineServiceCell : UITableViewCell @interface QXMineServiceCell : UITableViewCell
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate; @property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
@property (nonatomic,assign)BOOL isMore; @property (nonatomic,assign)BOOL isMore;
@property (nonatomic,assign)BOOL singerIsAuth;
+(instancetype)cellWithTableView:(UITableView *)tableView; +(instancetype)cellWithTableView:(UITableView *)tableView;
@end @end

View File

@@ -15,6 +15,8 @@
@property (nonatomic,strong)NSMutableArray *serviceArray; @property (nonatomic,strong)NSMutableArray *serviceArray;
@property (nonatomic,strong)NSMutableArray *moreArray; @property (nonatomic,strong)NSMutableArray *moreArray;
@property (nonatomic,strong)QXServiceModel *inviteModel; @property (nonatomic,strong)QXServiceModel *inviteModel;
@property (nonatomic,strong)QXServiceModel *singerAuthModel;
@property (nonatomic,strong)QXServiceModel *songListModel;
@end @end
@implementation QXMineServiceCell @implementation QXMineServiceCell
@@ -109,14 +111,40 @@
self.titleLabel.text = isMore?@"更多":@"常用服务"; self.titleLabel.text = isMore?@"更多":@"常用服务";
if (isMore) { if (isMore) {
if ([self.moreArray containsObject:self.inviteModel]) { if ([self.moreArray containsObject:self.inviteModel]) {
return;
}else{
if (QXGlobal.shareGlobal.isOpenRecharge) {
[self.moreArray insertObject:self.inviteModel atIndex:1];
}
} }
if (QXGlobal.shareGlobal.isOpenRecharge) { if (self.singerIsAuth) {
[self.moreArray insertObject:self.inviteModel atIndex:1]; if ([self.moreArray containsObject:self.singerAuthModel]) {
[self.moreArray removeObject:self.singerAuthModel];
}
if ([self.moreArray containsObject:self.songListModel]) {
}else{
NSInteger index = self.moreArray.count-1;
[self.moreArray insertObject:self.songListModel atIndex:index];
}
}else{
if ([self.moreArray containsObject:self.songListModel]) {
[self.moreArray removeObject:self.songListModel];
}
if ([self.moreArray containsObject:self.singerAuthModel]) {
}else{
NSInteger index = self.moreArray.count-1;
[self.moreArray insertObject:self.singerAuthModel atIndex:index];
}
} }
} }
[self.collectionView reloadData]; [self.collectionView reloadData];
} }
-(void)setSingerIsAuth:(BOOL)singerIsAuth{
_singerIsAuth = singerIsAuth;
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.isMore?self.moreArray.count:self.serviceArray.count; return self.isMore?self.moreArray.count:self.serviceArray.count;
} }
@@ -160,22 +188,17 @@
md3.icon = @"service_bag"; md3.icon = @"service_bag";
md3.type = QXMineServiceTypeBackpack; md3.type = QXMineServiceTypeBackpack;
QXServiceModel *md4 = [[QXServiceModel alloc] init];
md4.title = @"设置";
md4.icon = @"service_setting";
md4.type = QXMineServiceTypeSetting;
QXServiceModel *md5 = [[QXServiceModel alloc] init]; QXServiceModel *md4 = [[QXServiceModel alloc] init];
md5.title = @"家族"; md4.title = @"家族";
md5.icon = @"service_my_family"; md4.icon = @"service_my_family";
md5.type = QXMineServiceTypeFamily; md4.type = QXMineServiceTypeFamily;
_serviceArray = [NSMutableArray arrayWithArray:@[ _serviceArray = [NSMutableArray arrayWithArray:@[
md4,
md1, md1,
md2, md2,
md3, md3,
md4,
md5
]]; ]];
} }
return _serviceArray; return _serviceArray;
@@ -202,23 +225,29 @@
md4.icon = @"service_customer_service"; md4.icon = @"service_customer_service";
md4.type = QXMineServiceTypeCustomerService; md4.type = QXMineServiceTypeCustomerService;
QXServiceModel *md5 = [[QXServiceModel alloc] init]; // QXServiceModel *md5 = [[QXServiceModel alloc] init];
md5.title = @"歌手认证"; // md5.title = @"歌手认证";
md5.icon = @"service_singer_auth"; // md5.icon = @"service_singer_auth";
md5.type = QXMineServiceTypeSingerAuth; // md5.type = QXMineServiceTypeSingerAuth;
//
// QXServiceModel *md6 = [[QXServiceModel alloc] init];
// md6.title = @"我的歌单";
// md6.icon = @"service_songlist";
// md6.type = QXMineServiceTypeSongList;
QXServiceModel *md6 = [[QXServiceModel alloc] init]; QXServiceModel *md7 = [[QXServiceModel alloc] init];
md6.title = @"我的歌单"; md7.title = @"设置";
md6.icon = @"service_songlist"; md7.icon = @"service_setting";
md6.type = QXMineServiceTypeSongList; md7.type = QXMineServiceTypeSetting;
_moreArray = [NSMutableArray arrayWithArray:@[ _moreArray = [NSMutableArray arrayWithArray:@[
md1, md1,
md2, md2,
md3, md3,
md4, md4,
md5, // md5,
md6, // md6,
md7
]]; ]];
} }
@@ -233,6 +262,25 @@
} }
return _inviteModel; return _inviteModel;
} }
-(QXServiceModel *)singerAuthModel{
if (!_singerAuthModel) {
_singerAuthModel = [[QXServiceModel alloc] init];
_singerAuthModel.title = @"歌手认证";
_singerAuthModel.icon = @"service_singer_auth";
_singerAuthModel.type = QXMineServiceTypeSingerAuth;
}
return _singerAuthModel;
}
-(QXServiceModel *)songListModel{
if (!_songListModel) {
_songListModel = [[QXServiceModel alloc] init];
_songListModel.title = @"我的歌单";
_songListModel.icon = @"service_songlist";
_songListModel.type = QXMineServiceTypeSongList;
}
return _songListModel;
}
- (void)awakeFromNib { - (void)awakeFromNib {
[super awakeFromNib]; [super awakeFromNib];
// Initialization code // Initialization code

View File

@@ -42,8 +42,8 @@
self.dayLabel.text = [NSString stringWithFormat:@"剩余租期:%@",model.end_day]; self.dayLabel.text = [NSString stringWithFormat:@"剩余租期:%@",model.end_day];
self.timesLabel.text = [NSString stringWithFormat:@"免费续约次数:%@",model.free_renewal]; self.timesLabel.text = [NSString stringWithFormat:@"免费续约次数:%@",model.free_renewal];
self.nameLabel.text = model.nickname; self.nameLabel.text = model.nickname;
[self.todayPriceBtn setTitle:model.today_earnings forState:(UIControlStateNormal)]; [self.todayPriceBtn setTitle:[NSString stringWithFormat:@"%.4f",model.today_earnings.doubleValue] forState:(UIControlStateNormal)];
[self.yestodayPriceBtn setTitle:model.yesterday_earnings forState:(UIControlStateNormal)]; [self.yestodayPriceBtn setTitle:[NSString stringWithFormat:@"%.4f",model.yesterday_earnings.doubleValue] forState:(UIControlStateNormal)];
[self.priceBtn setTitle:model.market_value forState:(UIControlStateNormal)]; [self.priceBtn setTitle:model.market_value forState:(UIControlStateNormal)];
self.onlineLabel.text = model.is_online==1?@"当前在线":@"当前离线"; self.onlineLabel.text = model.is_online==1?@"当前在线":@"当前离线";
self.continueBtn.hidden = model.is_show_sign.intValue==1?NO:YES; self.continueBtn.hidden = model.is_show_sign.intValue==1?NO:YES;

View File

@@ -25,7 +25,7 @@
// Initialization code // Initialization code
} }
- (IBAction)familyGroupAction:(id)sender { - (IBAction)familyGroupAction:(id)sender {
if (self.model.group_members_lists.count == 0) { if (![self.model.group_id isExist]) {
showToast(@"家族群至少需要签约一位徒弟"); showToast(@"家族群至少需要签约一位徒弟");
}else{ }else{
[[QXGlobal shareGlobal] chatWithFamilyGroupId:self.model.group_id cover:self.model.group_owner_info.avatar name:[NSString stringWithFormat:@"%@的家族",self.model.group_owner_info.nickname] navagationController:self.viewController.navigationController]; [[QXGlobal shareGlobal] chatWithFamilyGroupId:self.model.group_id cover:self.model.group_owner_info.avatar name:[NSString stringWithFormat:@"%@的家族",self.model.group_owner_info.nickname] navagationController:self.viewController.navigationController];
@@ -38,11 +38,12 @@
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.group_owner_info.nobility_image]]; [self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.group_owner_info.nobility_image]];
self.nameLabel.text = model.group_owner_info.nickname; self.nameLabel.text = model.group_owner_info.nickname;
self.IdLabel.text = [NSString stringWithFormat:@"ID:%@",model.group_owner_info.user_code]; self.IdLabel.text = [NSString stringWithFormat:@"ID:%@",model.group_owner_info.user_code];
self.priceLabel.text = model.group_earnings; self.priceLabel.text = [NSString stringWithFormat:@"%.4f",model.group_earnings.doubleValue];
[self.timesBtn setTitle:[NSString stringWithFormat:@"签约次数:%@",model.group_members_num] forState:(UIControlStateNormal)]; [self.timesBtn setTitle:[NSString stringWithFormat:@"签约次数:%@",model.group_members_num] forState:(UIControlStateNormal)];
} }
- (IBAction)moreAction:(id)sender { - (IBAction)moreAction:(id)sender {
QXFamilyPriceRecordViewController *vc = [[QXFamilyPriceRecordViewController alloc] init]; QXFamilyPriceRecordViewController *vc = [[QXFamilyPriceRecordViewController alloc] init];
vc.userId = self.model.user_id;
[self.viewController.navigationController pushViewController:vc animated:YES]; [self.viewController.navigationController pushViewController:vc animated:YES];
} }

View File

@@ -21,7 +21,7 @@
-(void)setModel:(QXUserSongListModel *)model{ -(void)setModel:(QXUserSongListModel *)model{
_model = model; _model = model;
[self.giftImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]]; [self.giftImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
self.giftInfoLabel.text = [NSString stringWithFormat:@"x%@%@",model.gift_num,model.gift_name]; self.giftInfoLabel.text = [NSString stringWithFormat:@"x%@ %@",model.gift_num,model.gift_name];
self.songNameLabel.text = model.song_name; self.songNameLabel.text = model.song_name;
self.giftPriceLabel.text = model.gift_price; self.giftPriceLabel.text = model.gift_price;
} }

View File

@@ -9,7 +9,7 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="148" id="KGk-i7-Jjw" customClass="QXMineSongListCell"> <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="148" id="KGk-i7-Jjw" customClass="QXMineSongListCell">
<rect key="frame" x="0.0" y="0.0" width="520" height="148"/> <rect key="frame" x="0.0" y="0.0" width="520" height="148"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">

View File

@@ -33,6 +33,9 @@ typedef NS_ENUM(NSInteger, AudioRecorderState) {
/// 录音进度更新 /// 录音进度更新
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didUpdateProgress:(NSTimeInterval)progress totalDuration:(NSTimeInterval)totalDuration; - (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didUpdateProgress:(NSTimeInterval)progress totalDuration:(NSTimeInterval)totalDuration;
/// 开始认证
-(void)didClickAuthWithFileUrl:(NSURL*)audioFileUrl;
@end @end
@interface QXAudioRecorderView : UIView @interface QXAudioRecorderView : UIView

View File

@@ -224,33 +224,24 @@
-(void)authAction{ -(void)authAction{
/// ///
/// NSInteger minSecond = 60;
if ((int)self.totalDuration < 5) { #if DEBUG
showToast(@"录音时长不得小于60秒"); minSecond = 5;
# else
minSecond = 60;
#endif
if ((int)self.totalDuration < minSecond) {
NSString *toast = [NSString stringWithFormat:@"录音时长不得小于%ld秒",minSecond];
showToast(toast);
return; return;
} }
if (self.originalAudioFileURL==nil) { if (self.originalAudioFileURL==nil) {
showToast(@"录制文件不存在"); showToast(@"录制文件不存在");
return; return;
} }
NSData *data = [NSData dataWithContentsOfURL:self.originalAudioFileURL]; if (self.delegate && [self.delegate respondsToSelector:@selector(didClickAuthWithFileUrl:)]) {
@weakify(self) [self.delegate didClickAuthWithFileUrl:self.originalAudioFileURL];
showLoadingInView(self.viewController.view); }
[[QXCOSUploadManager shareManager] audioUploadFile:data withObjectKey:self.originalAudioFileURL.lastPathComponent complete:^(NSString * _Nonnull fileUrl, QXCOSUploadImageState state) {
@strongify(self);
dispatch_async(dispatch_get_main_queue(), ^{
hideLoadingInView(self.viewController.view);
if ([fileUrl isExist]) {
[QXMineNetwork singerAuthWithSong:fileUrl successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"上传成功");
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(@"上传失败");
}];
}else{
showToast(@"上传失败");
}
});
}];
} }
#pragma mark - Gesture Handlers #pragma mark - Gesture Handlers

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "qx_no_data@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "qx_no_data@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -544,4 +544,7 @@ static NSString * QXSignCoinResign = @"api/Sign/re_sign";
/// 签约延时 /// 签约延时
static NSString * QXSignDelaySign = @"api/Sign/sign_delay"; static NSString * QXSignDelaySign = @"api/Sign/sign_delay";
/// 心跳
static NSString * QXKeepAlive = @"api/Xintiao/keep_room_heartbeat";
#endif /* Api_h */ #endif /* Api_h */

View File

@@ -292,7 +292,7 @@ NSPhotoLibraryUsageDescription = "访问您的相册,允许可以把视频保存
"聊天" = "聊天"; "聊天" = "聊天";
"礼物" = "礼物"; "礼物" = "礼物";
"%@条新消息" = "%@条新消息"; "%@条新消息" = "%@条新消息";
"在线用户(%@人)" = "在线用户(%@人)"; "用户列表(%@人)" = "用户列表(%@人)";
"房间公告" = "房间公告"; "房间公告" = "房间公告";
"优先通道(%@/20)" = "优先通道(%@/20)"; "优先通道(%@/20)" = "优先通道(%@/20)";
"等待上台(%@/20)" = "等待上台(%@/20)"; "等待上台(%@/20)" = "等待上台(%@/20)";

View File

@@ -102,6 +102,7 @@ QXRoomUserInfoViewDelegate
[self initGiftDriftManager]; [self initGiftDriftManager];
[self initActivityObeserver]; [self initActivityObeserver];
[[QXDrifNobilityJoinRoomView shareView] setupDisplayViewInContainer:self.view]; [[QXDrifNobilityJoinRoomView shareView] setupDisplayViewInContainer:self.view];
[QXGlobal.shareGlobal startKeepAlive];
// [self performSelector:@selector(test) afterDelay:5]; // [self performSelector:@selector(test) afterDelay:5];
} }
//-(void)test{ //-(void)test{
@@ -344,7 +345,7 @@ QXRoomUserInfoViewDelegate
[QXMineNetwork roomUserOnlineStatusWithUserIds:userIds roomId:self.roomId successBlock:^(NSArray<QXUserModel *> * _Nonnull list) { [QXMineNetwork roomUserOnlineStatusWithUserIds:userIds roomId:self.roomId successBlock:^(NSArray<QXUserModel *> * _Nonnull list) {
for (QXUserModel *md in list) { for (QXUserModel *md in list) {
if (md.user_id.longLongValue > 0) { if (md.user_id.longLongValue > 0) {
[[NSNotificationCenter defaultCenter] postNotificationName:noticeRoomUserOnlineStatusDidChanged object:@{@"user_id":md.user_id,@"is_online":[NSNumber numberWithBool:md.is_online]}]; [[NSNotificationCenter defaultCenter] postNotificationName:noticeRoomUserOnlineStatusDidChanged object:@{@"user_id":md.user_id,@"is_online":[NSNumber numberWithInteger:md.is_online]}];
} }
} }
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -370,7 +371,7 @@ QXRoomUserInfoViewDelegate
}]; }];
} }
-(void)resetSubviews{ -(void) resetSubviews{
if (self.roomModel.room_info.type_id.intValue != 6) { if (self.roomModel.room_info.type_id.intValue != 6) {
[self.roomBgImageView sd_setImageWithURL:[NSURL URLWithString:self.roomModel.room_info.room_background]]; [self.roomBgImageView sd_setImageWithURL:[NSURL URLWithString:self.roomModel.room_info.room_background]];
}else{ }else{

View File

@@ -41,7 +41,7 @@
self.titleLabel = [[UILabel alloc] init]; self.titleLabel = [[UILabel alloc] init];
self.titleLabel.textAlignment = NSTextAlignmentCenter; self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"在线用户(%@人)"),@"0"]; self.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"用户列表(%@人)"),@"0"];
self.titleLabel.textColor = QXConfig.textColor; self.titleLabel.textColor = QXConfig.textColor;
self.titleLabel.font = [UIFont boldSystemFontOfSize:16]; self.titleLabel.font = [UIFont boldSystemFontOfSize:16];
[self.bgView addSubview:self.titleLabel]; [self.bgView addSubview:self.titleLabel];
@@ -91,7 +91,7 @@
[weakSelf.dataArray addObject:offPitList]; [weakSelf.dataArray addObject:offPitList];
[weakSelf.allUsers addObjectsFromArray:onPitList]; [weakSelf.allUsers addObjectsFromArray:onPitList];
[weakSelf.allUsers addObjectsFromArray:offPitList]; [weakSelf.allUsers addObjectsFromArray:offPitList];
weakSelf.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"在线用户(%@人)"),[NSString stringWithFormat:@"%ld",onPitList.count+offPitList.count]]; weakSelf.titleLabel.text = [NSString localizedStringWithFormat:QXText(@"用户列表(%@人)"),[NSString stringWithFormat:@"%ld",onPitList.count+offPitList.count]];
[weakSelf.tableView.mj_header endRefreshing]; [weakSelf.tableView.mj_header endRefreshing];
[weakSelf.tableView reloadData]; [weakSelf.tableView reloadData];
if (weakSelf.onlineListBlock) { if (weakSelf.onlineListBlock) {

View File

@@ -7,7 +7,7 @@
#import "QXSingerSongListCell.h" #import "QXSingerSongListCell.h"
#import "QXMineNetwork.h" #import "QXMineNetwork.h"
#import "QXCustomAlertView.h"
@implementation QXSingerSongListCell @implementation QXSingerSongListCell
+(instancetype)cellWithTableView:(UITableView *)tableView{ +(instancetype)cellWithTableView:(UITableView *)tableView{
static NSString *cellId = @"QXSingerSongListCell"; static NSString *cellId = @"QXSingerSongListCell";
@@ -84,12 +84,18 @@
self.bossLabel.text = [NSString stringWithFormat:@"老板:%@",model.boss_nickname]; self.bossLabel.text = [NSString stringWithFormat:@"老板:%@",model.boss_nickname];
} }
- (IBAction)requestAction:(UIButton*)sender { - (IBAction)requestAction:(UIButton*)sender {
if ([sender.titleLabel.text isEqualToString:@"点歌"]) { if ([sender.titleLabel.text isEqualToString:@"点歌"]) {
[QXMineNetwork requestSongWithSongId:self.model.id roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) { QXCustomAlertView *alert = [[QXCustomAlertView alloc] init];
showToast(@"点歌成功"); NSString *message = [NSString stringWithFormat:@"您是否确认点歌\"%@\" \n演唱者%@ \n礼物价值%@金币",self.model.song_name,self.model.singer_nickname,self.model.gift_price];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { [alert showInView:KEYWINDOW title:@"温馨提示" message:message cancleTitle:@"取消" commitTitle:@"确定"];
showToast(msg); alert.commitBlock = ^{
}]; [QXMineNetwork requestSongWithSongId:self.model.id roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"点歌成功");
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
};
}else{ }else{
MJWeakSelf MJWeakSelf
[QXMineNetwork requestSongToTopWithId:self.model.id successBlock:^(NSDictionary * _Nonnull dict) { [QXMineNetwork requestSongToTopWithId:self.model.id successBlock:^(NSDictionary * _Nonnull dict) {

View File

@@ -641,6 +641,7 @@
weakSelf.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color] ; weakSelf.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color] ;
[weakSelf.nameLabel startShimmer]; [weakSelf.nameLabel startShimmer];
}else{ }else{
weakSelf.nameLabel.shimmerColor = UIColor.clearColor;
[weakSelf.nameLabel stopShimmer]; [weakSelf.nameLabel stopShimmer];
} }
if (model.master) { if (model.master) {
@@ -1008,6 +1009,8 @@
-(void)showInView:(UIView *)view{ -(void)showInView:(UIView *)view{
self.cpDressView.hidden = YES;
[self.cpDressView resetView];
[view addSubview:self]; [view addSubview:self];
[UIView animateWithDuration:0.3 animations:^{ [UIView animateWithDuration:0.3 animations:^{
self.bgView.y = SCREEN_HEIGHT- ScaleWidth(429+33)-kSafeAreaBottom; self.bgView.y = SCREEN_HEIGHT- ScaleWidth(429+33)-kSafeAreaBottom;

View File

@@ -51,7 +51,7 @@
self.cpTagLabel = [[UILabel alloc] init]; self.cpTagLabel = [[UILabel alloc] init];
self.cpTagLabel.font = [UIFont systemFontOfSize:12]; self.cpTagLabel.font = [UIFont systemFontOfSize:12];
self.cpTagLabel.textColor = RGB16A(0xFFFFFF,0.78); self.cpTagLabel.textColor = RGB16A(0xFFFFFF,0.78);
self.cpTagLabel.text = @"CP"; self.cpTagLabel.text = @"心动";
[self addSubview:self.cpTagLabel]; [self addSubview:self.cpTagLabel];
[self.cpTagLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.cpTagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.equalTo(self.cpTagImageView); make.centerX.centerY.equalTo(self.cpTagImageView);

View File

@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXUserCpInfoModel *model; @property (nonatomic,strong)QXUserCpInfoModel *model;
-(void)headerStartPlay; -(void)headerStartPlay;
-(void)hideHeader; -(void)hideHeader;
-(void)resetView;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -56,6 +56,8 @@
self.mp4View.backgroundColor = [UIColor clearColor]; self.mp4View.backgroundColor = [UIColor clearColor];
self.mp4View.hidden = YES; self.mp4View.hidden = YES;
[self addSubview:self.mp4View]; [self addSubview:self.mp4View];
[self bringSubviewToFront:self.headerView1];
[self bringSubviewToFront:self.headerView2];
} }
-(void)setModel:(QXUserCpInfoModel *)model{ -(void)setModel:(QXUserCpInfoModel *)model{
@@ -228,6 +230,14 @@
[self.mp4View setMute:YES]; [self.mp4View setMute:YES];
[self.mp4View playHWDMP4:self.videoPath repeatCount:INTMAX_MAX delegate:self]; [self.mp4View playHWDMP4:self.videoPath repeatCount:INTMAX_MAX delegate:self];
} }
-(void)resetView{
[self.headerView1 sd_cancelLatestImageLoad];
[self.headerView2 sd_cancelLatestImageLoad];
self.headerView1.image = nil;
self.headerView2.image = nil;
[self stopHWDMP4];
_model = nil;
}
//- (QXEffectSvgaView *)svgaView { //- (QXEffectSvgaView *)svgaView {
// if (!_svgaView) { // if (!_svgaView) {
// _svgaView = [[QXEffectSvgaView alloc] initWithFrame:CGRectZero isAutoPlay:YES]; // _svgaView = [[QXEffectSvgaView alloc] initWithFrame:CGRectZero isAutoPlay:YES];

View File

@@ -19,6 +19,7 @@
@property (nonatomic, assign) BOOL isLoadEffect; @property (nonatomic, assign) BOOL isLoadEffect;
@property (nonatomic, strong) QXRoomChatListModel *playModel; @property (nonatomic, strong) QXRoomChatListModel *playModel;
@property (nonatomic, assign) BOOL isPlaying; @property (nonatomic, assign) BOOL isPlaying;
@property (nonatomic, assign) BOOL isBackground;
@end @end
@implementation QXCPEffectView @implementation QXCPEffectView
- (instancetype)initWithFrame:(CGRect)frame { - (instancetype)initWithFrame:(CGRect)frame {
@@ -70,6 +71,9 @@
}]; }];
} }
-(void)displayCpEffectUrl:(QXRoomChatListModel *)model{ -(void)displayCpEffectUrl:(QXRoomChatListModel *)model{
if (self.isBackground) {
return;
}
NSString *play_image = model.rights_icon; NSString *play_image = model.rights_icon;
dispatch_async(self.queue, ^{ dispatch_async(self.queue, ^{
/// play_imagereturn /// play_imagereturn
@@ -99,6 +103,7 @@
}); });
} }
-(void)stopPlay{ -(void)stopPlay{
self.isBackground = YES;
// [self removeSvgaQueueData]; // [self removeSvgaQueueData];
self.isLoadEffect = NO; self.isLoadEffect = NO;
[self.svagView stopEffectSvgaPlay]; [self.svagView stopEffectSvgaPlay];
@@ -107,10 +112,11 @@
// [self.alphaVideoView stop]; // [self.alphaVideoView stop];
self.playerMp4View.hidden = YES; self.playerMp4View.hidden = YES;
self.svagView.hidden = YES; self.svagView.hidden = YES;
[self hideEffect];
} }
-(void)startPlay{ -(void)startPlay{
self.isBackground = NO;
[self loadStartSVGAPlayer]; [self loadStartSVGAPlayer];
} }
-(void)viewDidFinishPlayMP4:(NSInteger)totalFrameCount view:(VAPView *)container{ -(void)viewDidFinishPlayMP4:(NSInteger)totalFrameCount view:(VAPView *)container{

View File

@@ -202,14 +202,17 @@
} }
NSDictionary *parm = notice.object; NSDictionary *parm = notice.object;
NSString *uid = [NSString stringWithFormat:@"%@",[parm objectForKey:@"user_id"]]; NSString *uid = [NSString stringWithFormat:@"%@",[parm objectForKey:@"user_id"]];
BOOL isOnline = [[parm objectForKey:@"is_online"] boolValue]; NSInteger isOnline = [[parm objectForKey:@"is_online"] integerValue];
[QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithBool:!isOnline] forKey:uid]; if ([uid isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
if ([uid isEqualToString:self.pitModel.user_id]) { self.offlineImageView.hidden = YES;
if (isOnline) { }else{
self.offlineImageView.hidden = YES; if ([uid isEqualToString:self.pitModel.user_id]) {
}else{ if (isOnline==1) {
self.offlineImageView.hidden = NO; self.offlineImageView.hidden = YES;
[self stopAudioAnimation]; }else{
self.offlineImageView.hidden = NO;
[self stopAudioAnimation];
}
} }
} }
QXLOG(@"在线状态%@",QXGlobal.shareGlobal.offLineDict); QXLOG(@"在线状态%@",QXGlobal.shareGlobal.offLineDict);
@@ -379,8 +382,10 @@
} }
if (pitModel.user_id.longValue > 0) { if (pitModel.user_id.longValue > 0) {
BOOL is_offline = [[[QXGlobal shareGlobal].offLineDict objectForKey:pitModel.user_id?pitModel.user_id:@"0"] boolValue]; NSInteger is_offline = [[[QXGlobal shareGlobal].offLineDict objectForKey:pitModel.user_id?pitModel.user_id:@"0"] integerValue];
if (is_offline) { if (is_offline==1) {
self.offlineImageView.hidden = YES;
}else if(is_offline == 2){
if (self.noOffLine) { if (self.noOffLine) {
self.offlineImageView.hidden = YES; self.offlineImageView.hidden = YES;
}else{ }else{
@@ -389,6 +394,9 @@
}else{ }else{
self.offlineImageView.hidden = YES; self.offlineImageView.hidden = YES;
} }
if ([pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
self.offlineImageView.hidden = YES;
}
self.numberLabel.hidden = YES; self.numberLabel.hidden = YES;
self.headerView.hidden = NO; self.headerView.hidden = NO;
self.nameLabel.hidden = NO; self.nameLabel.hidden = NO;

View File

@@ -330,7 +330,7 @@
-(void)leaveRoom{ -(void)leaveRoom{
UINavigationController *na = (UINavigationController *)KEYWINDOW.rootViewController; UINavigationController *na = (UINavigationController *)KEYWINDOW.rootViewController;
if ([self.roomModel.room_info.type_id isEqualToString:@"6"] && [self.roomModel.room_info.label_id isEqualToString:@"5"]) { if ([self.roomModel.room_info.type_id isEqualToString:@"6"] && [self.roomModel.room_info.label_id isEqualToString:@"5"]) {
[[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomModel.room_info.room_id]; [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id];
NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:na.viewControllers]; NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:na.viewControllers];
for (int i = 0; i < viewControllers.count; i++) { for (int i = 0; i < viewControllers.count; i++) {
UIViewController *vc = [viewControllers objectAtIndex:i]; UIViewController *vc = [viewControllers objectAtIndex:i];

View File

@@ -95,9 +95,9 @@
[self addSubview:self.compereView]; [self addSubview:self.compereView];
[self.compereView mas_makeConstraints:^(MASConstraintMaker *make) { [self.compereView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.bgImageView).offset(5); make.top.equalTo(self.bgImageView).offset(5);
make.width.mas_equalTo(ScaleWidth(45)); make.width.mas_equalTo(ScaleWidth(50));
make.height.mas_equalTo(ScaleWidth(45-10)+51); make.height.mas_equalTo(ScaleWidth(50-10)+51);
make.left.equalTo(self.bgImageView).offset(5); make.left.equalTo(self.bgImageView).offset(20);
}]; }];
self.titleLabel = [[UILabel alloc] init]; self.titleLabel = [[UILabel alloc] init];
@@ -287,8 +287,8 @@
[self.priceView mas_makeConstraints:^(MASConstraintMaker *make) { [self.priceView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.bgImageView).offset(22); make.left.equalTo(self.bgImageView).offset(22);
make.width.mas_equalTo(ScaleWidth(84)); make.width.mas_equalTo(ScaleWidth(84));
make.height.mas_equalTo(ScaleWidth(94)); make.height.mas_equalTo(ScaleWidth(80));
make.top.mas_equalTo(ScaleWidth(78)+20); make.top.mas_equalTo(ScaleWidth(100));
}]; }];
self.priceTitleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_title_image"]]; self.priceTitleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_title_image"]];
@@ -297,6 +297,7 @@
make.centerX.equalTo(self.priceView); make.centerX.equalTo(self.priceView);
make.width.mas_equalTo(ScaleWidth(56)); make.width.mas_equalTo(ScaleWidth(56));
make.height.mas_equalTo(ScaleWidth(15)); make.height.mas_equalTo(ScaleWidth(15));
make.top.equalTo(self.priceView);
}]; }];
self.priceBottomView = [[UIView alloc] init]; self.priceBottomView = [[UIView alloc] init];
@@ -314,7 +315,7 @@
make.centerX.equalTo(self.priceView); make.centerX.equalTo(self.priceView);
make.width.mas_equalTo(ScaleWidth(40)); make.width.mas_equalTo(ScaleWidth(40));
make.height.mas_equalTo(ScaleWidth(40)); make.height.mas_equalTo(ScaleWidth(40));
make.top.mas_equalTo(ScaleWidth(20)); make.top.mas_equalTo(12);
}]; }];
self.priceLabel = [[UILabel alloc] init]; self.priceLabel = [[UILabel alloc] init];
@@ -564,6 +565,7 @@
} }
-(void)coinListDidSignWithCoin:(NSString *)coin{ -(void)coinListDidSignWithCoin:(NSString *)coin{
[QXProjectTools vibrationFeedback];
[QXMineNetwork signCoinWithSign_value:coin sign_id:self.roomModel.sign_info.sign_id successBlock:^(NSDictionary * _Nonnull dict) { [QXMineNetwork signCoinWithSign_value:coin sign_id:self.roomModel.sign_info.sign_id successBlock:^(NSDictionary * _Nonnull dict) {
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -653,7 +655,7 @@
} }
contentView.pitModel = model; contentView.pitModel = model;
if (pit_number == 9 || pit_number == 1) { if (contentView.number == 9 || contentView.number == 1) {
}else{ }else{
[contentView hideCharm]; [contentView hideCharm];
@@ -720,7 +722,7 @@
self.roomModel.room_info.pit_list = arr; self.roomModel.room_info.pit_list = arr;
toSeatView.pitModel = fromPitModel; toSeatView.pitModel = fromPitModel;
fromSeatView.pitModel = totModel; fromSeatView.pitModel = totModel;
if (toPitNumber == 9 || toPitNumber == 1) { if (toSeatView.number == 9 || toSeatView.number == 1) {
}else{ }else{
[toSeatView hideCharm]; [toSeatView hideCharm];
@@ -742,6 +744,11 @@
md.nickname_color = user.nickname_color; md.nickname_color = user.nickname_color;
md.mic_cycle = user.mic_cycle; md.mic_cycle = user.mic_cycle;
seatView.pitModel = md; seatView.pitModel = md;
if (seatView.number == 9 || seatView.number == 1) {
}else{
[seatView hideCharm];
}
break; break;
} }
} }
@@ -783,7 +790,7 @@
showToast(@"场次错误"); showToast(@"场次错误");
return; return;
} }
self.priceLabel.text = sign_value; // self.priceLabel.text = sign_value;
if (_coinView) { if (_coinView) {
[_coinView refreshCoinListWith:sign_coin_list]; [_coinView refreshCoinListWith:sign_coin_list];
} }

View File

@@ -189,7 +189,9 @@
for (QXRoomSeatContentView*seatView in self.seatArray) { for (QXRoomSeatContentView*seatView in self.seatArray) {
if (seatView.pitModel.user_id.longLongValue > 0) { if (seatView.pitModel.user_id.longLongValue > 0) {
if (![seatView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { if (![seatView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
[arr addObject:seatView.pitModel]; if (seatView.number != 9) {
[arr addObject:seatView.pitModel];
}
} }
} }
} }

View File

@@ -1120,6 +1120,9 @@
if (self.roomModel == nil) { if (self.roomModel == nil) {
return; return;
} }
if (isUpSeat) {
[QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithInteger:user.is_online] forKey:user.user_id];
}
switch (self.type) { switch (self.type) {
case QXRoomSeatViewTypeNormal: case QXRoomSeatViewTypeNormal:
[self.normalSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK]; [self.normalSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];

View File

@@ -21,6 +21,7 @@
// If one sendTypingBaseCondation is satisfied, sendTypingBaseCondationInVC is used until the current session exits // If one sendTypingBaseCondation is satisfied, sendTypingBaseCondationInVC is used until the current session exits
@property(nonatomic, assign) BOOL sendTypingBaseCondationInVC; @property(nonatomic, assign) BOOL sendTypingBaseCondationInVC;
@property(nonatomic, strong) UIButton *bottomToolBtn;
@end @end
@@ -35,7 +36,9 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.sendTypingBaseCondationInVC = NO; self.sendTypingBaseCondationInVC = NO;
self.view.backgroundColor = [UIColor clearColor]; self.view.backgroundColor = [UIColor clearColor];
self.bottomToolBtn = [[UIButton alloc] init];
[self.bottomToolBtn addTarget:self action:@selector(alertChat) forControlEvents:(UIControlEventTouchUpInside)];
[self.view addSubview:self.bottomToolBtn];
// notify // notify
NSDictionary *param = @{TUICore_TUIChatNotify_ChatVC_ViewDidLoadSubKey_UserID: self.conversationData.userID ? : @""}; NSDictionary *param = @{TUICore_TUIChatNotify_ChatVC_ViewDidLoadSubKey_UserID: self.conversationData.userID ? : @""};
[TUICore notifyEvent:TUICore_TUIChatNotify [TUICore notifyEvent:TUICore_TUIChatNotify
@@ -43,6 +46,43 @@
object:nil object:nil
param:param]; param:param];
} }
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
if (isCanChat != 1) {
self.bottomToolBtn.hidden = NO;
}else{
self.bottomToolBtn.hidden = YES;
}
}
-(void)viewDidLayoutSubviews{
[super viewDidLayoutSubviews];
self.bottomToolBtn.frame = CGRectMake(0, self.view.bounds.size.height - TabBar_Height , Screen_Width, TabBar_Height);
}
-(void)alertChat{
NSString* canChatMoney = [[NSUserDefaults standardUserDefaults] objectForKey:@"kIsCanChatMoney"];
UIWindow*keyWindow = nil;
NSArray *windows = [UIApplication sharedApplication].windows;
for (UIWindow *window in windows){
if(window.isKeyWindow){
keyWindow = window;
break;
}
}
UINavigationController*na = (UINavigationController*)keyWindow.rootViewController;
NSString *title = [NSString stringWithFormat:@"充值不足%@元,您无法发送消息",canChatMoney];
UIAlertController *al = [UIAlertController alertControllerWithTitle:title message:@"" preferredStyle:(UIAlertControllerStyleAlert)];
[al addAction:[UIAlertAction actionWithTitle:@"去充值" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
UIViewController *vc = [[NSClassFromString(@"QXRechargeViewcController") alloc] init];
UINavigationController *naV = [[UINavigationController alloc] initWithRootViewController:vc];
naV.modalPresentationStyle = UIModalPresentationFullScreen;
[na presentViewController:naV animated:YES completion:nil];
}]];
[al addAction:[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
}]];
[na presentViewController:al animated:YES completion:nil];
}
#pragma mark - Override Methods #pragma mark - Override Methods

View File

@@ -213,14 +213,14 @@
#pragma mark - Event response #pragma mark - Event response
- (void)onMicButtonClicked:(UIButton *)sender { - (void)onMicButtonClicked:(UIButton *)sender {
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; // NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
#if DEBUG //#if DEBUG
isCanChat = 1; // isCanChat = 1;
#endif //#endif
if (isCanChat != 1) { // if (isCanChat != 1) {
[self alertChat]; // [self alertChat];
return; // return;
} // }
_recordButton.hidden = NO; _recordButton.hidden = NO;
_inputTextView.hidden = YES; _inputTextView.hidden = YES;
_micButton.hidden = YES; _micButton.hidden = YES;
@@ -237,14 +237,14 @@
} }
- (void)onKeyboardButtonClicked:(UIButton *)sender { - (void)onKeyboardButtonClicked:(UIButton *)sender {
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; // NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
#if DEBUG //#if DEBUG
isCanChat = 1; // isCanChat = 1;
#endif //#endif
if (isCanChat != 1) { // if (isCanChat != 1) {
[self alertChat]; // [self alertChat];
return; // return;
} // }
_micButton.hidden = NO; _micButton.hidden = NO;
_keyboardButton.hidden = YES; _keyboardButton.hidden = YES;
_recordButton.hidden = YES; _recordButton.hidden = YES;
@@ -257,14 +257,14 @@
} }
- (void)onFaceEmojiButtonClicked:(UIButton *)sender { - (void)onFaceEmojiButtonClicked:(UIButton *)sender {
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; // NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
#if DEBUG //#if DEBUG
isCanChat = 1; // isCanChat = 1;
#endif //#endif
if (isCanChat != 1) { // if (isCanChat != 1) {
[self alertChat]; // [self alertChat];
return; // return;
} // }
_micButton.hidden = NO; _micButton.hidden = NO;
_faceButton.hidden = YES; _faceButton.hidden = YES;
_keyboardButton.hidden = NO; _keyboardButton.hidden = NO;
@@ -279,14 +279,14 @@
} }
- (void)onMoreButtonClicked:(UIButton *)sender { - (void)onMoreButtonClicked:(UIButton *)sender {
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; // NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
#if DEBUG //#if DEBUG
isCanChat = 1; // isCanChat = 1;
#endif //#endif
if (isCanChat != 1) { // if (isCanChat != 1) {
[self alertChat]; // [self alertChat];
return; // return;
} // }
if (_delegate && [_delegate respondsToSelector:@selector(inputBarDidTouchMore:)]) { if (_delegate && [_delegate respondsToSelector:@selector(inputBarDidTouchMore:)]) {
[_delegate inputBarDidTouchMore:self]; [_delegate inputBarDidTouchMore:self];
} }
@@ -371,45 +371,45 @@
} }
} }
-(void)alertChat{ //-(void)alertChat{
NSString* canChatMoney = [[NSUserDefaults standardUserDefaults] objectForKey:@"kIsCanChatMoney"]; // NSString* canChatMoney = [[NSUserDefaults standardUserDefaults] objectForKey:@"kIsCanChatMoney"];
UIWindow*keyWindow = nil; // UIWindow*keyWindow = nil;
NSArray *windows = [UIApplication sharedApplication].windows; // NSArray *windows = [UIApplication sharedApplication].windows;
for (UIWindow *window in windows){ // for (UIWindow *window in windows){
if(window.isKeyWindow){ // if(window.isKeyWindow){
keyWindow = window; // keyWindow = window;
break; // break;
} // }
} // }
UINavigationController*na = (UINavigationController*)keyWindow.rootViewController; // UINavigationController*na = (UINavigationController*)keyWindow.rootViewController;
NSString *title = [NSString stringWithFormat:@"充值不足%@元,您无法发送消息",canChatMoney]; // NSString *title = [NSString stringWithFormat:@"充值不足%@元,您无法发送消息",canChatMoney];
UIAlertController *al = [UIAlertController alertControllerWithTitle:title message:@"" preferredStyle:(UIAlertControllerStyleAlert)]; // UIAlertController *al = [UIAlertController alertControllerWithTitle:title message:@"" preferredStyle:(UIAlertControllerStyleAlert)];
[al addAction:[UIAlertAction actionWithTitle:@"去充值" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) { // [al addAction:[UIAlertAction actionWithTitle:@"去充值" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
UIViewController *vc = [[NSClassFromString(@"QXRechargeViewcController") alloc] init]; // UIViewController *vc = [[NSClassFromString(@"QXRechargeViewcController") alloc] init];
UINavigationController *naV = [[UINavigationController alloc] initWithRootViewController:vc]; // UINavigationController *naV = [[UINavigationController alloc] initWithRootViewController:vc];
naV.modalPresentationStyle = UIModalPresentationFullScreen; // naV.modalPresentationStyle = UIModalPresentationFullScreen;
[na presentViewController:naV animated:YES completion:nil]; // [na presentViewController:naV animated:YES completion:nil];
}]]; // }]];
[al addAction:[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) { // [al addAction:[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
//
}]]; // }]];
[na presentViewController:al animated:YES completion:nil]; // [na presentViewController:al animated:YES completion:nil];
} //}
#pragma mark - Text input #pragma mark - Text input
#pragma mark-- UITextViewDelegate #pragma mark-- UITextViewDelegate
- (void)textViewDidBeginEditing:(UITextView *)textView { - (void)textViewDidBeginEditing:(UITextView *)textView {
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; // NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
//#if DEBUG //#if DEBUG
// isCanChat = 1; // isCanChat = 1;
//#endif //#endif
if (TUIChatConfig.defaultConfig.isAppStore) { // if (TUIChatConfig.defaultConfig.isAppStore) {
isCanChat = 1; // isCanChat = 1;
} // }
if (isCanChat != 1) { // if (isCanChat != 1) {
[self.inputTextView resignFirstResponder]; // [self.inputTextView resignFirstResponder];
[self alertChat]; // [self alertChat];
return; // return;
} // }
self.keyboardButton.hidden = YES; self.keyboardButton.hidden = YES;
self.micButton.hidden = NO; self.micButton.hidden = NO;
self.faceButton.hidden = NO; self.faceButton.hidden = NO;

View File

@@ -56,6 +56,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic) BOOL isShowConversationGroup; @property(nonatomic) BOOL isShowConversationGroup;
- (void)startConversation:(V2TIMConversationType)type; - (void)startConversation:(V2TIMConversationType)type;
-(void)reloadConversationList;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -63,7 +63,13 @@
- (TUIConversationListBaseDataProvider *)dataProvider { - (TUIConversationListBaseDataProvider *)dataProvider {
return self.settingDataProvider; return self.settingDataProvider;
} }
-(void)reloadConversationList{
self.settingDataProvider.delegate = nil;
self.settingDataProvider = nil;
TUIConversationListDataProvider *dataProvider = [[TUIConversationListDataProvider alloc] init];
self.settingDataProvider = dataProvider;
[_tableViewForAll setDataProvider:dataProvider];
}
#pragma mark - Life Cycle #pragma mark - Life Cycle
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];