This commit is contained in:
启星
2025-12-17 11:44:25 +08:00
parent 999bf3d804
commit ba4fd658a9
37 changed files with 450 additions and 82 deletions

View File

@@ -79,6 +79,8 @@ def taget_pods
pod 'TUIConversation', :path => "./TUIKit/TUIConversation"
# pod 'RTCRoomEngine'
pod 'TIMPush'
#占位
pod 'DZNEmptyDataSet'
end
target 'QXLive' do

View File

@@ -748,7 +748,7 @@
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 8798G5VMH9;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -787,7 +787,7 @@
"$(inherited)",
"$(SDKROOT)/usr/lib/swift",
);
MARKETING_VERSION = 1.1.8;
MARKETING_VERSION = 1.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -814,7 +814,7 @@
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 8798G5VMH9;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -853,7 +853,7 @@
"$(inherited)",
"$(SDKROOT)/usr/lib/swift",
);
MARKETING_VERSION = 1.1.8;
MARKETING_VERSION = 1.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -336,7 +336,17 @@
-(void)checkAndUpdateRedPackets{
if ([self.roomId isExist]) {
[QXMineNetwork appKeepAliveWithRoomId:self.roomId];
[QXMineNetwork appKeepAliveWithRoomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
NSString *string = [NSString stringWithFormat:@"%@",dict[@"not_received_tasks_num"]];
if ([string containsString:@"null"]) {
string = @"";
}
if (self.roomVC) {
self.roomVC.taskWaitDrawNum = string;
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
}

View File

@@ -49,6 +49,7 @@
@property (nonatomic,strong)QXUserModel *userModel;
@property (nonatomic,strong)NSMutableArray *bannerArry;
@property (nonatomic,strong)NSString *cancelCode;
@property (nonatomic,strong)NSString *taskNum;
@end
@implementation QXMineViewController
@@ -106,6 +107,16 @@
weakSelf.tableHeaderView.earnings = earnings;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
[self getTaskCount];
}
-(void)getTaskCount{
MJWeakSelf
[QXMineNetwork appTaskWaitDrawSuccessBlock:^(NSString * _Nonnull num) {
weakSelf.taskNum = num;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
#pragma mark - QXMineServiceCellDelegate
@@ -323,6 +334,7 @@
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView];
cell.taskNumber = self.taskNum;
cell.delegate = self;
cell.singerIsAuth = self.userModel.singer_status.intValue==1;
if (indexPath.row == 0) {

View File

@@ -13,4 +13,9 @@ NS_ASSUME_NONNULL_BEGIN
@end
@interface QXTaskTypeCell : UICollectionViewCell
@property (nonatomic,strong)QXDayTaskTypeModel *model;
@property (nonatomic,strong)UIButton *titleBtn;
@property (nonatomic,strong)UIButton *lockImageBtn;
@end
NS_ASSUME_NONNULL_END

View File

@@ -18,11 +18,16 @@
#import "QXRechargeViewcController.h"
#import "QXSignInAppView.h"
#import "QXCreatPhotosViewController.h"
#import "QXCreateRoomViewController.h"
@interface QXTaskViewController ()<UITableViewDataSource,UITableViewDelegate,QXDayTaskCellDelegate>
@interface QXTaskViewController ()<UITableViewDataSource,UITableViewDelegate,QXDayTaskCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic,strong)QXDayTaskTopView *topView;
@property (nonatomic,strong)UIView *bottomView;
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UICollectionView *collectionView;
@property (nonatomic,strong)QXDayTaskModel *model;
@property (nonatomic,strong)QXDayTaskTypeModel *typeModel;
@property (nonatomic,strong)UIImageView *nodataView;
@end
@implementation QXTaskViewController
@@ -50,25 +55,54 @@
- (void)initSubViews{
self.bgImageHidden = YES;
self.view.backgroundColor = RGB16(0xE3FAE4);
self.tableView.tableHeaderView = self.topView;
[self.view addSubview:self.tableView];
[self.view addSubview:self.topView];
self.bottomView = [[UIView alloc] initWithFrame:CGRectMake(16, self.topView.bottom, SCREEN_WIDTH-32, SCREEN_HEIGHT-self.topView.bottom-kSafeAreaBottom)];
self.bottomView.backgroundColor = RGB16(0xffffff);
[self.bottomView addRoundedCornersWithRadius:16];
self.tableView.frame = CGRectMake(0, 48, self.bottomView.width, self.bottomView.height-48);
[self.bottomView addSubview:self.tableView];
[self.view addSubview:self.bottomView];
self.nodataView = [[UIImageView alloc] initWithFrame:self.tableView.frame];
self.nodataView.hidden = YES;
[self.bottomView addSubview:self.nodataView];
[self createTaskTypeView];
}
-(void)createTaskTypeView{
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing = 20;
layout.sectionInset = UIEdgeInsetsMake(0, 14, 0, 16);
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[self.collectionView registerClass:[QXTaskTypeCell class] forCellWithReuseIdentifier:@"QXTaskTypeCell"];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.collectionView.showsHorizontalScrollIndicator = NO;
self.collectionView.bounces = NO;
self.collectionView.pagingEnabled = NO;
self.collectionView.backgroundColor = [UIColor clearColor];
[self.bottomView addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(0);
make.right.mas_equalTo(0);
make.height.mas_equalTo(48);
}];
}
-(void)getDayTask{
MJWeakSelf
[QXMineNetwork getDayTaskListSuccessBlock:^(QXDayTaskModel * _Nonnull model) {
weakSelf.model = model;
[weakSelf.dataArray removeAllObjects];
[weakSelf.dataArray addObjectsFromArray:model.tasks];
for (int i = 0 ; i < model.tasks.count; i++) {
QXDayTaskTypeModel*md = model.tasks[i];
if (md.task_list.count == 0) {
[weakSelf.dataArray removeObjectAtIndex:i];
}
}
weakSelf.model.tasks = weakSelf.dataArray;
weakSelf.topView.model = model;
weakSelf.typeModel = model.tasks.firstObject;
if (weakSelf.typeModel) {
weakSelf.typeModel.isSelected = YES;
[weakSelf.dataArray removeAllObjects];
[weakSelf.dataArray addObjectsFromArray:weakSelf.typeModel.task_list];
[weakSelf.tableView reloadData];
}
[weakSelf.collectionView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
@@ -80,7 +114,7 @@
}
-(QXDayTaskTopView *)topView{
if (!_topView) {
_topView = [[QXDayTaskTopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, ScaleWidth(285)+12)];
_topView = [[QXDayTaskTopView alloc] initWithFrame:CGRectMake(16, NavContentHeight, SCREEN_WIDTH-32, ScaleWidth(285))];
}
return _topView;
}
@@ -143,7 +177,9 @@
[self.navigationController pushViewController:vc animated:YES];
return;
}else if (taskModel.jump_type.intValue == 7) {
QXCreateRoomViewController *vc = [[QXCreateRoomViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
return;
}
}else if (taskModel.task_status.intValue == 2) {
@@ -156,53 +192,64 @@
}];
}
}
#pragma mark - UITableViewDataSource,UITableViewDelegate
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
if (self.model == nil) {
return 0;
}
#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.model.tasks.count;
}
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
QXTaskTypeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXTaskTypeCell" forIndexPath:indexPath];
cell.model = self.model.tasks[indexPath.row];
return cell;
}
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
QXDayTaskTypeModel *model = self.model.tasks[indexPath.row];
CGFloat itemWidth = [model.task_type_name widthForFont:[UIFont boldSystemFontOfSize:16]];
if (model.is_lock.intValue == 1) {
itemWidth += 21;
}
itemWidth += 5;
return CGSizeMake(itemWidth, 48);
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
QXDayTaskTypeModel *model = self.model.tasks[indexPath.row];
if (model == self.typeModel) {
return;
}
if (self.typeModel) {
self.typeModel.isSelected = NO;
}
model.isSelected = YES;
self.typeModel = model;
[collectionView reloadData];
[self.dataArray removeAllObjects];
[self.dataArray addObjectsFromArray:model.task_list];
[self.tableView reloadData];
if (model.is_lock.intValue == 1) {
if ([model.task_type_name containsString:@"情侣"]) {
self.nodataView.hidden = NO;
self.nodataView.image = [UIImage imageNamed:@"task_cp_no_data"];
}else if ([model.task_type_name containsString:@"师徒"]) {
self.nodataView.hidden = NO;
self.nodataView.image = [UIImage imageNamed:@"task_master_no_data"];
}else{
self.nodataView.hidden = YES;
}
}else{
self.nodataView.hidden = YES;
}
}
#pragma mark - UITableViewDataSource,UITableViewDelegate
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
QXDayTaskTypeModel *model = self.model.tasks[section];
return model.task_list.count;
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXDayTaskCell *cell = [QXDayTaskCell cellWithTableView:tableView];
QXDayTaskTypeModel *model = self.model.tasks[indexPath.section];
QXDayTaskListModel *taskModel = model.task_list[indexPath.row];
QXDayTaskListModel *taskModel = self.dataArray[indexPath.row];
cell.model = taskModel;
cell.delegate = self;
return cell;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, 35)];
header.backgroundColor = [UIColor whiteColor];
[header addRoundedCornersWithRadius:17.5 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, SCREEN_WIDTH-32*2, 23)];
titleLabel.font = [UIFont boldSystemFontOfSize:16];
titleLabel.textColor = QXConfig.textColor;
QXDayTaskTypeModel *model = self.model.tasks[section];
titleLabel.text = model.task_type_name;
[header addSubview:titleLabel];
return header;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 35;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, 35)];
footer.backgroundColor = [UIColor clearColor];
UIView *roundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, 25)];
roundView.backgroundColor = [UIColor whiteColor];
[roundView addRoundedCornersWithRadius:17.5 byRoundingCorners:(UIRectCornerBottomLeft|UIRectCornerBottomRight)];
[footer addSubview:roundView];
return footer;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 35;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
QXDayTaskTypeModel *model = self.model.tasks[indexPath.section];
QXDayTaskListModel *taskModel = model.task_list[indexPath.row];
@@ -215,7 +262,7 @@
-(UITableView *)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(16, NavContentHeight, SCREEN_WIDTH-32, SCREEN_HEIGHT-NavContentHeight) style:(UITableViewStyleGrouped)];
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(16, self.topView.bottom+12, SCREEN_WIDTH-32, SCREEN_HEIGHT-self.topView.bottom-12) style:(UITableViewStylePlain)];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = [UIColor clearColor];
@@ -231,3 +278,64 @@
return _tableView;
}
@end
@implementation QXTaskTypeCell
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubviews];
}
return self;
}
-(void)setModel:(QXDayTaskTypeModel *)model{
_model = model;
[self.titleBtn setTitle:model.task_type_name forState:(UIControlStateNormal)];
if (model.is_lock.intValue == 1) {
[self.titleBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.equalTo(self);
make.right.equalTo(self.lockImageBtn.mas_left);
}];
self.lockImageBtn.hidden = NO;
}else{
self.lockImageBtn.hidden = YES;
[self.titleBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.equalTo(self);
make.right.equalTo(self.lockImageBtn.mas_right);
}];
}
if (model.isSelected) {
self.titleBtn.selected = YES;
self.lockImageBtn.selected = YES;
}else{
self.titleBtn.selected = NO;
self.lockImageBtn.selected = NO;
}
}
-(void)initSubviews{
self.lockImageBtn = [[UIButton alloc] init];
[self.lockImageBtn setImage:[UIImage imageNamed:@"task_lock_icon_nor"] forState:(UIControlStateNormal)];
[self.lockImageBtn setImage:[UIImage imageNamed:@"task_lock_icon_sel"] forState:(UIControlStateSelected)];
[self addSubview:self.lockImageBtn];
[self.lockImageBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self);
make.height.width.mas_equalTo(21);
make.centerY.equalTo(self);
}];
self.lockImageBtn.userInteractionEnabled = NO;
self.titleBtn = [[UIButton alloc] init];
[self.titleBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateSelected)];
[self.titleBtn setTitleColor:RGB16A(0x000000,0.45) forState:(UIControlStateNormal)];
self.titleBtn.titleLabel.font = [UIFont boldSystemFontOfSize:16];
[self addSubview:self.titleBtn];
[self.titleBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.equalTo(self);
make.right.equalTo(self.lockImageBtn.mas_left);
}];
self.titleBtn.userInteractionEnabled = NO;
}
@end

