优化提交
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
-(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
|
||||
if (self.childViewControllers.count > 1) {
|
||||
if ([self respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
if ([self.visibleViewController isKindOfClass:NSClassFromString(@"QXRoomViewController")]) {
|
||||
if ([self.visibleViewController isKindOfClass:NSClassFromString(@"QXRoomViewController")] || [self.visibleViewController isKindOfClass:NSClassFromString(@"QXChirldViewController")]) {
|
||||
self.interactivePopGestureRecognizer.enabled = NO;
|
||||
}else{
|
||||
self.interactivePopGestureRecognizer.enabled = YES;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
@property (nonatomic,assign)BOOL isLogin;
|
||||
@property (nonatomic,strong)NSString *roomId;
|
||||
|
||||
@property (nonatomic,assign)BOOL isClickJoinRoom;
|
||||
|
||||
@property (nonatomic,strong)QXTimer *timer;
|
||||
@property (nonatomic,assign)NSInteger taskTime;
|
||||
@end
|
||||
@@ -193,10 +195,11 @@
|
||||
[[QXGlobal shareGlobal] logOut];
|
||||
return;
|
||||
}
|
||||
[UIApplication sharedApplication].idleTimerDisabled = YES;
|
||||
|
||||
navagationController = (QXBaseNavigationController*)KEYWINDOW.rootViewController;
|
||||
// navagationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
if (_miniView) {
|
||||
[[QXGiftPlayerManager shareManager] startPlay];
|
||||
[_miniView removeFromSuperview];
|
||||
_miniView = nil;
|
||||
}
|
||||
@@ -204,6 +207,7 @@
|
||||
if ([navagationController.viewControllers containsObject:self.roomVC]) {
|
||||
return;
|
||||
}else{
|
||||
[UIApplication sharedApplication].idleTimerDisabled = YES;
|
||||
self.roomVC.hidesBottomBarWhenPushed = YES;
|
||||
[navagationController pushViewController:self.roomVC animated:YES];
|
||||
}
|
||||
@@ -212,29 +216,62 @@
|
||||
if (self.roomId && ![self.roomId isEqualToString:roomId]) {
|
||||
[self quitRoomWithRoomId:self.roomId];
|
||||
}
|
||||
[UIApplication sharedApplication].idleTimerDisabled = YES;
|
||||
MJWeakSelf
|
||||
if (isRejoin) {
|
||||
if (self.roomVC!=nil) {
|
||||
self.roomVC.hidesBottomBarWhenPushed = YES;
|
||||
[navagationController pushViewController:self.roomVC animated:YES];
|
||||
}else{
|
||||
self.roomVC = [[QXRoomViewController alloc] init];
|
||||
self.roomVC.roomId = roomId;
|
||||
self.roomVC.isReJoin = isRejoin;
|
||||
self.roomId = roomId;
|
||||
self.roomVC.hidesBottomBarWhenPushed = YES;
|
||||
[navagationController pushViewController:self.roomVC animated:YES];
|
||||
if (weakSelf.isClickJoinRoom) {
|
||||
return;
|
||||
}
|
||||
// showLoadingInView(KEYWINDOW)
|
||||
weakSelf.isClickJoinRoom = YES;
|
||||
[QXMineNetwork joinRoomWithRoomId:roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
// hideLoadingInView(KEYWINDOW)
|
||||
// roomModel.room_info.pk_room_id = @"33";
|
||||
weakSelf.isClickJoinRoom = NO;
|
||||
weakSelf.roomVC = [[QXRoomViewController alloc] init];
|
||||
weakSelf.roomVC.roomId = roomId;
|
||||
weakSelf.roomVC.isReJoin = isRejoin;
|
||||
weakSelf.roomId = roomId;
|
||||
weakSelf.roomVC.roomModel = roomModel;
|
||||
weakSelf.roomVC.hidesBottomBarWhenPushed = YES;
|
||||
[navagationController pushViewController:weakSelf.roomVC animated:YES];
|
||||
weakSelf.roomId = roomId;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
// hideLoadingInView(KEYWINDOW)
|
||||
weakSelf.isClickJoinRoom = NO;
|
||||
}];
|
||||
}
|
||||
}else{
|
||||
if ([roomId isEqualToString:self.roomVC.roomId]) {
|
||||
[navagationController pushViewController:self.roomVC animated:YES];
|
||||
}else{
|
||||
self.roomVC = [[QXRoomViewController alloc] init];
|
||||
self.roomVC.roomId = roomId;
|
||||
self.roomVC.isReJoin = isRejoin;
|
||||
self.roomId = roomId;
|
||||
self.roomVC.hidesBottomBarWhenPushed = YES;
|
||||
|
||||
[navagationController pushViewController:self.roomVC animated:YES];
|
||||
// showLoadingInView(KEYWINDOW)
|
||||
if (weakSelf.isClickJoinRoom) {
|
||||
return;
|
||||
}
|
||||
weakSelf.isClickJoinRoom = YES;
|
||||
[QXMineNetwork joinRoomWithRoomId:roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
// hideLoadingInView(KEYWINDOW)
|
||||
// roomModel.room_info.pk_room_id = @"33";
|
||||
weakSelf.isClickJoinRoom = NO;
|
||||
weakSelf.roomVC = [[QXRoomViewController alloc] init];
|
||||
weakSelf.roomVC.roomId = roomId;
|
||||
weakSelf.roomVC.isReJoin = isRejoin;
|
||||
weakSelf.roomId = roomId;
|
||||
weakSelf.roomVC.roomModel = roomModel;
|
||||
weakSelf.roomVC.hidesBottomBarWhenPushed = YES;
|
||||
[navagationController pushViewController:weakSelf.roomVC animated:YES];
|
||||
weakSelf.roomId = roomId;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
weakSelf.isClickJoinRoom = NO;
|
||||
showToast(msg);
|
||||
// hideLoadingInView(KEYWINDOW)
|
||||
}];
|
||||
}
|
||||
}
|
||||
if (QXGlobal.shareGlobal.taskModel != nil) {
|
||||
@@ -255,18 +292,21 @@
|
||||
|
||||
|
||||
-(void)quitRoomWithRoomId:(NSString *)roomId{
|
||||
[UIApplication sharedApplication].idleTimerDisabled = NO;
|
||||
/// 移除特效
|
||||
[[QXGiftPlayerManager shareManager] destroyEffectSvga];
|
||||
/// 退出声网
|
||||
[[QXAgoraEngine sharedEngine] leaveChannel];
|
||||
|
||||
/// 销毁播放器
|
||||
[[QXAgoraEngine sharedEngine] ktv_DestoryKtvPlayer];
|
||||
|
||||
/// 销毁整个声网示例
|
||||
[[QXAgoraEngine sharedEngine] destroyEngine];
|
||||
/// 退出直播群
|
||||
[[QXRoomMessageManager shared] quitGroupWithRoomId:roomId];
|
||||
if (_roomVC) {
|
||||
/// 回收麦位视图内存
|
||||
[_roomVC.seatContentView destroyViews];
|
||||
/// 回收控制器内存
|
||||
[_roomVC destroyViews];
|
||||
}
|
||||
self.roomId = nil;
|
||||
@@ -287,6 +327,7 @@
|
||||
self.miniView.roomId = self.roomId;
|
||||
self.miniView.roomCoverImage = roomCover;
|
||||
[self.miniView show];
|
||||
[[QXGiftPlayerManager shareManager] stopPlay];
|
||||
}
|
||||
|
||||
-(QXMiniRoomView *)miniView{
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
[self.ktvAmcc destroyMusicPlayer:_ktvPlayer];
|
||||
_ktvPlayer = nil;
|
||||
[self.ktvAmcc registerEventDelegate:nil];
|
||||
[AgoraMusicContentCenter destroy];
|
||||
self.ktvAmcc = nil;
|
||||
self.isOpenMic = NO;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,10 @@
|
||||
}
|
||||
}
|
||||
- (void)sessionManager:(MQTTSessionManager *)sessionManager didReceiveMessage:(NSData *)data onTopic:(NSString *)topic retained:(BOOL)retained{
|
||||
|
||||
NSString *localPassword = [[NSUserDefaults standardUserDefaults] objectForKey:kChirldLocalPassword];
|
||||
if ([localPassword isExist]) {
|
||||
return;
|
||||
}
|
||||
NSError *error;
|
||||
NSString *dataStr = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
|
||||
dataStr = [dataStr stringByReplacingOccurrencesOfString:@"\\u" withString:@"u_u"];
|
||||
|
||||
@@ -173,6 +173,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)roomClearCharm;
|
||||
/// 收到礼物
|
||||
-(void)didRecieveGiftWithWithUserInfo:(QXUserHomeModel*)userInfo;
|
||||
/// 收到多条礼物
|
||||
-(void)didRecieveGiftWithWithUserInfos:(NSArray<QXUserHomeModel*>*)userInfos;
|
||||
/// 用户禁言禁麦状态发生变化
|
||||
-(void)userMuteStatusDidChanged:(QXUserHomeModel*)userInfo isMute:(NSString*)isMute isMutePit:(NSString*)isMutePit;
|
||||
/// 麦位状态发生变化
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
-(void)joinGroupWithRoomId:(NSString *)roomId{
|
||||
MJWeakSelf
|
||||
if (self.groupId) {
|
||||
[self quitGroupWithRoomId:roomId];
|
||||
[self quitGroupWithRoomId:self.groupId];
|
||||
}
|
||||
[[V2TIMManager sharedInstance] addGroupListener:self];
|
||||
[[V2TIMManager sharedInstance] addSimpleMsgListener:self];
|
||||
@@ -122,9 +122,17 @@
|
||||
/// 收到礼物
|
||||
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
||||
model.messageType = QXRoomChatMessageTypeGift;
|
||||
[[QXGiftPlayerManager shareManager] displayFullEffectView:model.GiftInfo.play_image];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didRecieveGiftWithWithUserInfo:)]) {
|
||||
[self.delegate didRecieveGiftWithWithUserInfo:model.ToUserInfo];
|
||||
NSArray *arr = [model.GiftInfo.play_image componentsSeparatedByString:@","];
|
||||
[[QXGiftPlayerManager shareManager] displayFullEffectViewWithMorePlayImages:arr];
|
||||
|
||||
if (model.ToUserInfos.count>0) {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didRecieveGiftWithWithUserInfos:)]) {
|
||||
[self.delegate didRecieveGiftWithWithUserInfos:model.ToUserInfos];
|
||||
}
|
||||
}else{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didRecieveGiftWithWithUserInfo:)]) {
|
||||
[self.delegate didRecieveGiftWithWithUserInfo:model.ToUserInfo];
|
||||
}
|
||||
}
|
||||
if (model.text.length == 0) {
|
||||
return;
|
||||
|
||||
@@ -154,9 +154,12 @@
|
||||
CGFloat height = [firsModel.content heightForFont:[UIFont systemFontOfSize:14] width:SCREEN_WIDTH-40-16*2-7];
|
||||
QXDynamicCommentHeaderView *header = [[QXDynamicCommentHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, height+12+40+7+3+9)];
|
||||
[header addTapBlock:^(id _Nonnull obj) {
|
||||
weakSelf.commentView.model = firsModel;
|
||||
weakSelf.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",firsModel.nickname];
|
||||
[weakSelf.commentView.textField becomeFirstResponder];
|
||||
// weakSelf.commentView.model = firsModel;
|
||||
// weakSelf.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",firsModel.nickname];
|
||||
// [weakSelf.commentView.textField becomeFirstResponder];
|
||||
UIPasteboard *p = [UIPasteboard generalPasteboard];
|
||||
p.string = [NSString stringWithFormat:@"%@", firsModel.content];
|
||||
showToast(@"已复制");
|
||||
}];
|
||||
header.delegate = self;
|
||||
header.model = firsModel;
|
||||
@@ -204,11 +207,11 @@
|
||||
if (indexPath.section == 0) {
|
||||
return;
|
||||
}
|
||||
QXDynamicCommentListModel *firsModel = self.dataArray[indexPath.section-1];
|
||||
QXDynamicCommentListModel *model = firsModel.replies[indexPath.row];
|
||||
self.commentView.model = model;
|
||||
self.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",model.nickname];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
// QXDynamicCommentListModel *firsModel = self.dataArray[indexPath.section-1];
|
||||
// QXDynamicCommentListModel *model = firsModel.replies[indexPath.row];
|
||||
// self.commentView.model = model;
|
||||
// self.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",model.nickname];
|
||||
// [self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
|
||||
-(void)didClickDeleteComment:(QXDynamicCommentListModel*)model{
|
||||
@@ -234,7 +237,9 @@
|
||||
}
|
||||
|
||||
-(void)didClickReplyComment:(QXDynamicCommentListModel*)model{
|
||||
|
||||
self.commentView.model = model;
|
||||
self.commentView.textField.placeholder = [NSString stringWithFormat:@"回复:%@",model.nickname];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
#pragma mark - 评论
|
||||
-(void)didClickSendWithText:(NSString*)text model:(nonnull QXDynamicCommentListModel *)model{
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
@property (nonatomic,strong)NSString *giftCount;
|
||||
|
||||
@property (nonatomic,strong)QXSendGiftCollectionView *bagGiftView;
|
||||
|
||||
@property (nonatomic,strong)NSString *giftBagPrice;
|
||||
@property (nonatomic,strong)NSString *coin;
|
||||
@end
|
||||
|
||||
@implementation QXSendGiftView
|
||||
@@ -353,7 +356,7 @@
|
||||
}
|
||||
NSString *userId = [self.pitUserListView.selectedArray componentsJoinedByString:@","];
|
||||
MJWeakSelf
|
||||
[QXMineNetwork roomBagGiftClearWithRoomId:self.roomId userId:userId heartId:self.heartId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[QXMineNetwork roomBagGiftClearWithRoomId:self.roomId userId:userId heartId:self.heartId auction_id:self.auctionId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[weakSelf hide];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
@@ -514,10 +517,12 @@
|
||||
[QXMineNetwork giftLabelSuccessBlock:^(NSArray<QXGiftLabelModel *> * _Nonnull list) {
|
||||
[weakSelf.titles removeAllObjects];
|
||||
[weakSelf.titles addObjectsFromArray:list];
|
||||
QXGiftLabelModel *md = [[QXGiftLabelModel alloc] init];
|
||||
md.name = @"背包";
|
||||
md.id = @"-10";
|
||||
[weakSelf.titles insertObject:md atIndex:0];
|
||||
if (self.type != QXSendGiftViewTypeFind) {
|
||||
QXGiftLabelModel *md = [[QXGiftLabelModel alloc] init];
|
||||
md.name = @"背包";
|
||||
md.id = @"-10";
|
||||
[weakSelf.titles insertObject:md atIndex:0];
|
||||
}
|
||||
NSMutableArray *arr = [NSMutableArray array];
|
||||
for (QXGiftLabelModel*md in weakSelf.titles) {
|
||||
[arr addObject:md.name];
|
||||
@@ -537,10 +542,17 @@
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getWalletInfoSuccessBlock:^(NSString * _Nonnull coin, NSString * _Nonnull earnings, NSString * _Nonnull title, NSString * _Nonnull url) {
|
||||
weakSelf.cornLabel.text = coin;
|
||||
weakSelf.coin = coin;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
self.rechargeBtn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
|
||||
|
||||
[QXMineNetwork roomGiftBagPricesuccessBlock:^(NSString * _Nonnull price) {
|
||||
weakSelf.giftBagPrice = price;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -553,8 +565,12 @@
|
||||
// }
|
||||
if (index == 0) {
|
||||
self.sendAllBtn.hidden = NO;
|
||||
self.cornLabel.text = self.giftBagPrice;
|
||||
self.rechargeBtn.hidden = YES;
|
||||
}else{
|
||||
self.cornLabel.text = self.coin;
|
||||
self.sendAllBtn.hidden = YES;
|
||||
self.rechargeBtn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
|
||||
}
|
||||
}
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
|
||||
@@ -1099,10 +1115,13 @@
|
||||
}
|
||||
-(void)setPitModel:(QXRoomPitModel *)pitModel{
|
||||
_pitModel = pitModel;
|
||||
[self.selectedBtn setTitle:pitModel.nickname forState:(UIControlStateNormal)];
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:pitModel.avatar] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
if (pitModel.pit_number.intValue == 9) {
|
||||
self.selectedBtn.hidden = NO;
|
||||
[self.selectedBtn setTitle:QXText(@"主持人") forState:(UIControlStateNormal)];
|
||||
}else if (pitModel.pit_number.intValue == 10) {
|
||||
self.selectedBtn.hidden = NO;
|
||||
[self.selectedBtn setTitle:QXText(@"嘉宾") forState:(UIControlStateNormal)];
|
||||
}else{
|
||||
if (pitModel.pit_number.intValue > 0) {
|
||||
@@ -1114,9 +1133,9 @@
|
||||
[self.selectedBtn setTitle:[NSString localizedStringWithFormat:QXText(@"%@号麦"),pitModel.pit_number] forState:(UIControlStateNormal)];
|
||||
}
|
||||
}else{
|
||||
self.selectedBtn.hidden = YES;
|
||||
self.selectedBtn.hidden = NO;
|
||||
[self.selectedBtn setTitle:pitModel.nickname forState:(UIControlStateNormal)];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (pitModel.isSelected) {
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
self.rightBtn = [[UIButton alloc] init];
|
||||
[self.rightBtn setImage:[UIImage imageNamed:@"login_agreement_sel"] forState:(UIControlStateSelected)];
|
||||
[self.rightBtn setImage:[UIImage imageNamed:@"login_agreement_nor"] forState:(UIControlStateNormal)];
|
||||
self.rightBtn.userInteractionEnabled = NO;
|
||||
[self.contentView addSubview:self.rightBtn];
|
||||
[self.rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-16);
|
||||
|
||||
@@ -81,6 +81,14 @@
|
||||
cell.model = self.dataArray[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXHomeRoomCell *rCell = (QXHomeRoomCell *)cell;
|
||||
[rCell startAnimating];
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXHomeRoomCell *rCell = (QXHomeRoomCell *)cell;
|
||||
[rCell endAnimating];
|
||||
}
|
||||
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return CGSizeMake((SCREEN_WIDTH-15*3-1)/2.0, (SCREEN_WIDTH-15*3-1)/2.0);
|
||||
|
||||
@@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXHomeViewController : QXBaseViewController
|
||||
-(void)giftScrollViewShowWithModel:(QXGiftScrollModel*)model;
|
||||
-(void)giftScrollViewShowWithModelList:(NSArray<QXGiftScrollModel*>*)list;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -252,6 +252,17 @@
|
||||
self.giftScrollView.model = model;
|
||||
self.isShowGiftScrollView = YES;
|
||||
}
|
||||
-(void)giftScrollViewShowWithModelList:(NSArray<QXGiftScrollModel*>*)list{
|
||||
if (self.isShowGiftScrollView == NO) {
|
||||
self.bannerScrollView.top = self.giftScrollView.bottom+12;
|
||||
self.headerView.height += 12+self.giftScrollView.height;
|
||||
[self.headerView addSubview:self.giftScrollView];
|
||||
[self.pagingView resizeTableHeaderViewHeightWithAnimatable:YES duration:0.1 curve:UIViewAnimationCurveLinear];
|
||||
}
|
||||
++self.page;
|
||||
self.giftScrollView.list = list;
|
||||
self.isShowGiftScrollView = YES;
|
||||
}
|
||||
-(void)didClickGiftScrollView:(QXGiftScrollView *)giftScrollView index:(NSInteger)index model:(QXGiftScrollModel *)model{
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:model.roomId isRejoin:NO navagationController:self.navigationController];
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 是否为最小化房间进来
|
||||
@property (nonatomic,assign)BOOL isReJoin;
|
||||
|
||||
|
||||
@property (nonatomic,strong)QXRoomModel* roomModel;
|
||||
/// 麦位视图
|
||||
@property (nonatomic,strong)QXRoomSeatView *seatContentView;
|
||||
/// 聊天列表
|
||||
|
||||
@@ -51,7 +51,6 @@ QXRoomUserInfoViewDelegate
|
||||
/// 排麦按钮
|
||||
@property (nonatomic,strong)QXUpSeatCountView *micTeamView;
|
||||
|
||||
@property (nonatomic,strong)QXRoomModel* roomModel;
|
||||
/// 礼物特效
|
||||
@property (nonatomic,strong)UIView *bgEffectView;
|
||||
/// 设置
|
||||
@@ -84,7 +83,6 @@ QXRoomUserInfoViewDelegate
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
[UIApplication sharedApplication].idleTimerDisabled = YES;
|
||||
}
|
||||
-(void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
@@ -107,8 +105,7 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
-(void)viewDidDisappear:(BOOL)animated{
|
||||
[super viewDidDisappear:animated];
|
||||
[UIApplication sharedApplication].idleTimerDisabled = NO;
|
||||
[[QXGiftPlayerManager shareManager] stopPlay];
|
||||
// [[QXGiftPlayerManager shareManager] stopPlay];
|
||||
self.continuousView.hidden = YES;
|
||||
}
|
||||
|
||||
@@ -218,27 +215,14 @@ QXRoomUserInfoViewDelegate
|
||||
BOOL isClose = [[NSUserDefaults standardUserDefaults] boolForKey:kEffectsCLose];
|
||||
[[QXGiftPlayerManager shareManager] openOrCloseEffectViewWith:!isClose];
|
||||
}
|
||||
#pragma mark - 获取房间信息
|
||||
-(void)joinRoom{
|
||||
-(void)setRoomModel:(QXRoomModel *)roomModel{
|
||||
_roomModel = roomModel;
|
||||
}
|
||||
-(void)setRoomId:(NSString *)roomId{
|
||||
_roomId = roomId;
|
||||
[self.chatListView insertNoitce];
|
||||
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
|
||||
MJWeakSelf
|
||||
[QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
// roomModel.room_info.pk_room_id = @"33";
|
||||
weakSelf.roomModel = roomModel;
|
||||
[weakSelf resetSubviews];
|
||||
[weakSelf configRoomDataIsJoin:YES];
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
});
|
||||
|
||||
}];
|
||||
|
||||
|
||||
[QXMineNetwork roomOnlineListWithRoomId:self.roomId page:1 successBlock:^(NSArray<QXRoomUserInfoModel *> * _Nonnull onPitList, NSArray<QXRoomUserInfoModel *> * _Nonnull offPitList) {
|
||||
NSMutableArray *arr = [NSMutableArray arrayWithArray:onPitList];
|
||||
[arr addObjectsFromArray:offPitList];
|
||||
@@ -246,6 +230,27 @@ QXRoomUserInfoViewDelegate
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
#pragma mark - 获取房间信息
|
||||
-(void)joinRoom{
|
||||
|
||||
[self resetSubviews];
|
||||
[self configRoomDataIsJoin:YES];
|
||||
// [QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
//// roomModel.room_info.pk_room_id = @"33";
|
||||
//
|
||||
//
|
||||
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
// showToast(msg);
|
||||
// [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
|
||||
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
// [weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
// });
|
||||
//
|
||||
// }];
|
||||
|
||||
|
||||
|
||||
}
|
||||
-(void)getUserOnlineStatusWithUserIds:(NSString*)userIds{
|
||||
[QXMineNetwork roomUserOnlineStatusWithUserIds:userIds roomId:self.roomId successBlock:^(NSArray<QXUserModel *> * _Nonnull list) {
|
||||
@@ -283,7 +288,7 @@ QXRoomUserInfoViewDelegate
|
||||
}else{
|
||||
self.roomBgImageView.image = [UIImage imageNamed:@"cp_room_bg"];
|
||||
}
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) {
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) {
|
||||
// 点唱房
|
||||
if (self.roomModel.room_info.label_id.intValue == 1) {
|
||||
|
||||
@@ -414,7 +419,7 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
}
|
||||
self.seatContentView.roomModel = self.roomModel;
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 2){
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2){
|
||||
/// k歌房没有背景音乐
|
||||
[QXAgoraEngine sharedEngine].isPlayBgMusic = NO;
|
||||
}else{
|
||||
@@ -439,7 +444,7 @@ QXRoomUserInfoViewDelegate
|
||||
if (isJoin) {
|
||||
MJWeakSelf
|
||||
[[QXAgoraEngine sharedEngine] joinChannel:self.roomId withRoom:self agora_token:self.roomModel.user_info.agora_token agora_rtm_token:self.roomModel.user_info.agora_rtm_token isUpSeat:self.seatContentView.myPitNumber>0 successBock:^{
|
||||
if (weakSelf.roomModel.song_user_info && (weakSelf.roomModel.room_info.type_id.intValue == 1 || weakSelf.roomModel.room_info.type_id.intValue == 3 || weakSelf.roomModel.room_info.type_id.intValue == 4) && weakSelf.roomModel.room_info.label_id.intValue == 2) {
|
||||
if (weakSelf.roomModel.song_user_info && (weakSelf.roomModel.room_info.type_id.intValue == 1 || weakSelf.roomModel.room_info.type_id.intValue == 3 || weakSelf.roomModel.room_info.type_id.intValue == 4 || weakSelf.roomModel.room_info.type_id.intValue == 8) && weakSelf.roomModel.room_info.label_id.intValue == 2) {
|
||||
if ([weakSelf.roomModel.song_user_info.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
// [[QXAgoraEngine sharedEngine] ktv_EndSing];
|
||||
// [[QXAgoraEngine sharedEngine] ktv_StartSing:YES withSong:weakSelf.roomModel.song_user_info];
|
||||
@@ -477,7 +482,7 @@ QXRoomUserInfoViewDelegate
|
||||
}];
|
||||
|
||||
}else{
|
||||
if (self.roomModel.song_user_info && (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
if (self.roomModel.song_user_info && (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
if ([self.roomModel.song_user_info.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
self.seatContentView.songInfo = self.roomModel.song_user_info;
|
||||
self.seatContentView.nextInfo = self.roomModel.nextInfo;
|
||||
@@ -491,7 +496,7 @@ QXRoomUserInfoViewDelegate
|
||||
[QXAgoraEngine sharedEngine].delegate = self;
|
||||
|
||||
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) {
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) {
|
||||
// 点唱房
|
||||
if (self.roomModel.room_info.label_id.intValue == 1) {
|
||||
if (self.roomModel.pk_info.pk_id.intValue>0) {
|
||||
@@ -534,11 +539,11 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
self.bottomView.roomModel = self.roomModel;
|
||||
BOOL hasPK = NO;
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
hasPK = YES;
|
||||
}
|
||||
BOOL hasSong = NO;
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4){
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8){
|
||||
hasSong = YES;
|
||||
}
|
||||
/// 暂时不要pk
|
||||
@@ -634,7 +639,7 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
// 演唱者歌曲播放回调
|
||||
-(void)rtcEngineSongProgress:(NSUInteger)progress{
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
self.seatContentView.progress = progress;
|
||||
}else{
|
||||
self.musicView.progress = progress;
|
||||
@@ -782,6 +787,9 @@ QXRoomUserInfoViewDelegate
|
||||
-(void)didRecieveGiftWithWithUserInfo:(QXUserHomeModel *)userInfo{
|
||||
[self.seatContentView setSeatCharmWithUser:userInfo];
|
||||
}
|
||||
-(void)didRecieveGiftWithWithUserInfos:(NSArray<QXUserHomeModel *> *)userInfos{
|
||||
[self.seatContentView setSeatCharmWithUsers:userInfos];
|
||||
}
|
||||
/// 拍卖者上麦
|
||||
-(void)auctionUpSeatWithUserInfo:(QXUserHomeModel *)userInfo isUpSeat:(BOOL)isUpSeat{
|
||||
[self.seatContentView didAuctiontUpDownSeatWithUser:userInfo isUpSeat:isUpSeat];
|
||||
@@ -1065,6 +1073,7 @@ QXRoomUserInfoViewDelegate
|
||||
-(void)recieveHeadline:(QXHeadLineModel *)headline{
|
||||
if (_headlineView) {
|
||||
self.headlineView.model = headline;
|
||||
[self.view addSubview:self.headlineView];
|
||||
}else{
|
||||
self.headlineView.model = headline;
|
||||
[self.view addSubview:self.headlineView];
|
||||
@@ -1083,7 +1092,7 @@ QXRoomUserInfoViewDelegate
|
||||
case QXRoomBottomViewEventTypeMuteAudio:{
|
||||
if (!isSelected) {
|
||||
/// 静音时麦圈停止
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
// QXRoomSeatContentView *seatContentView = self.seatContentView.normalSeatView.mySeatView;
|
||||
// if (seatContentView.isSeatSpeaking) {
|
||||
// [seatContentView stopAudioAnimation];
|
||||
@@ -1164,7 +1173,7 @@ QXRoomUserInfoViewDelegate
|
||||
|
||||
break;
|
||||
case QXRoomBottomViewEventTypeMusic:{
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 1){
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 1){
|
||||
MJWeakSelf
|
||||
QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
|
||||
al.type = QXAlertViewTypeApplySong;
|
||||
@@ -1198,14 +1207,17 @@ QXRoomUserInfoViewDelegate
|
||||
if (self.roomModel.room_info.pit_list.count == 10) {
|
||||
QXRoomPitModel *md = self.roomModel.room_info.pit_list[8];
|
||||
if (md.user_id.longValue > 0 && ![QXGlobal.shareGlobal.loginModel.user_id isEqualToString:md.user_id]) {
|
||||
md.isSelected = NO;
|
||||
[pitArr addObject:md];
|
||||
QXRoomPitModel *lastMd = self.roomModel.room_info.pit_list[9];
|
||||
if (lastMd.user_id.longValue > 0 && ![QXGlobal.shareGlobal.loginModel.user_id isEqualToString:lastMd.user_id]) {
|
||||
lastMd.isSelected = NO;
|
||||
[pitArr addObject:lastMd];
|
||||
}
|
||||
}else{
|
||||
QXRoomPitModel *lastMd = self.roomModel.room_info.pit_list[9];
|
||||
if (lastMd.user_id.longValue > 0 && ![QXGlobal.shareGlobal.loginModel.user_id isEqualToString:lastMd.user_id]) {
|
||||
lastMd.isSelected = NO;
|
||||
[pitArr addObject:lastMd];
|
||||
}
|
||||
}
|
||||
@@ -1261,6 +1273,7 @@ QXRoomUserInfoViewDelegate
|
||||
md.user_id = self.roomModel.song_user_info.user_id;
|
||||
md.avatar = self.roomModel.song_user_info.avatar;
|
||||
md.pit_number = @"9999";
|
||||
md.isSelected = NO;
|
||||
[pitArr addObject:md];
|
||||
}
|
||||
}
|
||||
@@ -1270,6 +1283,7 @@ QXRoomUserInfoViewDelegate
|
||||
continue;
|
||||
}
|
||||
if (md.user_id.longValue > 0 && ![QXGlobal.shareGlobal.loginModel.user_id isEqualToString:md.user_id]) {
|
||||
md.isSelected = NO;
|
||||
[pitArr addObject:md];
|
||||
}
|
||||
}
|
||||
@@ -1282,6 +1296,7 @@ QXRoomUserInfoViewDelegate
|
||||
md.user_id = self.roomModel.room_auction.auction_user.user_id;
|
||||
md.avatar = self.roomModel.room_auction.auction_user.avatar;
|
||||
md.pit_number = @"9999";
|
||||
md.isSelected = NO;
|
||||
[pitArr addObject:md];
|
||||
}
|
||||
if (self.roomModel.room_auction.auction_list.count > 0) {
|
||||
@@ -1290,6 +1305,7 @@ QXRoomUserInfoViewDelegate
|
||||
continue;
|
||||
}
|
||||
if (md.user_id.longValue > 0 && ![QXGlobal.shareGlobal.loginModel.user_id isEqualToString:md.user_id]) {
|
||||
md.isSelected = NO;
|
||||
[pitArr addObject:md];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
[self addSubview:self.closeBtn];
|
||||
}
|
||||
-(void)show{
|
||||
[KEYWINDOW.rootViewController.view addSubview:self];
|
||||
[UIApplication.sharedApplication.keyWindow.rootViewController.view addSubview:self];
|
||||
}
|
||||
|
||||
-(void)setRoomCoverImage:(NSString *)roomCoverImage{
|
||||
|
||||
@@ -74,6 +74,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
@property (nonatomic,strong)QXUserHomeModel* FromUserInfo;
|
||||
@property (nonatomic,strong)QXUserHomeModel* ToUserInfo;
|
||||
|
||||
@property (nonatomic,strong)NSArray<QXUserHomeModel* >* ToUserInfos;
|
||||
|
||||
/// 当前音乐
|
||||
@property (nonatomic,strong)QXSongListModel* songInfo;
|
||||
/// 下一首音乐
|
||||
|
||||
@@ -346,7 +346,18 @@ NSInteger maxMessageCount = 20;
|
||||
|
||||
-(void)setMessage:(QXRoomChatListModel *)message{
|
||||
_message = message;
|
||||
self.titleLabel.text = message.text;
|
||||
// self.titleLabel.text = message.text;
|
||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:message.text];
|
||||
if ([message.FromUserInfo.nickname isExist]) {
|
||||
[attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.FromUserInfo.nickname]];
|
||||
}
|
||||
if ([message.ToUserInfo.nickname isExist]) {
|
||||
[attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.ToUserInfo.nickname]];
|
||||
}
|
||||
if ([message.GiftInfo.gift_name isExist]) {
|
||||
[attr yy_setColor:RGB16(0x00C8FF) range:[message.text rangeOfString:message.GiftInfo.gift_name]];
|
||||
}
|
||||
self.titleLabel.attributedText = attr;
|
||||
self.nameLabel.text = message.FromUserInfo.nickname;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:message.FromUserInfo.avatar]];
|
||||
self.iconBgView.hidden = YES;
|
||||
@@ -416,7 +427,7 @@ NSInteger maxMessageCount = 20;
|
||||
// UIImage *image = [UIImage imageWithContentsOfFile:path];
|
||||
// image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(20, 40, 20 , 40) resizingMode:(UIImageResizingModeStretch)];
|
||||
// self.bubbleImageView.image = image;
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0x000000, 0.4);
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0xFFFFFF, 0.2);
|
||||
|
||||
|
||||
|
||||
@@ -466,7 +477,7 @@ NSInteger maxMessageCount = 20;
|
||||
if (!self.message.havBubble) {
|
||||
[self.bubbleImageView sd_cancelLatestImageLoad];
|
||||
self.bubbleImageView.image = nil;
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0x000000, 0.4);
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0xFFFFFF, 0.2);
|
||||
[self.bubbleImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.titleLabel).offset(-8);
|
||||
make.top.equalTo(self.titleLabel).offset(-6);
|
||||
@@ -525,7 +536,7 @@ NSInteger maxMessageCount = 20;
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)headerAction{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(previewUserInfoWithUserId:)]) {
|
||||
@@ -535,7 +546,18 @@ NSInteger maxMessageCount = 20;
|
||||
|
||||
-(void)setMessage:(QXRoomChatListModel *)message{
|
||||
_message = message;
|
||||
self.titleLabel.text = message.text;
|
||||
// self.titleLabel.text = message.text;
|
||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:message.text];
|
||||
if ([message.FromUserInfo.nickname isExist]) {
|
||||
[attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.FromUserInfo.nickname]];
|
||||
}
|
||||
if ([message.ToUserInfo.nickname isExist]) {
|
||||
[attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.ToUserInfo.nickname]];
|
||||
}
|
||||
if ([message.GiftInfo.gift_name isExist]) {
|
||||
[attr yy_setColor:RGB16(0x00C8FF) range:[message.text rangeOfString:message.GiftInfo.gift_name]];
|
||||
}
|
||||
self.titleLabel.attributedText = attr;
|
||||
self.nameLabel.text = message.FromUserInfo.nickname;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:message.FromUserInfo.avatar]];
|
||||
self.iconBgView.hidden = YES;
|
||||
@@ -604,7 +626,7 @@ NSInteger maxMessageCount = 20;
|
||||
// UIImage *image = [UIImage imageWithContentsOfFile:path];
|
||||
// image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(20, 40, 20 , 40) resizingMode:(UIImageResizingModeStretch)];
|
||||
// self.bubbleImageView.image = image;
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0x000000, 0.4);
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0xFFFFFF, 0.2);
|
||||
|
||||
|
||||
|
||||
@@ -654,7 +676,7 @@ NSInteger maxMessageCount = 20;
|
||||
if (!self.message.havBubble) {
|
||||
[self.bubbleImageView sd_cancelLatestImageLoad];
|
||||
self.bubbleImageView.image = nil;
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0x000000, 0.4);
|
||||
self.bubbleImageView.backgroundColor = RGB16A(0xFFFFFF, 0.2);
|
||||
[self.bubbleImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.titleLabel).offset(-8);
|
||||
make.top.equalTo(self.titleLabel).offset(-6);
|
||||
@@ -718,12 +740,32 @@ NSInteger maxMessageCount = 20;
|
||||
|
||||
-(void)setMessage:(QXRoomChatListModel *)message{
|
||||
_message = message;
|
||||
self.titleLabel.text = message.text;
|
||||
// NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:message.text];
|
||||
// if ([message.FromUserInfo.nickname isExist]) {
|
||||
// [attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.FromUserInfo.nickname]];
|
||||
// }
|
||||
// if ([message.ToUserInfo.nickname isExist]) {
|
||||
// [attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.ToUserInfo.nickname]];
|
||||
// }
|
||||
//// self.titleLabel.text = message.text;
|
||||
// self.titleLabel.attributedText = attr;
|
||||
|
||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:message.text];
|
||||
if ([message.FromUserInfo.nickname isExist]) {
|
||||
[attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.FromUserInfo.nickname]];
|
||||
}
|
||||
if ([message.ToUserInfo.nickname isExist]) {
|
||||
[attr yy_setColor:RGB16(0xFFE309) range:[message.text rangeOfString:message.ToUserInfo.nickname]];
|
||||
}
|
||||
if ([message.GiftInfo.gift_name isExist]) {
|
||||
[attr yy_setColor:RGB16(0x00C8FF) range:[message.text rangeOfString:message.GiftInfo.gift_name]];
|
||||
}
|
||||
self.titleLabel.attributedText = attr;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
self.bgView = [[UIView alloc] init];
|
||||
self.bgView.backgroundColor = RGB16A(0x000000, 0.4);
|
||||
self.bgView.backgroundColor = RGB16A(0xFFFFFF, 0.2);
|
||||
[self.bgView addRoundedCornersWithRadius:6];
|
||||
[self.contentView addSubview:self.bgView];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -734,8 +776,8 @@ NSInteger maxMessageCount = 20;
|
||||
}];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.textColor = RGB16(0XD1A9FE);
|
||||
// self.titleLabel.textColor = QXConfig.themeColor;
|
||||
// self.titleLabel.textColor = RGB16(0XD1A9FE);
|
||||
self.titleLabel.textColor = UIColor.whiteColor;
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.titleLabel.numberOfLines = 0;
|
||||
[self.bgView addSubview:self.titleLabel];
|
||||
@@ -756,6 +798,8 @@ NSInteger maxMessageCount = 20;
|
||||
@"FromUserInfo":@"QXUserHomeModel",
|
||||
@"nextInfo":@"QXSongListModel",
|
||||
@"songInfo":@"QXSongListModel",
|
||||
@"ToUserInfo":@"QXUserHomeModel",
|
||||
@"ToUserInfos":@"QXUserHomeModel",
|
||||
@"friend_user":@"QXRoomFriendRelationModel"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -33,10 +33,11 @@
|
||||
self.endBtn.hidden = YES;
|
||||
}else{
|
||||
if (self.isCompere) {
|
||||
self.endBtn.hidden = YES;
|
||||
self.endBtn.hidden = NO;
|
||||
[self.endBtn setTitle:isSearch?QXText(@"点歌"):QXText(@"置顶") forState:(UIControlStateNormal)];
|
||||
}else{
|
||||
self.endBtn.hidden = YES;
|
||||
self.upBtn.hidden = YES;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
self.nameLabel.text = model.nickname;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
self.scaleLabel.text = [NSString stringWithFormat:@"%.2f%%",model.ratio.doubleValue];
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.4f%%",model.earnings.doubleValue];
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.4f",model.earnings.doubleValue];
|
||||
}
|
||||
- (IBAction)setScaleAction:(id)sender {
|
||||
QXDirectSetScaleView *scaleView = [[QXDirectSetScaleView alloc] init];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "QXHeadlineView.h"
|
||||
#import "QXUserHomePageViewController.h"
|
||||
#import "QXTimer.h"
|
||||
|
||||
@interface QXHeadlineView()
|
||||
|
||||
@@ -23,6 +24,9 @@
|
||||
@property (nonatomic,strong)UIButton *trampleBtn;
|
||||
@property (nonatomic,strong)UIButton *closeBtn;
|
||||
@property (nonatomic,assign)BOOL isSmall;
|
||||
@property (nonatomic,assign)long startTime;
|
||||
|
||||
@property (nonatomic,strong)QXTimer *timer;
|
||||
@end
|
||||
|
||||
@implementation QXHeadlineView
|
||||
@@ -166,6 +170,7 @@
|
||||
self.nameLabel.text = model.nickname;
|
||||
[self.headImageView sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
self.contentLabel.text = model.content;
|
||||
[self startTimer];
|
||||
if (self.isSmall) {
|
||||
[UIView animateWithDuration:0.15 animations:^{
|
||||
// self.headLineBgView.width = self.width-self.iconImageView.right-6;
|
||||
@@ -178,8 +183,34 @@
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void)startTimer{
|
||||
MJWeakSelf
|
||||
NSTimeInterval timeInterval = [[NSDate date] timeIntervalSince1970];
|
||||
// 将秒转换为毫秒
|
||||
long long milliseconds = (long long)(timeInterval);
|
||||
self.startTime = self.model.end_time.longLongValue - milliseconds;
|
||||
if (self.startTime <= 0) {
|
||||
//时间错误不进行倒计时
|
||||
[self removeFromSuperview];
|
||||
return;
|
||||
}
|
||||
[self stopTimer];
|
||||
_timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
weakSelf.startTime--;
|
||||
if (weakSelf.startTime<=0) {
|
||||
[weakSelf stopTimer];
|
||||
[weakSelf removeFromSuperview];
|
||||
}
|
||||
});
|
||||
}];
|
||||
}
|
||||
-(void)stopTimer{
|
||||
if (_timer) {
|
||||
[self->_timer invalidate];
|
||||
self->_timer= nil;
|
||||
}
|
||||
}
|
||||
-(void)handlePan:(UIPanGestureRecognizer*)recognizer{
|
||||
if (recognizer.state == UIGestureRecognizerStateEnded) {
|
||||
NSLog(@"拖动结束");
|
||||
|
||||
@@ -20,6 +20,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
QXRoomSettingTypeRoomTypeGirl = 13,
|
||||
/// 交友房
|
||||
QXRoomSettingTypeRoomTypeFriend = 14,
|
||||
/// 互娱
|
||||
QXRoomSettingTypeRoomTypeFunny = 100,
|
||||
|
||||
/// 常用工具
|
||||
/// 房间补贴
|
||||
|
||||
@@ -34,8 +34,11 @@
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomTypeBoy;
|
||||
/// 女神房
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomTypeGirl;
|
||||
/// 交友房
|
||||
/// 交友房 以前的交友换成互娱
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomTypeFriend;
|
||||
/// 互娱 曾经的男神女神合并为交友
|
||||
@property (nonatomic,strong)QXRoomSettingModel *roomTypeFunny;
|
||||
|
||||
|
||||
/// 常用工具
|
||||
/// 房间补贴
|
||||
@@ -178,14 +181,16 @@
|
||||
// }else{
|
||||
// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
// }
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.roomReport];
|
||||
}else{
|
||||
toolsArr = @[self.roomSubsidy,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.roomReport];
|
||||
}
|
||||
@@ -208,13 +213,14 @@
|
||||
// }else{
|
||||
// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
// }
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
}else{
|
||||
toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
|
||||
}
|
||||
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.roomReport];
|
||||
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
|
||||
@@ -227,12 +233,13 @@
|
||||
// }else{
|
||||
// toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
// }
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 2) {
|
||||
toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgImage];
|
||||
}else{
|
||||
toolsArr = @[self.roomSubsidy,self.roomCompere,self.roomMessage,self.roomOrderMic,self.roomBgMusic,self.roomBgImage];
|
||||
}
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
// roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeBoy,self.roomTypeGirl,self.roomTypeFriend];
|
||||
roomTypeArr = @[self.roomTypeSing,self.roomTypeAuction,self.roomTypeFunny,self.roomTypeFriend];
|
||||
// moreArr = @[self.roomLeave,self.roomShare,self.roomVoiceSet,self.roomSetting,self.roomWelcome,self.roomEffects,self.roomReport];
|
||||
moreArr = @[self.roomLeave,self.roomVoiceSet,self.roomSetting,self.roomEffects,self.roomReport];
|
||||
self.titles = @[QXText(@"房间类型"),QXText(@"常用工具"),QXText(@"更多操作")];
|
||||
@@ -315,7 +322,7 @@
|
||||
// [self.welcomeView showInView:self.viewController.view];
|
||||
return;
|
||||
}
|
||||
if (model.type == QXRoomSettingTypeRoomTypeAuction || model.type == QXRoomSettingTypeRoomTypeSing || model.type == QXRoomSettingTypeRoomTypeBoy || model.type == QXRoomSettingTypeRoomTypeGirl || model.type == QXRoomSettingTypeRoomTypeFriend) {
|
||||
if (model.type == QXRoomSettingTypeRoomTypeAuction || model.type == QXRoomSettingTypeRoomTypeSing || model.type == QXRoomSettingTypeRoomTypeBoy || model.type == QXRoomSettingTypeRoomTypeGirl || model.type == QXRoomSettingTypeRoomTypeFriend || model.type == QXRoomSettingTypeRoomTypeFunny) {
|
||||
self.alertView.message = [NSString stringWithFormat:@"您确定要修改为%@房吗?",model.name];
|
||||
[[QXGlobal shareGlobal] showView:self.alertView controller:self.viewController popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
@@ -343,6 +350,8 @@
|
||||
type = @"4";
|
||||
}else if (roomType == QXRoomSettingTypeRoomTypeFriend) {
|
||||
type = @"7";
|
||||
}else if (roomType == QXRoomSettingTypeRoomTypeFunny) {
|
||||
type = @"8";
|
||||
}
|
||||
[QXMineNetwork changeRoomTypeWithRoomId:self.roomModel.room_info.room_id type:type successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
@@ -407,13 +416,21 @@
|
||||
-(QXRoomSettingModel *)roomTypeFriend{
|
||||
if (!_roomTypeFriend) {
|
||||
_roomTypeFriend = [[QXRoomSettingModel alloc] init];
|
||||
_roomTypeFriend.name = QXText(@"交友");
|
||||
_roomTypeFriend.name = QXText(@"互娱");
|
||||
_roomTypeFriend.type = QXRoomSettingTypeRoomTypeFriend;
|
||||
_roomTypeFriend.icon = @"room_set_room_type_friend";
|
||||
}
|
||||
return _roomTypeFriend;
|
||||
}
|
||||
|
||||
-(QXRoomSettingModel *)roomTypeFunny{
|
||||
if (!_roomReport) {
|
||||
_roomReport = [[QXRoomSettingModel alloc] init];
|
||||
_roomReport.name = QXText(@"交友");
|
||||
_roomReport.type = QXRoomSettingTypeRoomTypeFunny;
|
||||
_roomReport.icon = @"room_set_room_type_funny";
|
||||
}
|
||||
return _roomReport;
|
||||
}
|
||||
-(QXRoomSettingModel *)roomSubsidy{
|
||||
if (!_roomSubsidy) {
|
||||
_roomSubsidy = [[QXRoomSettingModel alloc] init];
|
||||
|
||||
@@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)roomClearUserCharmWithUserId:(NSString *)userId;
|
||||
/// 设置魅力
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model;
|
||||
/// 设置多人魅力
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
|
||||
/// 设置麦位锁麦状态
|
||||
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber;
|
||||
/// 房间内换麦
|
||||
|
||||
@@ -306,6 +306,9 @@
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model{
|
||||
[self.leftSeatView setSeatCharmWithUser:model];
|
||||
}
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel *> *)users{
|
||||
[self.leftSeatView setSeatCharmWithUsers:users];
|
||||
}
|
||||
|
||||
-(void)startAction{
|
||||
self.timeSetView.pkId = self.roomModel.pk_info.pk_id;
|
||||
|
||||
@@ -31,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)auctionTypeDidChanged:(NSString *)type;
|
||||
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model;
|
||||
/// 设置多人魅力
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
|
||||
/// 清除魅力
|
||||
-(void)clearCharm;
|
||||
/// 清除个人魅力
|
||||
|
||||
@@ -867,6 +867,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel *> *)users{
|
||||
for (QXUserHomeModel*model in users) {
|
||||
[self setSeatCharmWithUser:model];
|
||||
}
|
||||
}
|
||||
-(void)clearCharm{
|
||||
for (int i = 0; i < self.roomModel.room_auction.auction_list.count; i++) {
|
||||
if (i < 6) {
|
||||
|
||||
@@ -341,11 +341,9 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
[UIApplication sharedApplication].idleTimerDisabled = YES;
|
||||
na.viewControllers = viewControllers;
|
||||
[na popViewControllerAnimated:YES];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[UIApplication sharedApplication].idleTimerDisabled = YES;
|
||||
});
|
||||
QXGlobal.shareGlobal.superRoomId = @"";
|
||||
}else{
|
||||
[[QXGlobal shareGlobal]quitRoomWithRoomId:self.roomModel.room_info.room_id];
|
||||
|
||||
@@ -49,6 +49,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
-(void)roomClearUserCharmWithUserId:(NSString *)userId;
|
||||
/// 设置魅力
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel*)model;
|
||||
/// 设置多人魅力
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
|
||||
/// 用户信息发生改变
|
||||
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user;
|
||||
/// 房间内换麦
|
||||
|
||||
@@ -1116,6 +1116,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel *> *)users{
|
||||
for (QXUserHomeModel*model in users) {
|
||||
[self setSeatCharmWithUser:model];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user{
|
||||
for (id object in self.allSeatViewArray) {
|
||||
|
||||
@@ -32,6 +32,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)roomClearUserCharmWithUserId:(NSString *)userId;
|
||||
/// 设置魅力
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model;
|
||||
/// 设置多人魅力
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
|
||||
/// 设置麦位锁麦状态
|
||||
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber;
|
||||
|
||||
|
||||
@@ -355,6 +355,12 @@ static NSInteger maxSeat = 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel *> *)users{
|
||||
for (QXUserHomeModel*model in users) {
|
||||
[self setSeatCharmWithUser:model];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber{
|
||||
if (fromPitNumber == 0 || toPitNumber == 0) {
|
||||
return;
|
||||
|
||||
@@ -31,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)roomClearUserCharmWithUserId:(NSString *)userId;
|
||||
/// 设置魅力
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model;
|
||||
/// 设置多人魅力
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
|
||||
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
/// 榜单发生变化
|
||||
|
||||
@@ -560,6 +560,13 @@ QXRoomSeatDelegate
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel *> *)users{
|
||||
for (QXUserHomeModel*model in users) {
|
||||
[self setSeatCharmWithUser:model];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user{
|
||||
QXRoomPitModel *singerModel = self.singerSeatView.pitModel;
|
||||
if ([singerModel.user_id isEqualToString:user.user_id]) {
|
||||
|
||||
@@ -53,6 +53,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
-(void)roomClearUserCharmWithUserId:(NSString *)userId;
|
||||
/// 设置魅力
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel*)model;
|
||||
/// 设置魅力(多个用户)
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
|
||||
/// 设置麦位锁麦状态
|
||||
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber;
|
||||
|
||||
|
||||
@@ -842,6 +842,9 @@
|
||||
}
|
||||
/// 拍卖类型发生变化
|
||||
-(void)auctionTypeDidChanged:(NSString *)type{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (_auctionView) {
|
||||
[self.auctionView auctionTypeDidChanged:type];
|
||||
return;
|
||||
@@ -853,6 +856,9 @@
|
||||
}
|
||||
}
|
||||
-(void)clearCharm{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView clearCharm];
|
||||
@@ -877,6 +883,9 @@
|
||||
}
|
||||
/// 清除个人魅力
|
||||
-(void)roomClearUserCharmWithUserId:(NSString *)userId{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView roomClearUserCharmWithUserId:userId];
|
||||
@@ -901,6 +910,9 @@
|
||||
}
|
||||
/// 房间内换麦
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber];
|
||||
@@ -923,6 +935,9 @@
|
||||
}
|
||||
}
|
||||
-(void)setSeatCharmWithUser:(QXUserHomeModel *)model{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView setSeatCharmWithUser:model];
|
||||
@@ -947,7 +962,38 @@
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel *> *)users{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView setSeatCharmWithUsers:users];
|
||||
break;
|
||||
case QXRoomSeatViewTypeSing:
|
||||
[self.songView setSeatCharmWithUsers:users];
|
||||
break;
|
||||
case QXRoomSeatViewTypeAuction:
|
||||
[self.auctionView setSeatCharmWithUsers:users];
|
||||
break;
|
||||
case QXRoomSeatViewTypeCabin:
|
||||
// self.cabinView.roomModel = roomModel;
|
||||
break;
|
||||
case QXRoomSeatViewTypePK:
|
||||
[self.roomPkView setSeatCharmWithUsers:users];
|
||||
break;
|
||||
case QXRoomSeatViewTypeFriend:
|
||||
[self.roomFriendView setSeatCharmWithUsers:users];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setSeatIsLock:(NSString *)isLock pitNumber:(NSString *)pitNumber{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView setSeatIsLock:isLock pitNumber:pitNumber];
|
||||
@@ -970,11 +1016,17 @@
|
||||
}
|
||||
|
||||
-(void)pkStartWithPkEndTimes:(NSString *)pk_end_times pk_id:(NSString*)pk_id{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (_roomPkView) {
|
||||
[self.roomPkView pkStartWithPkEndTimes:pk_end_times pk_id:pk_id];
|
||||
}
|
||||
}
|
||||
-(void)roomPKValueDidChangedWithRoomIdA:(NSString*)room_id_a create_value_a:(NSString*)create_value_a room_id_b:(NSString*)room_id_b receive_value_b:(NSString*)receive_value_b{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (_roomPkView) {
|
||||
[self.roomPkView roomPKValueDidChangedWithRoomIdA:room_id_a create_value_a:create_value_a room_id_b:room_id_b receive_value_b:receive_value_b];
|
||||
}
|
||||
@@ -986,6 +1038,9 @@
|
||||
victory_cover:(NSString*)victory_cover
|
||||
defeated_name:(NSString*)defeated_name
|
||||
defeated_cover:(NSString*)defeated_cover{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (_roomPkView) {
|
||||
[self.roomPkView pkResultWithIsVictory:isVictory end_time:end_time victory_name:victory_name victory_cover:victory_cover defeated_name:defeated_name defeated_cover:defeated_cover];
|
||||
}
|
||||
@@ -994,6 +1049,9 @@
|
||||
#pragma mark - 交友房
|
||||
/// 交友房阶段发生变化 step 阶段 1等待 2心动 3牵手 friend_id 场次id
|
||||
-(void)friendPartDidChangedWithType:(NSString*)step friend_id:(NSString*)friend_id end_time:(NSString*)end_time relationModel:(QXRoomFriendRelationModel*)relationModel{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeFriend:{
|
||||
[self.roomFriendView friendPartDidChangedWithType:step friend_id:friend_id end_time:end_time relationModel:relationModel];
|
||||
@@ -1005,6 +1063,9 @@
|
||||
}
|
||||
/// 交友房时间发生延时 end_time 截止时间
|
||||
-(void)friendTimeDelayWithTime:(NSString*)end_time{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeFriend:{
|
||||
[self.roomFriendView friendTimeDelayWithTime:end_time];
|
||||
@@ -1015,6 +1076,9 @@
|
||||
}
|
||||
}
|
||||
-(void)friendSeatDidChanged:(NSArray<QXRoomPitModel *> *)pitArray{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeFriend:{
|
||||
[self.roomFriendView friendSeatDidChanged:pitArray];
|
||||
@@ -1025,6 +1089,9 @@
|
||||
}
|
||||
}
|
||||
-(void)friendHeartNumberDidChanged:(NSArray<QXRoomFriendHeartListModel *> *)heartArray{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeFriend:{
|
||||
[self.roomFriendView friendHeartNumberDidChanged:heartArray];
|
||||
@@ -1036,6 +1103,9 @@
|
||||
}
|
||||
/// 关系创建完成
|
||||
-(void)friendRelationIsCreatedWithrelationModel:(QXRoomFriendRelationModel*)relationModel{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeFriend:{
|
||||
[self.roomFriendView friendRelationIsCreatedWithrelationModel:relationModel];
|
||||
@@ -1070,6 +1140,9 @@
|
||||
|
||||
/// 助力
|
||||
-(void)friendPowerSendGiftWithUser:(QXRoomPitModel *)user heartId:(NSString *)heartId{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if ([self.delegate respondsToSelector:@selector(friendPowerSendGiftWithUser:heartId:)]) {
|
||||
[self.delegate friendPowerSendGiftWithUser:user heartId:heartId];
|
||||
}
|
||||
@@ -1108,6 +1181,9 @@
|
||||
[self showOnlineListWithPitNumber:pitNumber];
|
||||
}
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
@@ -1138,17 +1214,26 @@
|
||||
}
|
||||
|
||||
-(void)auctionStartOrEndIsStart:(BOOL)isStart user:(QXRoomAuctionUser *)user getUser:(QXRoomAuctionUser *)getUser{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (_auctionView) {
|
||||
[self.auctionView auctionStartOrEndIsStart:isStart user:user getUser:getUser];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)auctionListDidChanged:(NSArray<QXRoomPitModel *> *)list{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (_auctionView) {
|
||||
[self.auctionView auctionListDidChanged:list];
|
||||
}
|
||||
}
|
||||
-(void)auctionDelayTimeWithEndTime:(NSString *)endTime{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
if (_auctionView) {
|
||||
[self.auctionView auctionDelayTimeWithEndTime:endTime];
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 礼物、坐骑【全屏位置】特效 加载
|
||||
- (void)displayFullEffectView:(NSString *)gift;
|
||||
|
||||
/// 礼物数组
|
||||
- (void)displayFullEffectViewWithMorePlayImages:(NSArray *)playImages;
|
||||
|
||||
/// 坐骑【公屏信息流位置】特效 加载
|
||||
- (void)displayChatEffectView:(NSString *)gift;
|
||||
|
||||
@@ -31,6 +34,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)destroyEffectSvga;
|
||||
|
||||
-(void)stopPlay;
|
||||
|
||||
-(void)startPlay;
|
||||
@end
|
||||
|
||||
|
||||
@@ -38,9 +43,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong) VAPView *playerMp4View;
|
||||
@property (nonatomic, strong) dispatch_queue_t queue;
|
||||
- (void)displayEffectView:(NSString *)play_image;
|
||||
- (void)displayEffectViewWithMorePlayImages:(NSArray *)playImages;
|
||||
- (void)openOrCloseEffectViewWith:(BOOL)isShow;
|
||||
@property (nonatomic,assign) BOOL isShow;
|
||||
- (void)destroyEffectView;
|
||||
-(void)stopPlay;
|
||||
-(void)startPlay;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -29,7 +29,7 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
manager = [[QXGiftPlayerManager alloc] init];
|
||||
// [manager creatDatabase];
|
||||
// [manager creatDatabase];
|
||||
});
|
||||
return manager;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
// NSString *dbFilePath = [documentPath stringByAppendingPathComponent:@"qx_gift.db"];
|
||||
// return dbFilePath;
|
||||
//}
|
||||
//
|
||||
//
|
||||
////创建数据库
|
||||
//- (void)creatDatabase
|
||||
//{
|
||||
@@ -127,11 +127,12 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
}
|
||||
|
||||
- (void)displayFullEffectView:(NSString *)gift {
|
||||
// [self insertGiftWithPlayImage:gift];
|
||||
// [self insertGiftWithPlayImage:gift];
|
||||
[self.fullEffectView displayEffectView:gift];
|
||||
}
|
||||
|
||||
|
||||
- (void)displayFullEffectViewWithMorePlayImages:(NSArray *)playImages{
|
||||
[self.fullEffectView displayEffectViewWithMorePlayImages:playImages];
|
||||
}
|
||||
|
||||
- (void)displayChatEffectView:(NSString *)gift {
|
||||
[self.chatEffectView displayEffectView:gift];
|
||||
@@ -160,6 +161,10 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
[self.fullEffectView stopPlay];
|
||||
[self.chatEffectView stopPlay];
|
||||
}
|
||||
-(void)startPlay{
|
||||
[self.fullEffectView startPlay];
|
||||
[self.chatEffectView startPlay];
|
||||
}
|
||||
- (UIView *)bgEffectView {
|
||||
if (!_bgEffectView) {
|
||||
_bgEffectView = [[UIView alloc] init];
|
||||
@@ -252,6 +257,30 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
}
|
||||
});
|
||||
}
|
||||
/// 礼物特效进来 gift为礼物实体类
|
||||
- (void)displayEffectViewWithMorePlayImages:(NSArray *)playImages {
|
||||
dispatch_async(self.queue, ^{
|
||||
/// 如果play_image不存在return
|
||||
if (playImages.count == 0) {
|
||||
return;
|
||||
}
|
||||
/// 锁住list
|
||||
[self.lock lock];
|
||||
/// 添加礼物进list
|
||||
[self.giftArray addObjectsFromArray:playImages];
|
||||
NSLog(@"当前礼物有---%ld个",self.giftArray.count);
|
||||
/// 解锁
|
||||
[self.lock unlock];
|
||||
|
||||
/// 如果没有在加载则开始加载
|
||||
if (self.isLoadEffect == NO) {
|
||||
/// 更改加载状态标记
|
||||
self.isLoadEffect = YES;
|
||||
[self loadStartSVGAPlayer];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (void)openOrCloseEffectViewWith:(BOOL)isShow {
|
||||
_isShow = isShow;
|
||||
[self removeSvgaQueueData];
|
||||
@@ -264,13 +293,18 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
[self setHidden:!isShow];
|
||||
}
|
||||
-(void)stopPlay{
|
||||
[self removeSvgaQueueData];
|
||||
|
||||
// [self removeSvgaQueueData];
|
||||
self.isLoadEffect = NO;
|
||||
[self.svagView stopEffectSvgaPlay];
|
||||
// [self.playerView stop];
|
||||
[self.playerMp4View stopHWDMP4];
|
||||
// [self.alphaVideoView stop];
|
||||
self.playerMp4View.hidden = YES;
|
||||
self.svagView.hidden = YES;
|
||||
}
|
||||
|
||||
-(void)startPlay{
|
||||
[self loadStartSVGAPlayer];
|
||||
}
|
||||
-(void)viewDidFinishPlayMP4:(NSInteger)totalFrameCount view:(VAPView *)container{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@@ -280,6 +314,14 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
[self loadStartSVGAPlayer];
|
||||
});
|
||||
}
|
||||
-(void)viewDidFailPlayMP4:(NSError *)error{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.playerMp4View.hidden = YES;
|
||||
});
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self loadStartSVGAPlayer];
|
||||
});
|
||||
}
|
||||
- (void)loadStartSVGAPlayer {
|
||||
if (!_isShow) {
|
||||
/// isshow 为是否开启特效 如果未开启则return
|
||||
@@ -311,7 +353,7 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
weakSelf.playerMp4View.hidden = NO;
|
||||
weakSelf.svagView.hidden = YES;
|
||||
});
|
||||
|
||||
[weakSelf.playerMp4View stopHWDMP4];
|
||||
[weakSelf.playerMp4View playHWDMP4:videoPath delegate:self];
|
||||
}];
|
||||
}else if ([play_image hasSuffix:@"svg"] || [play_image hasSuffix:@"svga"]) {
|
||||
@@ -329,6 +371,7 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
[self.lock lock];
|
||||
self.isLoadEffect = NO;
|
||||
[self.lock unlock];
|
||||
[self loadStartSVGAPlayer];
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -382,7 +425,7 @@ static NSString *PLAY_IMAGE = @"play_image";
|
||||
-(VAPView *)playerMp4View{
|
||||
if (!_playerMp4View) {
|
||||
_playerMp4View = [[VAPView alloc] initWithFrame:CGRectZero];
|
||||
_playerMp4View.hwd_enterBackgroundOP = HWDMP4EBOperationTypePauseAndResume;
|
||||
_playerMp4View.hwd_enterBackgroundOP = HWDMP4EBOperationTypeStop;
|
||||
_playerMp4View.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_playerMp4View.userInteractionEnabled = NO;
|
||||
_playerMp4View.backgroundColor = [UIColor clearColor];
|
||||
|
||||
@@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXGiftScrollView : UIView
|
||||
@property (nonatomic,strong)QXGiftScrollModel *model;
|
||||
@property (nonatomic,strong)NSArray<QXGiftScrollModel *>* list;
|
||||
@property (nonatomic,weak)id<QXGiftScrollViewDelegate>delegate;
|
||||
@end
|
||||
|
||||
|
||||
@@ -46,6 +46,27 @@ static NSInteger maxCount = 5;
|
||||
}
|
||||
self.cycleScrollView.imageURLStringsGroup = self.titles;
|
||||
}
|
||||
-(void)setList:(NSArray<QXGiftScrollModel *> *)list{
|
||||
_list = list;
|
||||
if (list.count >= 5) {
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.titles removeAllObjects];
|
||||
for (int i = 0; i < 5; i++) {
|
||||
QXGiftScrollModel*md = list[i];
|
||||
[self.dataArray addObject:md];
|
||||
[self.titles addObject:md.fromUserName];
|
||||
}
|
||||
}else{
|
||||
for (QXGiftScrollModel*md in list) {
|
||||
[self.dataArray removeLastObject];
|
||||
[self.titles removeLastObject];
|
||||
[self.dataArray insertObject:md atIndex:0];
|
||||
[self.titles insertObject:md.fromUserName atIndex:0];
|
||||
|
||||
}
|
||||
}
|
||||
self.cycleScrollView.imageURLStringsGroup = self.titles;
|
||||
}
|
||||
- (Class)customCollectionViewCellClassForCycleScrollView:(SDCycleScrollView *)view{
|
||||
return [QXGiftScrollViewCell class];
|
||||
}
|
||||
|
||||
@@ -8,13 +8,14 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXRoomListModel.h"
|
||||
#import "QXSearchModel.h"
|
||||
#import "MarqueeLabel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXHomeRoomCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
|
||||
@property (weak, nonatomic) IBOutlet UIView *displayMaskView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *IDLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
|
||||
@property (weak, nonatomic) IBOutlet MarqueeLabel *nameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *countLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *roomTypeView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *animateImageView;
|
||||
@@ -23,6 +24,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (strong, nonatomic) QXSearchModel *searchModel;
|
||||
@property (assign, nonatomic) BOOL isAppStore;
|
||||
|
||||
-(void)startAnimating;
|
||||
-(void)endAnimating;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -28,10 +28,15 @@
|
||||
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7156"];
|
||||
// }
|
||||
[self.roomTypeView sd_setImageWithURL:[NSURL URLWithString:model.label_icon]];
|
||||
self.animateImageView.animationDuration = 1;
|
||||
self.animateImageView.animationImages = self.imgs;
|
||||
|
||||
|
||||
}
|
||||
-(void)startAnimating{
|
||||
[self.animateImageView startAnimating];
|
||||
}
|
||||
-(void)endAnimating{
|
||||
[self.animateImageView stopAnimating];
|
||||
}
|
||||
-(void)setHistoryModel:(QXMyRoomHistory *)historyModel{
|
||||
_historyModel = historyModel;
|
||||
[self.coverImageView sd_setImageWithURL:[NSURL URLWithString:historyModel.room_cover]];
|
||||
@@ -90,6 +95,8 @@
|
||||
}else{
|
||||
[self.displayMaskView setTopToBottomGradientBackgroundWithColors:@[[UIColor colorWithHexString:@"#00000000"],[UIColor colorWithHexString:@"#00000096"]] frame:CGRectMake(0, 0, (SCREEN_WIDTH-15*3-1)/2.0, (SCREEN_WIDTH-15*3-1)/2.0)];
|
||||
}
|
||||
self.animateImageView.animationDuration = 1;
|
||||
self.animateImageView.animationImages = self.imgs;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -109,11 +109,19 @@
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V8F-du-Rah">
|
||||
<rect key="frame" x="8" y="258" width="31" height="14.333333333333314"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三李四王" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V8F-du-Rah" customClass="MarqueeLabel">
|
||||
<rect key="frame" x="8" y="258" width="65" height="14.333333333333314"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="65" id="4bC-3c-1jm"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="marqueeType">
|
||||
<integer key="value" value="0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
|
||||
@@ -234,10 +234,11 @@
|
||||
|
||||
-(void)cancelAccount{
|
||||
[QXMineNetwork cancelAccountSuccessBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[[QXGlobal shareGlobal] logOut];
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
[[QXGlobal shareGlobal] logOut];
|
||||
}
|
||||
|
||||
-(QXMainHeaderView *)tableHeaderView{
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
-(UIView *)listView{
|
||||
return self.view;
|
||||
}
|
||||
-(void)listWillAppear{
|
||||
[self getData];
|
||||
}
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
@@ -42,7 +45,7 @@
|
||||
-(void)getData{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork userDressListWithType:self.model.id successBlock:^(NSArray<QXUserDressModel *> * _Nonnull list) {
|
||||
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
if (list.count > 0 ) {
|
||||
QXUserDressModel *model = [[QXUserDressModel alloc] init];
|
||||
@@ -70,7 +73,7 @@
|
||||
return cell;
|
||||
}
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
CGFloat width = (SCREEN_WIDTH-15*2-22*2)/3;
|
||||
int width = (SCREEN_WIDTH-15*2-22*2-1)/3;
|
||||
return CGSizeMake(width, width/100*120);
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
@@ -159,6 +159,18 @@
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if ([cell isKindOfClass:[QXHomeRoomCell class]]) {
|
||||
QXHomeRoomCell *rCell = (QXHomeRoomCell *)cell;
|
||||
[rCell startAnimating];
|
||||
}
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if ([cell isKindOfClass:[QXHomeRoomCell class]]) {
|
||||
QXHomeRoomCell *rCell = (QXHomeRoomCell *)cell;
|
||||
[rCell endAnimating];
|
||||
}
|
||||
}
|
||||
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (self.type == 0) {
|
||||
|
||||
@@ -10,7 +10,12 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXChirldModeViewController : QXBaseViewController
|
||||
/// 0 = 设置1 , 1 = 设置2 ,2 = 退出
|
||||
@property (nonatomic,assign)NSInteger type;
|
||||
/// 密码
|
||||
@property (nonatomic,strong)NSString *password;
|
||||
|
||||
@property (nonatomic,assign)BOOL isRoot;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#import "QXChirldModeViewController.h"
|
||||
#import "QXPasswordView.h"
|
||||
#import "QXChirldViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
@interface QXChirldModeViewController ()<QXPasswordViewDelegate>
|
||||
@property (nonatomic,strong)QXPasswordView * passwordView;
|
||||
@end
|
||||
@@ -27,7 +29,12 @@
|
||||
}
|
||||
-(void)initSubViews{
|
||||
self.passwordView = [[QXPasswordView alloc] init];
|
||||
self.passwordView.type = QXPasswordViewTypeChirldMode;
|
||||
if (self.type == 1) {
|
||||
self.passwordView.type = QXPasswordViewTypeChirldModeTwice;
|
||||
}else{
|
||||
self.passwordView.type = QXPasswordViewTypeChirldMode;
|
||||
}
|
||||
|
||||
self.passwordView.delegate = self;
|
||||
[self.view addSubview:self.passwordView];
|
||||
[self.passwordView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -38,7 +45,35 @@
|
||||
}
|
||||
|
||||
-(void)inputFinished:(NSString *)password{
|
||||
|
||||
if (self.type == 0) {
|
||||
QXChirldModeViewController *vc = [[QXChirldModeViewController alloc] init];
|
||||
vc.type = 1;
|
||||
vc.password = password;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}else if (self.type == 1) {
|
||||
if ([self.password isEqualToString:password]) {
|
||||
QXChirldViewController *vc = [[QXChirldViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:password forKey:kChirldLocalPassword];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}else{
|
||||
showToast(@"两次密码输入不一致");
|
||||
}
|
||||
}else if (self.type == 2) {
|
||||
NSString *localPassword = [[NSUserDefaults standardUserDefaults] objectForKey:kChirldLocalPassword];
|
||||
if (![localPassword isEqualToString:password]) {
|
||||
showToast(@"密码错误");
|
||||
}else{
|
||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:kChirldLocalPassword];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
if (self.isRoot) {
|
||||
AppDelegate *appdelegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
|
||||
[appdelegate changeRootViewControllerIsTabbar];
|
||||
}else{
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
|
||||
[self.view endEditing:YES];
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#import <TencentCloudHuiyanSDKFace/WBFaceVerifyCustomerService.h>
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXRealNameFinishedViewController.h"
|
||||
#import "QXAlertView.h"
|
||||
|
||||
@interface QXRealNameViewController ()<WBFaceVerifyCustomerServiceDelegate>
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@@ -259,6 +260,7 @@
|
||||
weakSelf.realNamedict = dict;
|
||||
[weakSelf startFace];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
hideLoadingInView(self.view);
|
||||
showToast(msg);
|
||||
}];
|
||||
|
||||
@@ -305,13 +307,26 @@
|
||||
-(void)wbfaceVerifyCustomerServiceDidFinishedWithFaceVerifyResult:(WBFaceVerifyResult *)faceVerifyResult{
|
||||
if (faceVerifyResult.isSuccess) {
|
||||
QXLOG(@"人脸核验通过");
|
||||
[self authSuccess];
|
||||
MJWeakSelf
|
||||
QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
|
||||
al.type = QXAlertViewTypeNoCancel;
|
||||
al.title = @"温馨提示";
|
||||
al.message = @"恭喜您获得内测资格,将获得10万金币";
|
||||
al.commitBlock = ^{
|
||||
[weakSelf authSuccess];
|
||||
};
|
||||
[[QXGlobal shareGlobal] showView:al popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
|
||||
/// 通知服务端实名验证结果
|
||||
[QXMineNetwork postRealNameResultWithOrderNo:faceVerifyResult.orderNo successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}else{
|
||||
showToast(@"实名认证失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ static NSInteger maxClickCount = 6;
|
||||
-(void)initSubViews{
|
||||
NSArray *section1 = @[
|
||||
// QXText(@"消息通知"),
|
||||
QXText(@"未成年人模式"),
|
||||
// QXText(@"未成年人模式"),
|
||||
QXText(@"黑名单"),
|
||||
QXText(@"设置密码"),
|
||||
QXText(@"手机绑定"),
|
||||
@@ -54,7 +54,7 @@ static NSInteger maxClickCount = 6;
|
||||
];
|
||||
self.cellTypeDict = @{
|
||||
// QXText(@"消息通知"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"未成年人模式"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
// QXText(@"未成年人模式"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"黑名单"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"设置密码"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"手机绑定"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
@@ -67,7 +67,7 @@ static NSInteger maxClickCount = 6;
|
||||
|
||||
self.controllerDict = @{
|
||||
QXText(@"消息通知"):@"QXNoticeSwitchViewController",
|
||||
QXText(@"未成年人模式"):@"QXChirldModeViewController",
|
||||
// QXText(@"未成年人模式"):@"QXChirldModeViewController",
|
||||
QXText(@"黑名单"):@"QXBlackListlViewController",
|
||||
QXText(@"设置密码"):@"QXSetPwdViewController",
|
||||
QXText(@"手机绑定"):@"QXBindMobileViewController",
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXCornRecordCell *cell = [QXCornRecordCell cellWithTableView:tableView];
|
||||
cell.isCoin = self.waterType==0;
|
||||
cell.model = self.dataArray[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
|
||||
@@ -1031,9 +1031,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+(void)roomBagGiftClearWithRoomId:(NSString*)roomId
|
||||
userId:(NSString*)userId
|
||||
heartId:(NSString*)heartId
|
||||
auction_id:(NSString*)auction_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
背包礼物价值
|
||||
*/
|
||||
+(void)roomGiftBagPricesuccessBlock:(void (^)(NSString* price))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -2019,11 +2019,12 @@
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)roomBagGiftClearWithRoomId:(NSString *)roomId userId:(NSString *)userId heartId:(NSString*)heartId successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
+(void)roomBagGiftClearWithRoomId:(NSString *)roomId userId:(NSString *)userId heartId:(NSString*)heartId auction_id:(NSString*)auction_id successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":roomId?roomId:@"",
|
||||
@"to_uid":userId?userId:@"",
|
||||
@"heart_id":heartId?heartId:@""
|
||||
@"heart_id":heartId?heartId:@"",
|
||||
@"auction_id":auction_id?auction_id:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomGiftBagClear parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
@@ -2033,4 +2034,15 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)roomGiftBagPricesuccessBlock:(void (^)(NSString * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXRoomGiftBagPrice parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSString *count = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"count"]];
|
||||
successBlock(count);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
}
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2)/3, 76);
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2-1)/3, 76);
|
||||
}
|
||||
return CGSizeMake(SCREEN_WIDTH, 40);
|
||||
}
|
||||
@@ -272,7 +272,7 @@
|
||||
if (weakSelf.selectedPayTypeModel.type.intValue == 2) {
|
||||
NSDictionary *resultDict = dict[@"data"];
|
||||
NSString *order = [NSString stringWithFormat:@"%@",resultDict[@"ali"]];
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"qxlive" callback:^(NSDictionary *resultDic) {
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"midilive" callback:^(NSDictionary *resultDic) {
|
||||
NSLog(@"支付宝H5支付回调 - %@", resultDic);
|
||||
|
||||
}];
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
//// }
|
||||
//}
|
||||
-(void)setModel:(QXRoomListModel *)model{
|
||||
|
||||
_model = model;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
self.nickNameLabel.text = model.room_name;
|
||||
@@ -84,11 +85,11 @@
|
||||
NSString *come = [NSString qx_showHotCountNum:model.visit_num.longLongValue];
|
||||
self.comeCountLabel.text = [NSString stringWithFormat:@"访问:%@",come];
|
||||
if (self.type == 0) {
|
||||
self.todayLabel.text = @"今日收益";
|
||||
self.todayLabel.text = @"今日流水";
|
||||
}else{
|
||||
self.todayLabel.text = [NSString stringWithFormat:@"收益分成比例:%@%%",model.ratio];
|
||||
}
|
||||
NSString *money = [NSString qx_showHotCountNum:model.today_profit.longLongValue];
|
||||
NSString *money = [NSString stringWithFormat:@"%.4f",model.today_profit.doubleValue];
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%@",money];
|
||||
[self.typeImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon] placeholderImage:nil];
|
||||
if (model.apply_status.intValue == 1) {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
QXPasswordViewTypeChirldMode = 0,
|
||||
QXPasswordViewTypeChirldModeTwice,
|
||||
QXPasswordViewTypeRoom
|
||||
}QXPasswordViewType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -102,17 +102,17 @@ CGFloat labelHeight = 63;
|
||||
make.centerX.centerY.equalTo(self.label1);
|
||||
make.width.height.mas_equalTo(1);
|
||||
}];
|
||||
self.forgotBtn = [[UIButton alloc] init];
|
||||
[self.forgotBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
self.forgotBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.forgotBtn setTitle:[NSString stringWithFormat:@"%@?%@",QXText(@"忘记密码"),QXText(@"请联系客服")] forState:(UIControlStateNormal)];
|
||||
[self.forgotBtn addTarget:self action:@selector(forgotAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.forgotBtn];
|
||||
[self.forgotBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.label1.mas_bottom).offset(10);
|
||||
make.height.mas_equalTo(38);
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
// self.forgotBtn = [[UIButton alloc] init];
|
||||
// [self.forgotBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
// self.forgotBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
// [self.forgotBtn setTitle:[NSString stringWithFormat:@"%@?%@",QXText(@"忘记密码"),QXText(@"请联系客服")] forState:(UIControlStateNormal)];
|
||||
// [self.forgotBtn addTarget:self action:@selector(forgotAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
// [self addSubview:self.forgotBtn];
|
||||
// [self.forgotBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.equalTo(self.label1.mas_bottom).offset(10);
|
||||
// make.height.mas_equalTo(38);
|
||||
// make.centerX.equalTo(self);
|
||||
// }];
|
||||
}
|
||||
-(void)forgotAction{
|
||||
|
||||
@@ -201,6 +201,10 @@ CGFloat labelHeight = 63;
|
||||
self.titleLabel.text = QXText(@"请输入监护密码");
|
||||
}
|
||||
break;
|
||||
case QXPasswordViewTypeChirldModeTwice:{
|
||||
self.titleLabel.text = QXText(@"请确认监护密码");
|
||||
}
|
||||
break;
|
||||
case QXPasswordViewTypeRoom:{
|
||||
self.titleLabel.text = QXText(@"请输入房间密码");
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
|
||||
@property (nonatomic,assign)BOOL isCoin;
|
||||
@property (nonatomic,strong) QXCoinDetailModel *model;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
-(void)setIsCoin:(BOOL)isCoin{
|
||||
_isCoin = isCoin;
|
||||
}
|
||||
-(void)setModel:(QXCoinDetailModel *)model{
|
||||
_model = model;
|
||||
self.reasonLabel.text = model.remarks;
|
||||
@@ -26,7 +29,12 @@
|
||||
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
|
||||
NSString*time = [formatter stringFromDate:date];
|
||||
self.timeLabel.text = time;
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.change_value.doubleValue];
|
||||
if (self.isCoin) {
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.change_value.doubleValue];
|
||||
}else{
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.4f",model.change_value.doubleValue];
|
||||
}
|
||||
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
#import <TIMPush/TIMPushManager.h>
|
||||
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
|
||||
#import "QXAppStartViewController.h"
|
||||
#import "QXGiftPlayerManager.h"
|
||||
#import "IQKeyboardManager.h"
|
||||
#import "QXChirldViewController.h"
|
||||
#if DEBUG
|
||||
#import <LLDebugTool.h>
|
||||
#endif
|
||||
@@ -43,6 +46,7 @@
|
||||
self.window.rootViewController = startVC;
|
||||
[Bugly startWithAppId:@"65efebcd8f"];
|
||||
SDImageWebPCoder *webPCoder = [SDImageWebPCoder sharedCoder];
|
||||
[IQKeyboardManager sharedManager].enable = NO;
|
||||
[[SDImageCodersManager sharedManager] addCoder:webPCoder];
|
||||
[self configThirdPartLogin];
|
||||
#if DEBUG
|
||||
@@ -64,9 +68,15 @@
|
||||
[AvoidCrash becomeEffective];
|
||||
}
|
||||
-(void)changeRootViewControllerIsTabbar{
|
||||
NSString *localPassword = [[NSUserDefaults standardUserDefaults] objectForKey:kChirldLocalPassword];
|
||||
if ([QXGlobal shareGlobal].isLogin && [[QXGlobal shareGlobal].loginModel.sex isEqualToString:@"0"]) {
|
||||
QXFillUserInfoViewController *vc = [[QXFillUserInfoViewController alloc] init];
|
||||
self.window.rootViewController = vc;
|
||||
}else if([localPassword isExist]){
|
||||
QXChirldViewController*vc = [[QXChirldViewController alloc] init];
|
||||
vc.isRoot = YES;
|
||||
QXBaseNavigationController *na = [[QXBaseNavigationController alloc] initWithRootViewController:vc];
|
||||
self.window.rootViewController = na;
|
||||
}else{
|
||||
self.tabbarVC = [[QXTabbarController alloc] init];
|
||||
QXBaseNavigationController *na = [[QXBaseNavigationController alloc] initWithRootViewController:self.tabbarVC];
|
||||
@@ -183,7 +193,7 @@
|
||||
//服务器端查询支付通知或查询API返回的结果再提示成功
|
||||
NSLog(@"支付成功");
|
||||
showToast(QXText(@"支付成功"));
|
||||
// [[NSNotificationCenter defaultCenter] postNotificationName:@"wxapiPaySuccess" object:nil userInfo:nil];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:noticeAlipayResult object:nil];
|
||||
break;
|
||||
case WXErrCodeUserCancel:
|
||||
//服务器端查询支付通知或查询API返回的结果再提示成功
|
||||
@@ -200,7 +210,16 @@
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:noticeWeChatLogin object:response];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)applicationDidEnterBackground:(UIApplication *)application{
|
||||
if ([QXGlobal.shareGlobal.roomId isExist]) {
|
||||
[[QXGiftPlayerManager shareManager] stopPlay];
|
||||
}
|
||||
}
|
||||
-(void)applicationWillEnterForeground:(UIApplication *)application{
|
||||
if ([QXGlobal.shareGlobal.roomId isExist] && (QXGlobal.shareGlobal.miniView==nil)) {
|
||||
[[QXGiftPlayerManager shareManager] startPlay];
|
||||
}
|
||||
}
|
||||
|
||||
/// 设备转向
|
||||
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
|
||||
|
||||
22
QXLive/Other/Assets.xcassets/home/room/room_set_room_type_funny.imageset/Contents.json
vendored
Normal file
22
QXLive/Other/Assets.xcassets/home/room/room_set_room_type_funny.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_set_room_type_funny@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_set_room_type_funny@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -100,6 +100,8 @@ static NSString *const CHAT_AUDIO_FILE_BASE_PATH = @"emchat/audio/ios/";
|
||||
static NSString *const kEffectsCLose = @"kEffectsCLose";
|
||||
/// 是否打开充值
|
||||
static NSString *const kIsOpenRecharge = @"kIsOpenRecharge";
|
||||
/// 是否开启青少年模式
|
||||
static NSString *const kChirldLocalPassword = @"kChirldLocalPassword";
|
||||
|
||||
// 微信登录
|
||||
static NSString *const noticeWeChatLogin = @"noticeWeChatLogin";
|
||||
|
||||
@@ -434,4 +434,7 @@ static NSString * QXRoomFriendRoomQuit = @"api/Friend/out_room";
|
||||
static NSString * QXRoomUserCharmList = @"api/Room/room_user_charm_list";
|
||||
/// 背包一键全清
|
||||
static NSString * QXRoomGiftBagClear = @"api/Room/room_gift_all_clear";
|
||||
/// 背包礼物价值
|
||||
static NSString * QXRoomGiftBagPrice = @"api/UserGiftPack/get_gift_pack_list_count";
|
||||
|
||||
#endif /* Api_h */
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#import "QXMessageServices.h"
|
||||
|
||||
#import "QXMeetActivityDriftView.h" // 巡乐会
|
||||
#import "QXChirldModeViewController.h"
|
||||
|
||||
@interface QXTabbarController ()<UITabBarControllerDelegate,QXTabBarDelegate,UINavigationControllerDelegate,MQTTClientModelDelegate,V2TIMConversationListener>
|
||||
@property(nonatomic,strong) QXTabBar *customTabBar;
|
||||
@@ -55,7 +56,8 @@
|
||||
return;
|
||||
}
|
||||
if (QXGlobal.shareGlobal.isLogin) {
|
||||
[self performSelector:@selector(popChirldView) afterDelay:1];
|
||||
// [self performSelector:@selector(popChirldView) afterDelay:1];
|
||||
[self popChirldView];
|
||||
}
|
||||
QXLOG(@"视图即将展示");
|
||||
}
|
||||
@@ -87,7 +89,8 @@
|
||||
}];
|
||||
}
|
||||
-(void)pushToChirld{
|
||||
QXChirldViewController *vc = [[QXChirldViewController alloc] init];
|
||||
QXChirldModeViewController *vc = [[QXChirldModeViewController alloc] init];
|
||||
vc.type = 0;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
@@ -258,9 +261,26 @@
|
||||
|
||||
-(void)socketManager:(NSString *)socketManager receivedMessage:(NSDictionary *)message topic:(NSString *)topic{
|
||||
if ([topic isEqualToString:qx_room_topic]) {
|
||||
QXGiftScrollModel *model = [QXGiftScrollModel yy_modelWithJSON:message[@"msg"][@"list"]];
|
||||
[self.homeVC giftScrollViewShowWithModel:model];
|
||||
[[QXGiftDriftView shareView] addGiftModel:model];
|
||||
// NSDictionary*dict = message[@"msg"];
|
||||
// BOOL isList = YES;
|
||||
// for (NSString *key in dict.allKeys) {
|
||||
// if ([key isEqualToString:@"list"]) {
|
||||
// isList = NO;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (isList) {
|
||||
NSArray *array = [NSArray yy_modelArrayWithClass:[QXGiftScrollModel class] json:message[@"msg"][@"list"]];
|
||||
if (array.count == 0) {
|
||||
return;
|
||||
}
|
||||
[self.homeVC giftScrollViewShowWithModelList:array];
|
||||
[[QXGiftDriftView shareView] addGiftModelList:array];
|
||||
// }else{
|
||||
// QXGiftScrollModel *model = [QXGiftScrollModel yy_modelWithJSON:message[@"msg"][@"list"]];
|
||||
// [self.homeVC giftScrollViewShowWithModel:model];
|
||||
// [[QXGiftDriftView shareView] addGiftModel:model];
|
||||
// }
|
||||
}else if([topic isEqualToString:qx_ac_topic]){
|
||||
QXMeetActivityDriftModel *model = [QXMeetActivityDriftModel yy_modelWithJSON:message[@"msg"]];
|
||||
[[QXMeetActivityDriftView shareView] addActivityModel:model];
|
||||
|
||||
@@ -17,6 +17,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
QXAlertViewTypeAgreeSong,
|
||||
/// pk弹窗
|
||||
QXAlertViewTypeAgreePK,
|
||||
/// 没有取消
|
||||
QXAlertViewTypeNoCancel
|
||||
}QXAlertViewType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -114,6 +114,17 @@
|
||||
}];
|
||||
}
|
||||
break;
|
||||
case QXAlertViewTypeNoCancel:{
|
||||
self.cancelBtn.hidden = YES;
|
||||
self.commitBtn.hidden = NO;
|
||||
[self.commitBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self).offset(-12);
|
||||
make.height.mas_equalTo(42);
|
||||
make.width.mas_equalTo(ScaleWidth(220));
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
self.contentLabel.text = QXText(@"为了呵护未成年人健康成长,蜜耳语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码");
|
||||
[self addSubview:self.contentLabel];
|
||||
|
||||
self.goBtn = [[UIButton alloc] init];
|
||||
[self.goBtn setTitleColor:RGB16(0xF4DF39) forState:(UIControlStateNormal)];
|
||||
[self.goBtn setTitle:[NSString stringWithFormat:@"%@>",QXText(@"进入青少年模式")] forState:(UIControlStateNormal)];
|
||||
self.goBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.goBtn addTarget:self action:@selector(gotoChirld) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.goBtn];
|
||||
// self.goBtn = [[UIButton alloc] init];
|
||||
// [self.goBtn setTitleColor:RGB16(0xF4DF39) forState:(UIControlStateNormal)];
|
||||
// [self.goBtn setTitle:[NSString stringWithFormat:@"%@>",QXText(@"进入青少年模式")] forState:(UIControlStateNormal)];
|
||||
// self.goBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
// [self.goBtn addTarget:self action:@selector(gotoChirld) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
// [self addSubview:self.goBtn];
|
||||
|
||||
self.closeBtn = [[UIButton alloc] init];
|
||||
[self.closeBtn setBackgroundImage:[UIImage imageNamed:@"home_white_close"] forState:(UIControlStateNormal)];
|
||||
@@ -96,10 +96,10 @@
|
||||
self.setBtn = [[UIButton alloc] init];
|
||||
[self.setBtn addRoundedCornersWithRadius:21];
|
||||
self.setBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.setBtn setTitle:QXText(@"设置青少年模式") forState:(UIControlStateNormal)];
|
||||
[self.setBtn setTitle:QXText(@"进入青少年模式") forState:(UIControlStateNormal)];
|
||||
[self.setBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
|
||||
self.setBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.setBtn addTarget:self action:@selector(setAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.setBtn addTarget:self action:@selector(gotoChirld) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.setBtn];
|
||||
[self.setBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.bgImageView).offset(-12);
|
||||
|
||||
@@ -290,11 +290,11 @@
|
||||
|
||||
-(NSAttributedString *)changePrice:(NSString*)price giftPrice:(NSString*)giftPrice{
|
||||
NSString *str = [NSString stringWithFormat:@"%@ %@",price,giftPrice];
|
||||
NSAttributedString *attr = [str deleteLineWithTextColor:RGB16(0x999999) lineColor:RGB16(0x999999) range:[str rangeOfString:giftPrice]];
|
||||
NSAttributedString *attr = [str deleteLineWithTextColor:RGB16(0x333333) lineColor:RGB16(0x333333) range:[str rangeOfString:giftPrice]];
|
||||
NSMutableAttributedString *att = [[NSMutableAttributedString alloc] initWithAttributedString:attr];
|
||||
[att yy_setFont:[UIFont systemFontOfSize:14] range:[str rangeOfString:price]];
|
||||
[att yy_setFont:[UIFont boldSystemFontOfSize:14] range:[str rangeOfString:price]];
|
||||
[att yy_setFont:[UIFont systemFontOfSize:12] range:[str rangeOfString:giftPrice]];
|
||||
[att yy_setColor:RGB16(0x333333) range:[price rangeOfString:str]];
|
||||
[att yy_setColor:RGB16(0xFFE200) range:[str rangeOfString:price]];
|
||||
return att;
|
||||
}
|
||||
-(void)rechargeAction{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
_cellType = cellType;
|
||||
switch (cellType) {
|
||||
case QXGiftCellTypeNiceGift:{
|
||||
[self.selecteBtn setBackgroundImage:[UIImage imageWithColor:RGB16(0xE9E9E9)] forState:(UIControlStateNormal)];
|
||||
self.numberWidthConstraint.constant = 23;
|
||||
self.numberHeightConstraint.constant = 9;
|
||||
self.cornHeight.constant = 10;
|
||||
|
||||
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
@property (nonatomic,strong)QXGiftScrollModel *model;
|
||||
-(void)addGiftModel:(QXGiftScrollModel*)model;
|
||||
-(void)addGiftModelList:(NSArray<QXGiftScrollModel*>*)list;
|
||||
+(instancetype)shareView;
|
||||
@end
|
||||
|
||||
|
||||
@@ -70,7 +70,10 @@
|
||||
[self.dataArray addObject:model];
|
||||
[self giftAction];
|
||||
}
|
||||
|
||||
-(void)addGiftModelList:(NSArray<QXGiftScrollModel *> *)list{
|
||||
[self.dataArray addObjectsFromArray:list];
|
||||
[self giftAction];
|
||||
}
|
||||
|
||||
-(void)giftAction{
|
||||
if (self.isPlaying) {
|
||||
|
||||
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
|
||||
@interface QXMeetActivityDriftModel : NSObject
|
||||
@property (nonatomic,strong)NSString *roomId;
|
||||
@property (nonatomic,strong)NSString *room_id;
|
||||
@property (nonatomic,strong)NSString *text;
|
||||
@property (nonatomic,assign)NSInteger from_type;
|
||||
@end
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
self.userInteractionEnabled = YES;
|
||||
MJWeakSelf
|
||||
[self addTapBlock:^(id _Nonnull obj) {
|
||||
if ([weakSelf.model.roomId isExist]) {
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:weakSelf.model.roomId isRejoin:NO navagationController:weakSelf.viewController.navigationController];
|
||||
if ([weakSelf.model.room_id isExist]) {
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:weakSelf.model.room_id isRejoin:NO navagationController:weakSelf.viewController.navigationController];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXChirldViewController : QXBaseViewController
|
||||
|
||||
@property (nonatomic,assign)BOOL isRoot;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "QXChirldViewController.h"
|
||||
#import <WebKit/WebKit.h>
|
||||
#import "QXChirldModeViewController.h"
|
||||
|
||||
static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
@interface QXChirldViewController ()<WKScriptMessageHandler>
|
||||
@@ -93,7 +94,10 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
if (self.contentWebView.canGoBack) {
|
||||
[self.contentWebView goBack];
|
||||
}else{
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
QXChirldModeViewController *vc = [[QXChirldModeViewController alloc] init];
|
||||
vc.type = 2;
|
||||
vc.isRoot = YES;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
layout.minimumLineSpacing = 23;
|
||||
layout.minimumInteritemSpacing = 23;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 17, 0, 17);
|
||||
layout.itemSize = CGSizeMake((SCREEN_WIDTH-17*2-23*2)/3, ScaleWidth(128));
|
||||
layout.itemSize = CGSizeMake((SCREEN_WIDTH-17*2-23*2-1)/3, ScaleWidth(128));
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.ruleImageView.bottom+10, SCREEN_WIDTH, self.bgView.height-self.ruleImageView.bottom) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
layout.minimumLineSpacing = 16;
|
||||
layout.minimumInteritemSpacing = 16;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 12, 0, 12);
|
||||
layout.itemSize = CGSizeMake((self.bgCoverView.width-12*2-16*2)/3, ScaleWidth(123));
|
||||
layout.itemSize = CGSizeMake((self.bgCoverView.width-12*2-16*2-1)/3, ScaleWidth(123));
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.myRecordBtn.bottom+10, self.bgCoverView.width, self.bgCoverView.height-self.myRecordBtn.bottom-5) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
|
||||
@@ -473,7 +473,7 @@ static NSInteger toSlowCount = 4;
|
||||
return;
|
||||
}
|
||||
if (self.isDrawing) {
|
||||
showToast(@"正在抽奖中");
|
||||
// showToast(@"正在抽奖中");
|
||||
return;
|
||||
}
|
||||
[self resetViews];
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
layout.minimumLineSpacing = 23;
|
||||
layout.minimumInteritemSpacing = 23;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 17, 0, 17);
|
||||
layout.itemSize = CGSizeMake((SCREEN_WIDTH-17*2-23*2)/3, ScaleWidth(128));
|
||||
layout.itemSize = CGSizeMake((SCREEN_WIDTH-17*2-23*2-1)/3, ScaleWidth(128));
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.ruleImageView.bottom+10, SCREEN_WIDTH, self.bgView.height-self.ruleImageView.bottom) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
layout.minimumLineSpacing = 16;
|
||||
layout.minimumInteritemSpacing = 16;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 12, 0, 12);
|
||||
layout.itemSize = CGSizeMake((self.bgCoverView.width-12*2-16*2)/3, ScaleWidth(123));
|
||||
layout.itemSize = CGSizeMake((self.bgCoverView.width-12*2-16*2-1)/3, ScaleWidth(123));
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.myRecordBtn.bottom+10, self.bgCoverView.width, self.bgCoverView.height-self.myRecordBtn.bottom-5) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
|
||||
@@ -505,7 +505,7 @@ static NSInteger toSlowCount = 4;
|
||||
return;
|
||||
}
|
||||
if (self.isDrawing) {
|
||||
showToast(@"正在抽奖中");
|
||||
// showToast(@"正在抽奖中");
|
||||
return;
|
||||
}
|
||||
[self resetViews];
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef NS_ENUM(NSInteger) {
|
||||
/// 抽10次
|
||||
QXMeetDrawBtnTypeTen = 10,
|
||||
/// 抽100次
|
||||
QXMeetDrawBtnTypeHundred = 100,
|
||||
QXMeetDrawBtnTypeHundred = 20,
|
||||
}QXMeetDrawBtnType;
|
||||
@interface QXMeetActivityView : UIView
|
||||
-(void)showInView:(UIView *)view;
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
}
|
||||
-(void)drawGiftWithNum:(NSString*)num{
|
||||
if (self.isDrawing) {
|
||||
showToast(@"正在抽奖中");
|
||||
// showToast(@"正在抽奖中");
|
||||
return;
|
||||
}
|
||||
NSDictionary *parameters = @{
|
||||
@@ -571,6 +571,7 @@
|
||||
_resultView = [[QXMeetActivityResultView alloc] init];
|
||||
MJWeakSelf
|
||||
_resultView.againBlock = ^(NSString * _Nonnull times) {
|
||||
// weakSelf.jumpAnimateBtn.selected = YES;
|
||||
[weakSelf drawGiftWithNum:times];
|
||||
};
|
||||
}
|
||||
@@ -794,7 +795,7 @@
|
||||
break;
|
||||
case QXMeetDrawBtnTypeHundred:
|
||||
{
|
||||
self.titleLabel.text = @"抽百次";
|
||||
self.titleLabel.text = @"抽二十次";
|
||||
[self.giftCoin setTitle:@"1000币一次" forState:(UIControlStateNormal)];
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
layout.minimumLineSpacing = 23;
|
||||
layout.minimumInteritemSpacing = 23;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 17, 0, 17);
|
||||
layout.itemSize = CGSizeMake((SCREEN_WIDTH-17*2-23*2)/3, ScaleWidth(128));
|
||||
layout.itemSize = CGSizeMake((SCREEN_WIDTH-17*2-23*2-1)/3, ScaleWidth(128));
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.ruleImageView.bottom+10, SCREEN_WIDTH, self.bgView.height-self.ruleImageView.bottom) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
layout.minimumLineSpacing = 16;
|
||||
layout.minimumInteritemSpacing = 16;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 12, 0, 12);
|
||||
layout.itemSize = CGSizeMake((self.bgCoverView.width-12*2-16*2)/3, ScaleWidth(123));
|
||||
layout.itemSize = CGSizeMake((self.bgCoverView.width-12*2-16*2-1)/3, ScaleWidth(123));
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.myRecordBtn.bottom+10, self.bgCoverView.width, self.bgCoverView.height-self.myRecordBtn.bottom-5) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
|
||||
@@ -506,7 +506,7 @@ static NSInteger toSlowCount = 4;
|
||||
return;
|
||||
}
|
||||
if (self.isDrawing) {
|
||||
showToast(@"正在抽奖中");
|
||||
// showToast(@"正在抽奖中");
|
||||
return;
|
||||
}
|
||||
[self resetViews];
|
||||
|
||||
Reference in New Issue
Block a user