View File

@@ -323,10 +323,10 @@
[QXMineNetwork postRealNameResultWithOrderNo:faceVerifyResult.orderNo successBlock:^(NSDictionary * _Nonnull dict) {
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}else{
showToast(@"实名认证失败");
showToast(@"人脸认证失败");
}
}

View File

@@ -51,7 +51,11 @@ NS_ASSUME_NONNULL_BEGIN
//@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*teacher_tasks;
@property(nonatomic,strong)NSString *task_type_name;
@property(nonatomic,strong)NSString *task_type_id;
///1 锁 0 开
@property(nonatomic,strong)NSString *is_lock;
@property(nonatomic,strong)NSArray<QXDayTaskListModel*>*task_list;
@property(nonatomic,assign)BOOL isSelected;
@end
@interface QXDayTaskListModel : NSObject

View File

@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign)NSInteger type;
@property (nonatomic,strong)NSString* icon;
@property (nonatomic,strong)NSString* unreadNumber;
@end
NS_ASSUME_NONNULL_END

View File

@@ -516,6 +516,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
+(void)nextSongWithRoomId:(NSString*)room_id
now_did:(NSString*)now_did
is_auto_next:(NSString*)is_auto_next
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@@ -1395,7 +1396,9 @@ NS_ASSUME_NONNULL_BEGIN
/**
在线
*/
+(void)appKeepAliveWithRoomId:(NSString*)room_id;
+(void)appKeepAliveWithRoomId:(NSString*)room_id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
签约房间主持邀请上签约麦用户拒绝
@@ -1429,6 +1432,13 @@ NS_ASSUME_NONNULL_BEGIN
+(void)appSignTaskStatusSuccessBlock:(void (^)(NSString* status))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
每日任务未领取数量
*/
+(void)appTaskWaitDrawSuccessBlock:(void (^)(NSString* num))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@end

View File

@@ -1052,10 +1052,11 @@
failBlock(error,msg);
}];
}
+(void)nextSongWithRoomId:(NSString *)room_id now_did:(NSString *)now_did successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
+(void)nextSongWithRoomId:(NSString *)room_id now_did:(NSString *)now_did is_auto_next:(NSString*)is_auto_next successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{
@"room_id":room_id,
@"now_did":now_did?now_did:@"",
@"is_auto_next":is_auto_next?:@""
};
[[QXRequset shareInstance] postWithUrl:QXRoomNextSong parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
@@ -2804,11 +2805,15 @@
}];
}
+(void)appKeepAliveWithRoomId:(NSString *)room_id{
+(void)appKeepAliveWithRoomId:(NSString *)room_id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
[[QXRequset shareInstance] getWithUrl:QXKeepAlive parameters:@{@"room_id":room_id?:@""} needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
@@ -2885,5 +2890,18 @@
}];
}
/**
*/
+(void)appTaskWaitDrawSuccessBlock:(void (^)(NSString* num))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
[[QXRequset shareInstance] getWithUrl:QXAppTaskWaitDraw parameters:@{} needCache:NO success:^(id responseObject) {
if (successBlock) {
NSString *num = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"num"]];
successBlock(num);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
@end

View File

@@ -44,14 +44,16 @@ typedef NS_ENUM(NSInteger) {
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
@property (nonatomic,assign)BOOL isMore;
@property (nonatomic,assign)BOOL singerIsAuth;
@property (nonatomic,strong)NSString *taskNumber;
+(instancetype)cellWithTableView:(UITableView *)tableView;
@end
@interface QXMineServiceSubCell : UICollectionViewCell
@property (nonatomic,strong)UIImageView *imageView;
@property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)UILabel *unreadLabel;
@property (nonatomic,strong)QXServiceModel *model;
@property (nonatomic,strong)NSString *unreadNum;
@end

View File

@@ -17,6 +17,7 @@
@property (nonatomic,strong)QXServiceModel *inviteModel;
@property (nonatomic,strong)QXServiceModel *singerAuthModel;
@property (nonatomic,strong)QXServiceModel *songListModel;
@property (nonatomic,strong)QXServiceModel *taskModel;
@end
@implementation QXMineServiceCell
@@ -145,6 +146,11 @@
_singerIsAuth = singerIsAuth;
}
-(void)setTaskNumber:(NSString *)taskNumber{
_taskNumber = taskNumber;
self.taskModel.unreadNumber = taskNumber;
[self.collectionView reloadData];
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.isMore?self.moreArray.count:self.serviceArray.count;
}
@@ -214,6 +220,7 @@
md2.title = @"每日任务";
md2.icon = @"service_task";
md2.type = QXMineServiceTypeDayTask;
self.taskModel = md2;
QXServiceModel *md3 = [[QXServiceModel alloc] init];
md3.title = @"意见反馈";
@@ -309,6 +316,13 @@
_model = model;
self.imageView.image = [UIImage imageNamed:model.icon];
self.titleLabel.text = model.title;
if (model.unreadNumber.integerValue <= 0) {
self.unreadLabel.text = @"0";
self.unreadLabel.hidden = YES;
}else{
self.unreadLabel.text = model.unreadNumber;
self.unreadLabel.hidden = NO;
}
}
-(void)initSubviews{
UIImageView *imageView = [[UIImageView alloc] init];
@@ -329,6 +343,32 @@
make.centerX.equalTo(self.contentView);
make.height.mas_equalTo(17);
}];
self.unreadLabel = [[UILabel alloc] init];
self.unreadLabel.font = [UIFont systemFontOfSize:10];
self.unreadLabel.textAlignment = NSTextAlignmentCenter;
// self.unreadLabel.text = @"99";
self.unreadLabel.hidden = YES;
self.unreadLabel.textColor = RGB16(0xffffff);
self.unreadLabel.backgroundColor = RGB(255, 19, 55);
[self.unreadLabel addRoundedCornersWithRadius:10];
[self.contentView addSubview:self.unreadLabel];
[self.unreadLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(0);
make.right.mas_equalTo(-25);
make.width.mas_equalTo(18);
make.height.mas_equalTo(18);
}];
}
-(void)setUnreadNum:(NSString *)unreadNum{
_unreadNum = unreadNum;
if (unreadNum.integerValue <= 0) {
self.unreadLabel.text = @"0";
self.unreadLabel.hidden = YES;
}else{
self.unreadLabel.text = unreadNum;
self.unreadLabel.hidden = NO;
}
}
@end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -560,5 +560,6 @@ static NSString * QXAppSignTask = @"api/Tasks/dailyTasksSignList";
static NSString * QXAppSign = @"api/Tasks/dailyTasksSign";
/// 每日签到
static NSString * QXAppSignStatus = @"api/Tasks/dailyTasksSignStatus";
/// 每日任务未领取数量
static NSString * QXAppTaskWaitDraw = @"api/Tasks/dailyTasksUnReceiveCount";
#endif /* Api_h */

View File

@@ -86,6 +86,8 @@
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
[viewControllers insertObject:roomVc atIndex:i];
QXGlobal.shareGlobal.roomVC = roomVc;
QXGlobal.shareGlobal.roomId = roomVc.roomId;
break;
}
}

View File

@@ -56,6 +56,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXTimePraizeView *timeView;
/// 巡乐会
@property (nonatomic,strong)QXMeetActivityView *meetView;
/// 任务待领取数量
@property (nonatomic,strong)NSString *taskWaitDrawNum;
-(void)configBottomTools;
-(void)stopHWDMP4;
-(void)playHWDMP4;

View File

@@ -105,10 +105,6 @@ QXRoomUserInfoViewDelegate
[QXGlobal.shareGlobal startKeepAlive];
// [self performSelector:@selector(test) afterDelay:5];
}
//-(void)test{
// [self roomPKRecieveLoserWantToRunRoadWithUserInfo:nil];
//27b36h
//}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES];
@@ -155,6 +151,7 @@ QXRoomUserInfoViewDelegate
});
self.navigationController.viewControllers = marr;
// self.navigationController.interactivePopGestureRecognizer.enabled = NO;
[self getTaskCount];
}
-(void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
@@ -301,20 +298,28 @@ QXRoomUserInfoViewDelegate
}];
}
-(void)getTaskCount{
MJWeakSelf
[QXMineNetwork appTaskWaitDrawSuccessBlock:^(NSString * _Nonnull num) {
[weakSelf setTaskWaitDrawNum:num];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
#pragma mark -
-(void)joinRoom{
MJWeakSelf
if (self.roomModel) {
[self resetSubviews];
[self configRoomDataIsJoin:YES];
}else{
MJWeakSelf
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
QXGlobal.shareGlobal.roomId = self.roomId;
QXGlobal.shareGlobal.roomVC = self;
[QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
weakSelf.roomModel = roomModel;
[self resetSubviews];
[self configRoomDataIsJoin:YES];
[weakSelf resetSubviews];
[weakSelf configRoomDataIsJoin:YES];
} roomErrorBlock:^(NSString * _Nonnull roomId, NSString * _Nonnull msg) {
}failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -2134,5 +2139,10 @@ QXRoomUserInfoViewDelegate
}
return _dayTaskTagView;
}
-(void)setTaskWaitDrawNum:(NSString *)taskWaitDrawNum{
_taskWaitDrawNum = taskWaitDrawNum;
self.dayTaskTagView.unreadNum = taskWaitDrawNum;
}
@end

View File

@@ -202,7 +202,22 @@ NSInteger maxMessageCount = 20;
// [self.giftArray removeFirstObject];
// }
#if DEBUG
if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem || model.messageType == QXRoomChatMessageTypeChat) {
// if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem || model.messageType == QXRoomChatMessageTypeChat) {
// NSString *text = @"";
// if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) {
// text = model.text;
// }else{
// text = [NSString stringWithFormat:@"%@说:%@",model.FromUserInfo.nickname,model.text];
// }
// AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:text];
// utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"zh-CN"];
// utterance.rate = 0.5 ;
// utterance.pitchMultiplier = 1.0 ;
// utterance.volume = 1.0 ;
// [self.synthesizer speakUtterance:utterance];
// }
#else
if (QXGlobal.shareGlobal.isAppStore) {
NSString *text = @"";
if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) {
text = model.text;

View File

@@ -414,6 +414,8 @@
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
[viewControllers insertObject:roomVc atIndex:i];
QXGlobal.shareGlobal.roomVC = roomVc;
QXGlobal.shareGlobal.roomId = roomVc.roomId;
break;
}
}

View File

@@ -10,6 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface QXRoomDayTaskTagView : UIView
@property (nonatomic,strong)NSString *unreadNum;
@property (nonatomic,copy)void(^startBlock)(void);
@end

View File

@@ -6,10 +6,12 @@
//
#import "QXRoomDayTaskTagView.h"
@interface QXRoomDayTaskTagView()
@property (nonatomic,strong)UIImageView *imageView;
@property (nonatomic,strong)UILabel *timeLabel;
@property (nonatomic,strong)UIButton *btn;
@property (nonatomic,strong)UILabel *unreadLabel;
@end
@implementation QXRoomDayTaskTagView
@@ -17,7 +19,7 @@
{
self = [super init];
if (self) {
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-400, 80, 60);
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-400, 80, 67);
[self initSubviews];
}
return self;
@@ -25,7 +27,7 @@
-(void)initSubviews{
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_day_task"]];
self.imageView.frame = CGRectMake(0, 0, 80, 60);
self.imageView.frame = CGRectMake(0, 0, 80, 67);
[self addSubview:self.imageView];
self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.imageView.bottom, self.width, 20)];
@@ -33,6 +35,23 @@
self.timeLabel.font = [UIFont systemFontOfSize:12];
self.timeLabel.textColor = RGB16(0xFFEBBD);
[self addSubview:self.timeLabel];
self.unreadLabel = [[UILabel alloc] init];
self.unreadLabel.font = [UIFont systemFontOfSize:10];
self.unreadLabel.textAlignment = NSTextAlignmentCenter;
// self.unreadLabel.text = @"99";
self.unreadLabel.hidden = YES;
self.unreadLabel.textColor = RGB16(0xffffff);
self.unreadLabel.backgroundColor = RGB(255, 19, 55);
[self.unreadLabel addRoundedCornersWithRadius:10];
[self addSubview:self.unreadLabel];
[self.unreadLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(5);
make.right.mas_equalTo(-5);
make.width.mas_equalTo(20);
make.height.mas_equalTo(20);
}];
self.btn = [[UIButton alloc] initWithFrame:self.bounds];
[self.btn addTarget:self action:@selector(btnClick) forControlEvents:(UIControlEventTouchUpInside)];
[self addSubview:self.btn];
@@ -45,6 +64,17 @@
self.startBlock();
}
}
-(void)setUnreadNum:(NSString *)unreadNum{
_unreadNum = unreadNum;
if (unreadNum.integerValue <= 0) {
self.unreadLabel.text = @"0";
self.unreadLabel.hidden = YES;
}else{
self.unreadLabel.text = unreadNum;
self.unreadLabel.hidden = NO;
}
}
-(void)handlePan:(UIPanGestureRecognizer*)recognizer{
if (recognizer.state == UIGestureRecognizerStateEnded) {
NSLog(@"拖动结束");

View File

@@ -338,6 +338,8 @@
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
[viewControllers insertObject:roomVc atIndex:i];
QXGlobal.shareGlobal.roomVC = roomVc;
QXGlobal.shareGlobal.roomId = roomVc.roomId;
break;
}
}

View File

@@ -368,7 +368,7 @@ QXRoomSeatDelegate
if ([self.songInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
double time = progress/1000.0+1;
if (ceil(time) >= self.songInfo.duration) {
[self nextAction];
[self nextSongActionIsAuto:YES];
}
}
}
@@ -658,16 +658,20 @@ QXRoomSeatDelegate
}
-(void)nextAction{
[self nextSongActionIsAuto:NO];
}
-(void)nextSongActionIsAuto:(BOOL)isAuto{
if (self.songInfo) {
[QXMineNetwork nextSongWithRoomId:self.roomModel.room_info.room_id now_did:self.songInfo.did successBlock:^(NSDictionary * _Nonnull dict) {
[QXMineNetwork nextSongWithRoomId:self.roomModel.room_info.room_id now_did:self.songInfo.did is_auto_next:isAuto?@"1":@"0" successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"成功");
// [[QXAgoraEngine sharedEngine] ktv_EndSing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}
}
-(void)endAction{
[QXMineNetwork endSongWithRoomId:self.roomModel.room_info.room_id successBlock:^(NSDictionary * _Nonnull dict) {