diff --git a/QXLive/Base/QXGlobal.h b/QXLive/Base/QXGlobal.h index d77b798..054da9f 100644 --- a/QXLive/Base/QXGlobal.h +++ b/QXLive/Base/QXGlobal.h @@ -88,6 +88,16 @@ typedef void (^showFinishBlock)(void); nickname:(NSString*)nickname avatar:(NSString*)avatar navagationController:(UINavigationController*)navagationController; + + +/** + 去找客服 + */ +-(void)chatWithServices:(NSString*)serviceId + nickname:(NSString*)nickname + avatar:(NSString*)avatar + navagationController:(UINavigationController*)navagationController; + /** 去公会群聊 */ diff --git a/QXLive/Base/QXGlobal.m b/QXLive/Base/QXGlobal.m index 82d3995..ada7ea3 100644 --- a/QXLive/Base/QXGlobal.m +++ b/QXLive/Base/QXGlobal.m @@ -194,6 +194,17 @@ [navagationController pushViewController:vc animated:YES]; } +-(void)chatWithServices:(NSString *)serviceId nickname:(NSString *)nickname avatar:(NSString *)avatar navagationController:(UINavigationController *)navagationController{ + QXChatViewController *vc = [[QXChatViewController alloc] init]; + TUIChatConversationModel *data = [[TUIChatConversationModel alloc] init]; + data.userID = [NSString stringWithFormat:@"u%@",serviceId]; + data.title = nickname; + data.faceUrl = avatar; + vc.data = data; + vc.isServices = YES; + [navagationController pushViewController:vc animated:YES]; +} + -(void)chatWithGroupId:(NSString *)groupId cover:(NSString *)cover name:(NSString *)name navagationController:(UINavigationController *)navagationController{ QXChatViewController *vc = [[QXChatViewController alloc] init]; TUIChatConversationModel *data = [[TUIChatConversationModel alloc] init]; diff --git a/QXLive/Login(登录)/Controlller/QXFillUserInfoViewController.m b/QXLive/Login(登录)/Controlller/QXFillUserInfoViewController.m index 4859aff..81055d4 100755 --- a/QXLive/Login(登录)/Controlller/QXFillUserInfoViewController.m +++ b/QXLive/Login(登录)/Controlller/QXFillUserInfoViewController.m @@ -274,7 +274,7 @@ - (IBAction)comitUserInfoBtnAction:(id)sender { //提交信息 - if (_userNameTF.text.length == 0) { + if (![_userNameTF.text isExist]) { showToastInView(QXText(@"请填写昵称"), self.view); return; } diff --git a/QXLive/Login(登录)/Services/QXLoginNetwork.h b/QXLive/Login(登录)/Services/QXLoginNetwork.h index 4e5dc79..43afe99 100644 --- a/QXLive/Login(登录)/Services/QXLoginNetwork.h +++ b/QXLive/Login(登录)/Services/QXLoginNetwork.h @@ -28,17 +28,17 @@ typedef NS_ENUM(NSInteger) { /// 登录 GetSmscodeTypeLogin = 0, /// 找回密码 - GetSmscodeTypeFindPassword, + GetSmscodeTypeFindPassword = 3, /// 更换手机号 - GetSmscodeTypeFindChangeMobile, + GetSmscodeTypeFindChangeMobile = 1, /// 绑定手机号 - GetSmscodeTypeFindBindMobile, + GetSmscodeTypeFindBindMobile = 2, /// 设置密码 - GetSmscodeTypeSetPassword, + GetSmscodeTypeSetPassword = 4, /// 账号注销 - GetSmscodeTypeAccountCancel, + GetSmscodeTypeAccountCancel = 5, /// 提现 - GetSmscodeTypeWithDraw, + GetSmscodeTypeWithDraw = 6, }GetSmscodeType; NS_ASSUME_NONNULL_BEGIN diff --git a/QXLive/Manager/QXAgoraEngine.m b/QXLive/Manager/QXAgoraEngine.m index 557edeb..3a51b2a 100755 --- a/QXLive/Manager/QXAgoraEngine.m +++ b/QXLive/Manager/QXAgoraEngine.m @@ -61,7 +61,7 @@ [self.agoraKit enableAudioVolumeIndication:200 smooth:3 reportVad:NO]; [self.agoraKit getCurrentMonotonicTimeInMs]; [self.agoraKit setAudioProfile:AgoraAudioProfileMusicHighQualityStereo]; - [self.agoraKit setAudioScenario:AgoraAudioScenarioChorus]; + [self.agoraKit setAudioScenario:AgoraAudioScenarioGameStreaming]; [self setChannelProfile]; self.agoraKit.delegate = self; [self.agoraKit setParameters:@"{\"che.audio.custom_payload_type\":73}"]; diff --git a/QXLive/Manager/QXManagerMqtt.m b/QXLive/Manager/QXManagerMqtt.m index 763b311..8cf760c 100755 --- a/QXLive/Manager/QXManagerMqtt.m +++ b/QXLive/Manager/QXManagerMqtt.m @@ -83,6 +83,7 @@ switch (newState) { case MQTTSessionManagerStateConnected: QXLOG(@"eventCode -- 连接成功"); + [QXLogger infoWithTag:@"MQTT" format:@"连接成功"]; [self subscribeTopic:qx_room_topic]; [self subscribeTopic:qx_ac_topic]; [self subscribeTopic:qx_hour_ranking]; @@ -92,21 +93,23 @@ break; case MQTTSessionManagerStateConnecting: QXLOG(@"eventCode -- 连接中"); - + [QXLogger infoWithTag:@"MQTT" format:@"连接中"]; break; case MQTTSessionManagerStateClosed: QXLOG(@"eventCode -- 连接被关闭"); + [QXLogger infoWithTag:@"MQTT" format:@"连接被关闭"]; break; case MQTTSessionManagerStateError: QXLOG(@"eventCode -- 连接错误"); + [QXLogger infoWithTag:@"MQTT" format:@"连接错误"]; break; case MQTTSessionManagerStateClosing: QXLOG(@"eventCode -- 关闭中"); - + [QXLogger infoWithTag:@"MQTT" format:@"关闭中"]; break; case MQTTSessionManagerStateStarting: QXLOG(@"eventCode -- 连接开始"); - + [QXLogger infoWithTag:@"MQTT" format:@"连接开始"]; break; default: diff --git a/QXLive/Manager/QXRoomMessageManager.m b/QXLive/Manager/QXRoomMessageManager.m index d61cb33..f602c41 100644 --- a/QXLive/Manager/QXRoomMessageManager.m +++ b/QXLive/Manager/QXRoomMessageManager.m @@ -323,6 +323,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:userId:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model userId:model.FromUserInfo.user_id]; } } @@ -335,6 +336,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:userId:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model userId:model.FromUserInfo.user_id]; } } @@ -347,6 +349,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:userId:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model userId:model.FromUserInfo.user_id]; } } @@ -359,6 +362,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:userId:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model userId:model.FromUserInfo.user_id]; } } @@ -401,6 +405,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:userId:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model userId:model.FromUserInfo.user_id]; } } @@ -416,6 +421,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model]; } } @@ -428,6 +434,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model]; } } @@ -448,6 +455,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model]; } } @@ -494,6 +502,7 @@ if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:userId:)]) { QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model userId:user_id]; } } @@ -563,6 +572,7 @@ QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; model.messageType = QXRoomChatMessageTypeGift; if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model]; } } @@ -584,6 +594,7 @@ if (model.step.intValue != 3) { if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model]; } } @@ -655,6 +666,7 @@ if (!model.is_pk) { // 非pk房间的消息插入公屏 model.messageType = QXRoomChatMessageTypeSystem; + model.isSuperRoom = isSuperRoom; [self.delegate didInsertMessge:model]; } } @@ -721,8 +733,10 @@ } break; case QXRoomMessageTypeCpJoinRoom:{ - QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; - [[QXGiftPlayerManager shareManager] displayCpEffectView:model]; + if (!isSuperRoom) { + QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; + [[QXGiftPlayerManager shareManager] displayCpEffectView:model]; + } } break; case QXRoomMessageTypeStartSign:{ diff --git a/QXLive/Message(音信)/Controller/QXChatViewController.h b/QXLive/Message(音信)/Controller/QXChatViewController.h index 16e5a4a..a1e5b6b 100644 --- a/QXLive/Message(音信)/Controller/QXChatViewController.h +++ b/QXLive/Message(音信)/Controller/QXChatViewController.h @@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @interface QXChatViewController : QXBaseViewController @property (nonatomic,strong)TUIChatConversationModel *data; +@property (nonatomic,assign)BOOL isServices; @end NS_ASSUME_NONNULL_END diff --git a/QXLive/Message(音信)/Controller/QXChatViewController.m b/QXLive/Message(音信)/Controller/QXChatViewController.m index 5858d8b..5a09a16 100644 --- a/QXLive/Message(音信)/Controller/QXChatViewController.m +++ b/QXLive/Message(音信)/Controller/QXChatViewController.m @@ -118,6 +118,7 @@ }else{ TUIC2CChatViewController *vc = [[TUIC2CChatViewController alloc] init]; + vc.isServices = self.isServices; [vc setConversationData:self.data]; // 把 TUIC2CChatViewController 添加到自己的 ViewController vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight); diff --git a/QXLive/Message(音信)/Controller/QXMessageViewController.m b/QXLive/Message(音信)/Controller/QXMessageViewController.m index d3c1b9f..dd91078 100644 --- a/QXLive/Message(音信)/Controller/QXMessageViewController.m +++ b/QXLive/Message(音信)/Controller/QXMessageViewController.m @@ -13,11 +13,14 @@ #import "QXSystemTopView.h" #import "QXSystemNoticeViewController.h" #import "QXMessageServices.h" +#import "AppDelegate.h" @interface QXMessageViewController () @property (nonatomic,strong)QXSystemTopView *topView; @property (nonatomic,strong)QXMessageModel *model; @property (nonatomic,strong)TUIConversationListController *vc; +@property (nonatomic,strong)NSString *service_user_id; +@property (nonatomic,strong)NSString *service_user_name; @end @implementation QXMessageViewController @@ -102,6 +105,11 @@ data.groupID = conversation.groupID; data.title = conversation.title; data.faceUrl = conversation.faceUrl; + if ([conversation.userID isEqualToString:[NSString stringWithFormat:@"u%@",self.service_user_id]]) { + vc.isServices = YES; + }else{ + vc.isServices = NO; + } vc.data = data; [self.vc.dataProvider markConversationAsRead:conversation]; [self.navigationController pushViewController:vc animated:YES]; @@ -117,6 +125,15 @@ [QXMessageServices getHomeMessageSuccessBlock:^(QXMessageModel * _Nonnull model) { weakSelf.model = model; weakSelf.topView.model = model; + AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; + delegate.tabbarVC.systemUnreadNumber = model.system_no_read_count.integerValue + model.announcement_read_count.integerValue; + } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { + + }]; + + [QXMessageServices getSerbviceUserSuccessBlock:^(NSString * _Nonnull user_id, NSString * _Nonnull user_name) { + weakSelf.service_user_id = user_id; + weakSelf.service_user_name = user_name; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { }]; @@ -137,7 +154,7 @@ -(QXSystemTopView *)topView{ if (!_topView) { - _topView = [[QXSystemTopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 74+8)]; + _topView = [[QXSystemTopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 74*2+8)]; _topView.delegate = self; } return _topView; diff --git a/QXLive/Message(音信)/Services/QXMessageServices.h b/QXLive/Message(音信)/Services/QXMessageServices.h index 52c19d6..e097e96 100644 --- a/QXLive/Message(音信)/Services/QXMessageServices.h +++ b/QXLive/Message(音信)/Services/QXMessageServices.h @@ -67,6 +67,12 @@ NS_ASSUME_NONNULL_BEGIN notice:(NSString*)notice successBlock:(void (^)(NSDictionary* dict))successBlock failBlock:(void (^)(NSError * error, NSString * msg))failBlock; + +/** + 获取平台客服 + */ ++(void)getSerbviceUserSuccessBlock:(void (^)(NSString * user_id , NSString * user_name))successBlock + failBlock:(void (^)(NSError * error, NSString * msg))failBlock; @end NS_ASSUME_NONNULL_END diff --git a/QXLive/Message(音信)/Services/QXMessageServices.m b/QXLive/Message(音信)/Services/QXMessageServices.m index 22da3d7..c9290e4 100644 --- a/QXLive/Message(音信)/Services/QXMessageServices.m +++ b/QXLive/Message(音信)/Services/QXMessageServices.m @@ -112,4 +112,18 @@ failBlock(error,msg); }]; } + ++(void)getSerbviceUserSuccessBlock:(void (^)(NSString * user_id , NSString * user_name))successBlock failBlock:(void (^)(NSError * error, NSString * msg))failBlock{ + [[QXRequset shareInstance] getWithUrl:QXRoomServicesUserId parameters:@{} needCache:NO success:^(id responseObject) { + if (successBlock) { + NSString *user_id = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"user_id"]]; + NSString *user_name = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"user_name"]]; + successBlock(user_id,user_name); + } + } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { + failBlock(error,msg); + }]; +} + + @end diff --git a/QXLive/Message(音信)/View/QXSystemTopView.m b/QXLive/Message(音信)/View/QXSystemTopView.m index 0ff7b70..6a7cdee 100644 --- a/QXLive/Message(音信)/View/QXSystemTopView.m +++ b/QXLive/Message(音信)/View/QXSystemTopView.m @@ -24,27 +24,17 @@ } -(void)initSubviews{ MJWeakSelf -// self.noticeView = [[QXSystemTopSubView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 74)]; -// self.noticeView.iconImageView.image = [UIImage imageNamed:@"notice_icon"]; -// self.noticeView.titleLabel.text = QXText(@"官方公告"); -// [self.noticeView addTapBlock:^(id _Nonnull obj) { -// if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickNoticeWithType:)]) { -// [weakSelf.delegate didClickNoticeWithType:0]; -// } -// }]; -// [self addSubview:self.noticeView]; + self.noticeView = [[QXSystemTopSubView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 74)]; + self.noticeView.iconImageView.image = [UIImage imageNamed:@"notice_icon"]; + self.noticeView.titleLabel.text = QXText(@"官方公告"); + [self.noticeView addTapBlock:^(id _Nonnull obj) { + if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickNoticeWithType:)]) { + [weakSelf.delegate didClickNoticeWithType:0]; + } + }]; + [self addSubview:self.noticeView]; -// self.systemView = [[QXSystemTopSubView alloc] initWithFrame:CGRectMake(0, 74, SCREEN_WIDTH, 74)]; -// self.systemView.iconImageView.image = [UIImage imageNamed:@"system_icon"]; -// self.systemView.titleLabel.text = QXText(@"系统消息"); -// [self addSubview:self.systemView]; -// [self.systemView addTapBlock:^(id _Nonnull obj) { -// if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickNoticeWithType:)]) { -// [weakSelf.delegate didClickNoticeWithType:1]; -// } -// }]; - - self.systemView = [[QXSystemTopSubView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 74)]; + self.systemView = [[QXSystemTopSubView alloc] initWithFrame:CGRectMake(0, 74, SCREEN_WIDTH, 74)]; self.systemView.iconImageView.image = [UIImage imageNamed:@"system_icon"]; self.systemView.titleLabel.text = QXText(@"系统消息"); [self addSubview:self.systemView]; @@ -54,6 +44,16 @@ } }]; +// self.systemView = [[QXSystemTopSubView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 74)]; +// self.systemView.iconImageView.image = [UIImage imageNamed:@"system_icon"]; +// self.systemView.titleLabel.text = QXText(@"系统消息"); +// [self addSubview:self.systemView]; +// [self.systemView addTapBlock:^(id _Nonnull obj) { +// if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickNoticeWithType:)]) { +// [weakSelf.delegate didClickNoticeWithType:1]; +// } +// }]; + self.bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, self.systemView.bottom, SCREEN_WIDTH, 8)]; // self.bottomView.backgroundColor = RGB16(0xececec); self.bottomView.backgroundColor = [UIColor clearColor]; diff --git a/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m b/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m index 7630a7f..698844e 100644 --- a/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m +++ b/QXLive/Mine(音域)/Controller/帮助反馈/QXHelpViewController.m @@ -111,10 +111,17 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; if([message.name isEqualToString:@"nativeHandler"]){ NSDictionary *dict = message.body; if ([dict[@"action"] isEqualToString:@"customerService"]) { - WXOpenCustomerServiceReq *req = [[WXOpenCustomerServiceReq alloc] init]; - req.corpid = @"ww1de4300858c0b461"; - req.url = @"https://work.weixin.qq.com/kfid/kfcb3d23a59c188a0e7"; - [WXApi sendReq:req completion:nil]; +// WXOpenCustomerServiceReq *req = [[WXOpenCustomerServiceReq alloc] init]; +// req.corpid = @"ww1de4300858c0b461"; +// req.url = @"https://work.weixin.qq.com/kfid/kfcb3d23a59c188a0e7"; +// [WXApi sendReq:req completion:nil]; + id object = dict[@"data"]; + if ([object isKindOfClass:[NSDictionary class]]) { + NSDictionary *dataDic = object; + NSString *userId = dataDic[@"user_id"]; + NSString *userName = dataDic[@"user_name"]; + [[QXGlobal shareGlobal] chatWithServices:userId nickname:userName avatar:@"" navagationController:self.navigationController]; + } }else if ([dict[@"action"] isEqualToString:@"closeWeb"]) { if (self.contentWebView.canGoBack) { [self.contentWebView goBack]; diff --git a/QXLive/Mine(音域)/Controller/我的房间/QXMyRoomViewController.m b/QXLive/Mine(音域)/Controller/我的房间/QXMyRoomViewController.m index fe4863e..c162a2e 100644 --- a/QXLive/Mine(音域)/Controller/我的房间/QXMyRoomViewController.m +++ b/QXLive/Mine(音域)/Controller/我的房间/QXMyRoomViewController.m @@ -72,10 +72,14 @@ self.categoryView.titleFont = [UIFont systemFontOfSize:12]; self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:16]; self.categoryView.averageCellSpacingEnabled = NO; - JXCategoryIndicatorImageView *indicatorView = [[JXCategoryIndicatorImageView alloc] init]; - indicatorView.indicatorImageView.image = [UIImage imageNamed:@"home_slider"]; - indicatorView.indicatorImageViewSize = CGSizeMake(58, 8); - indicatorView.verticalMargin = 11; +// JXCategoryIndicatorImageView *indicatorView = [[JXCategoryIndicatorImageView alloc] init]; +// indicatorView.indicatorImageView.image = [UIImage imageNamed:@"home_slider"]; +// indicatorView.indicatorImageViewSize = CGSizeMake(70, 8); +// indicatorView.verticalMargin = 11; +// self.categoryView.indicators = @[indicatorView]; + JXCategoryIndicatorLineView *indicatorView = [[JXCategoryIndicatorLineView alloc] init]; + indicatorView.indicatorWidth = 50; + indicatorView.indicatorColor = QXConfig.themeColor; self.categoryView.indicators = @[indicatorView]; self.containerView = [[JXCategoryListContainerView alloc] initWithType:(JXCategoryListContainerType_ScrollView) delegate:self]; self.containerView.frame = CGRectMake(0, self.categoryView.bottom, SCREEN_WIDTH, SCREEN_HEIGHT-self.categoryView.bottom); diff --git a/QXLive/Mine(音域)/Controller/设置/QXBindMobileViewController.m b/QXLive/Mine(音域)/Controller/设置/QXBindMobileViewController.m index bba466d..25b5706 100644 --- a/QXLive/Mine(音域)/Controller/设置/QXBindMobileViewController.m +++ b/QXLive/Mine(音域)/Controller/设置/QXBindMobileViewController.m @@ -97,6 +97,10 @@ } } -(void)didClickSendCode:(UIButton *)sender{ + GetSmscodeType type = GetSmscodeTypeFindBindMobile; + if (self.haveMobile) { + GetSmscodeType type = GetSmscodeTypeFindChangeMobile; + } if (sender == self.codeTextField.codeBtn) { sender.userInteractionEnabled = NO; if (self.accountTextField.textField.text.length < 11) { @@ -107,7 +111,6 @@ showToast(QXText(@"新手机号不能与旧手机号相同")); return; } - GetSmscodeType type = GetSmscodeTypeFindChangeMobile; MJWeakSelf self.isNetworking = YES; [QXLoginNetwork getSmscodeWithMobile:self.accountTextField.textField.text @@ -121,7 +124,6 @@ sender.userInteractionEnabled = YES; }]; }else{ - GetSmscodeType type = GetSmscodeTypeFindChangeMobile; NSString *oldMobile = [QXGlobal shareGlobal].loginModel.mobile; MJWeakSelf sender.userInteractionEnabled = NO; diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.h b/QXLive/Mine(音域)/Services/QXMineNetwork.h index 4df4f18..10f3a01 100644 --- a/QXLive/Mine(音域)/Services/QXMineNetwork.h +++ b/QXLive/Mine(音域)/Services/QXMineNetwork.h @@ -1587,6 +1587,7 @@ NS_ASSUME_NONNULL_BEGIN successBlock:(void (^)(NSArray* list))successBlock failBlock:(void (^)(NSError * error, NSString * msg))failBlock; + @end diff --git a/QXLive/Mine(音域)/View/个人主页/QXUserHomeHeaderView.m b/QXLive/Mine(音域)/View/个人主页/QXUserHomeHeaderView.m index 25ccadb..7040404 100644 --- a/QXLive/Mine(音域)/View/个人主页/QXUserHomeHeaderView.m +++ b/QXLive/Mine(音域)/View/个人主页/QXUserHomeHeaderView.m @@ -48,6 +48,7 @@ @property (nonatomic,strong) UIButton *followBtn; @property (nonatomic,strong) UIButton *playBtn; +@property (nonatomic,strong) UIButton *toRoomBtn; @property (nonatomic,strong) QXUserCpDressView *cpDressView; @property (nonatomic,strong) QXUserCpCardView *cpCardView; @@ -247,9 +248,9 @@ self.guildBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_home_guild_bg"]]; [self.whiteBgView addSubview:self.guildBgImageView]; [self.guildBgImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.mas_equalTo(-8); + make.left.equalTo(self.headerView.mas_right); make.height.mas_equalTo(31); - make.top.mas_equalTo(6); + make.bottom.equalTo(self.headerView).offset(-10); make.width.mas_equalTo(94); }]; @@ -281,18 +282,35 @@ // [self.playBtn setTitle:QXText(@"私信") forState:(UIControlStateNormal)]; // [self.playBtn setTitleColor:UIColor.whiteColor forState:(UIControlStateNormal)]; // self.playBtn.backgroundColor = RGB16(0x333333); - self.playBtn.hidden = YES; + self.playBtn.hidden = NO; + [self.playBtn setBackgroundImage:[UIImage imageNamed:@"expansion_call"] forState:(UIControlStateNormal)]; self.playBtn.titleLabel.font = [UIFont systemFontOfSize:14]; [self.playBtn addRoundedCornersWithRadius:12]; [self.playBtn addTarget:self action:@selector(playAction) forControlEvents:(UIControlEventTouchUpInside)]; [self.whiteBgView addSubview:self.playBtn]; [self.playBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.right.equalTo(self.guildBgImageView.mas_left).offset(-6); + make.right.mas_equalTo(-8); make.width.mas_equalTo(59); make.height.mas_equalTo(24); - make.centerY.equalTo(self.guildBgImageView).offset(-2); + make.top.equalTo(self.whiteBgView).offset(6); }]; + self.toRoomBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.playBtn.left-6-91, self.whiteBgView.top+10, 91, 24)]; +// [self.playBtn setTitle:QXText(@"私信") forState:(UIControlStateNormal)]; +// [self.playBtn setTitleColor:UIColor.whiteColor forState:(UIControlStateNormal)]; +// self.playBtn.backgroundColor = RGB16(0x333333); + self.toRoomBtn.hidden = YES; + [self.toRoomBtn setBackgroundImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)]; + self.toRoomBtn.titleLabel.font = [UIFont systemFontOfSize:14]; + [self.toRoomBtn addRoundedCornersWithRadius:12]; + [self.toRoomBtn addTarget:self action:@selector(roomAction) forControlEvents:(UIControlEventTouchUpInside)]; + [self.whiteBgView addSubview:self.toRoomBtn]; + [self.toRoomBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(self.playBtn.mas_left).offset(-6); + make.width.mas_equalTo(59); + make.height.mas_equalTo(24); + make.centerY.equalTo(self.playBtn); + }]; // self.nameLabel.text = @"张三"; // self.idLabel.text = @"313213213"; @@ -362,13 +380,15 @@ }]; } -(void)playAction{ + [[QXGlobal shareGlobal] chatWithUserID:self.model.user_id nickname:self.model.nickname avatar:self.model.avatar navagationController:self.navigationController]; +} + +-(void)roomAction{ if (self.model.room_id.intValue > 0) { // 去房间 [[QXGlobal shareGlobal] joinRoomWithRoomId:self.model.room_id isRejoin:NO navagationController:self.navigationController]; - }else{ - // 去聊天 - [[QXGlobal shareGlobal] chatWithUserID:self.model.user_id nickname:self.model.nickname avatar:self.model.avatar navagationController:self.navigationController]; } + } -(void)didClickHeaderViewUserId:(NSString*)userId{ if ([userId isEqualToString:self.userId]) { @@ -478,16 +498,19 @@ if ([model.user_id isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) { self.followBtn.hidden = YES; self.playBtn.hidden = YES; + self.toRoomBtn.hidden = YES; }else{ self.followBtn.hidden = NO; self.playBtn.hidden = NO; self.followBtn.selected = model.is_follow==0?NO:YES; if (model.room_id.intValue > 0) { // [self.playBtn setTitle:QXText(@"跟随") forState:(UIControlStateNormal)]; - [self.playBtn setBackgroundImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)]; +// [self.playBtn setBackgroundImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)]; + self.toRoomBtn.hidden = NO; }else{ // [self.playBtn setTitle:QXText(@"私信") forState:(UIControlStateNormal)]; - [self.playBtn setBackgroundImage:[UIImage imageNamed:@"expansion_call"] forState:(UIControlStateNormal)]; +// [self.playBtn setBackgroundImage:[UIImage imageNamed:@"expansion_call"] forState:(UIControlStateNormal)]; + self.toRoomBtn.hidden = YES; } } if ([model.guild_name isExist]) { diff --git a/QXLive/Mine(音域)/View/充值/QXRechargeView.m b/QXLive/Mine(音域)/View/充值/QXRechargeView.m index 3fe27df..1be5991 100644 --- a/QXLive/Mine(音域)/View/充值/QXRechargeView.m +++ b/QXLive/Mine(音域)/View/充值/QXRechargeView.m @@ -26,6 +26,8 @@ @property (nonatomic,strong)UITapGestureRecognizer *tap; @property (nonatomic,strong)NSMutableArray *rechargeDataArray; @property (nonatomic,strong)NSMutableArray *payTypeArray; +@property (nonatomic,strong)UIButton *selectedBtn; +@property (nonatomic,strong)UIButton *agreementBtn; @end @implementation QXRechargeView @@ -74,16 +76,54 @@ make.bottom.mas_equalTo(-kSafeAreaBottom); }]; + + self.agreementBtn = [[UIButton alloc] init]; + [self.agreementBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)]; + self.agreementBtn.titleLabel.font = [UIFont systemFontOfSize:12]; + NSString *s = @"我已阅读并同意《充值协议》"; + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:s]; + [attr yy_setColor:QXConfig.themeColor range:[s rangeOfString:@"《充值协议》"]]; + [self.agreementBtn addTarget:self action:@selector(agreementPreview) forControlEvents:(UIControlEventTouchUpInside)]; + [self.agreementBtn setAttributedTitle:attr forState:(UIControlStateNormal)]; + [self.bgView addSubview:self.agreementBtn]; + [self.agreementBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self.bgView).offset(15); + make.bottom.equalTo(self.rechargeBtn.mas_top).offset(-10); + make.height.mas_equalTo(20); + }]; + + self.selectedBtn = [[UIButton alloc] init]; + [self.selectedBtn setImage:[UIImage imageNamed:@"login_agreement_nor"] forState:(UIControlStateNormal)]; + [self.selectedBtn setImage:[UIImage imageNamed:@"login_agreement_sel"] forState:(UIControlStateSelected)]; + self.selectedBtn.selected = YES; + [self.selectedBtn addTarget:self action:@selector(agreeAction) forControlEvents:(UIControlEventTouchUpInside)]; + [self.bgView addSubview:self.selectedBtn]; + [self.selectedBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.width.mas_equalTo(30); + make.right.equalTo(self.agreementBtn.mas_left).offset(-5); + make.centerY.equalTo(self.agreementBtn); + }]; + [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { make.right.mas_equalTo(0); make.left.mas_equalTo(0); make.top.equalTo(self.bgView); - make.bottom.equalTo(self.rechargeBtn.mas_top).offset(-10); + make.bottom.equalTo(self.selectedBtn.mas_top).offset(-10); }]; [self getRechargeList]; } +-(void)agreeAction{ + self.selectedBtn.selected = !self.selectedBtn.selected; +} + +-(void)agreementPreview{ + QXBaseWebViewController*vc = [[QXBaseWebViewController alloc] init]; + vc.urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=37",QXGlobal.shareGlobal.currentServer]; + [KEYWINDOW.rootViewController presentViewController:vc animated:YES completion:nil]; +} + -(void)getRechargeList{ if (QXGlobal.shareGlobal.isAppStore) { @@ -312,6 +352,10 @@ -(void)rechargeAction:(UIButton*)sender{ + if (self.selectedBtn.selected == NO) { + showToast(@"我已阅读并同意充值协议"); + return; + } if (self.selectedModel == nil) { showToast(@"请选择充值金额"); return; diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt.png index cee5aee..071a7c0 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt@2x.png index f00dad3..145c065 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadApp_76pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt.png index 000f211..a1a4c5e 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt@2x.png index d0d0457..f1b60c3 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadNotification_20pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadProApp_83.5pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadProApp_83.5pt@2x.png index aef0bf4..9599bcd 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadProApp_83.5pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadProApp_83.5pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt.png index c071754..c3ca7d4 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt@2x.png index e5bffd3..a3b20c7 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight5_29pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt.png index d0d0457..f1b60c3 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt@2x.png index c5e3b8b..445a405 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPadSpootlight7_40pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@2x.png index 41f1fb6..758d15d 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@3x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@3x.png index d5d4c96..2e814a9 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@3x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneApp_60pt@3x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@2x.png index d0d0457..f1b60c3 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@3x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@3x.png index 6492c2f..834632c 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@3x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneNotification_20pt@3x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@2x.png index e5bffd3..a3b20c7 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@3x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@3x.png index 1c7da27..eb99c82 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@3x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight5_29pt@3x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@2x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@2x.png index c5e3b8b..445a405 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@2x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@2x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@3x.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@3x.png index 41f1fb6..758d15d 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@3x.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/iPhoneSpootlight7_40pt@3x.png differ diff --git a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/store_1024pt.png b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/store_1024pt.png index 16d5ff1..a17d3ff 100644 Binary files a/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/store_1024pt.png and b/QXLive/Other/Assets.xcassets/AppIconDev.appiconset/store_1024pt.png differ diff --git a/QXLive/Other/NoitceAndKey.h b/QXLive/Other/NoitceAndKey.h index c472d62..8e965ff 100644 --- a/QXLive/Other/NoitceAndKey.h +++ b/QXLive/Other/NoitceAndKey.h @@ -57,11 +57,13 @@ static NSString *const FaceAuthSecret = @"RqNCp7PoY77oJqVu9hFEDM0Ol2DNDQQQ97vy9C static NSString *const FaceAuthLicense = @"P6N+VYfdu1Op5p+QwUGdI4y64PqOnxMzChX2SWWvrXjKi5gSKTKYnksyPYGpdDoEiZGUuvidfW3fJx0DHobAmD/MMpCxdzRyvyn4Z0d7Ccno6TEO2eigEbAOL4rrM8xZHE6+POuORUrmDjRR7yKwT6yVJoMa96ULUZ54tAHY5TAMBPhZad80QU40PM+28QcOtufSd6QQwyKyjM/vCo8gnR8v9lTewz7y7GWkISVoymwW8BQMIkvWEXiGoi6u3mCuj2gn7cwGcb2HCXvM0EIzSLgKSwMFrIKYVmbEQ0ZIwUqCAk7IJv5V2VyGPUc1VIli0lWWPhwaL+1kVhpPytiK5A=="; /// 腾讯IM -static NSInteger const TencentIMID = 1600096860; +//static NSInteger const TencentIMID = 1600096860; +static NSInteger const TencentIMID = 1600096890; static NSString *const TencentIMSecret = @"d9a5b8088ed39113d0c92ae434bc37528c4715c1f1d2eaedb172134eacd06103"; //static NSString *const AddressOfMQTTServer = @"1.13.20.30"; -static NSString *const AddressOfMQTTServer = @"yushengapi.qxyushen.top"; +//static NSString *const AddressOfMQTTServer = @"yushengapi.qxyushen.top"; +static NSString *const AddressOfMQTTServer = @"vsyusheng.qxhs.xyz"; static NSString *const RAddressOfMQTTServer = @"qixinghuishen.qxhs.xyz"; static NSInteger const AddressOfMQTTPort = 1883; diff --git a/QXLive/Other/QXApi.h b/QXLive/Other/QXApi.h index 81b8198..49df7e4 100644 --- a/QXLive/Other/QXApi.h +++ b/QXLive/Other/QXApi.h @@ -27,10 +27,10 @@ static NSString* RH5ServerUrl = @"https://test.vespa.qxyushen.top/h5/"; //static NSString* H5ServerUrl = @"https://test.vespa.qxyushen.top/h5/"; //static NSString* ServerUrl = @"https://vespa.qxyushen.top/"; //static NSString* H5ServerUrl = @"https://vespa.qxyushen.top/h5/"; -//static NSString* ServerUrl = @"https://vsyusheng.qxhs.xyz/"; -//static NSString* H5ServerUrl = @"https://vsyusheng.qxhs.xyz/h5/"; -static NSString* ServerUrl = @"https://yushengapi.qxyushen.top/"; -static NSString* H5ServerUrl = @"https://yushengapi.qxyushen.top/h5/"; +static NSString* ServerUrl = @"https://vsyusheng.qxhs.xyz/"; +static NSString* H5ServerUrl = @"https://vsyusheng.qxhs.xyz/h5/"; +//static NSString* ServerUrl = @"https://yushengapi.qxyushen.top/"; +//static NSString* H5ServerUrl = @"https://yushengapi.qxyushen.top/h5/"; static NSString* RServerUrl = @"https://details.qxhs.xyz/"; static NSString* RH5ServerUrl = @"https://details.qxhs.xyz/h5/"; #endif @@ -624,4 +624,6 @@ static NSString * QXRoomBarSeduction = @"api/BarRoom/liao_ta"; static NSString * QXRoomBarAsk = @"api/BarRoom/meeting_ta"; /// 小黑屋列表 static NSString * QXRoomBarCabinRoomList = @"api/BarRoom/black_room_list"; +/// 获取平台客服id +static NSString * QXRoomServicesUserId = @"api/banner/app_customer_service"; #endif /* Api_h */ diff --git a/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.h b/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.h index 99f3ab9..e10a484 100644 --- a/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.h +++ b/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface QXRoomViewController (Bar) - +-(void)createCoinView; @end NS_ASSUME_NONNULL_END diff --git a/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.m b/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.m index e2e893a..08ad211 100644 --- a/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.m +++ b/QXLive/Room(房间)/Controller/QXRoomViewController+Bar.m @@ -6,8 +6,74 @@ // #import "QXRoomViewController+Bar.h" - +#import "QXRechargeViewcController.h" +#import "QXMineNetwork.h" @implementation QXRoomViewController (Bar) + +-(void)createCoinView{ + self.coinView = [[UIView alloc] init]; + self.coinView.backgroundColor = RGB16A(0x000000, 0.4); + [self.view addSubview:self.coinView]; + [self.coinView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(self.bottomView.mas_top).offset(-20); + make.right.mas_equalTo(-5); + make.width.mas_equalTo(100); + make.height.mas_equalTo(50); + }]; + [self.coinView addRoundedCornersWithRadius:5]; + + self.coinImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wallet_corn"]]; + [self.coinView addSubview:self.coinImageView]; + [self.coinImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(5); + make.height.width.mas_equalTo(25); + make.centerY.equalTo(self.coinView); + }]; + + + self.coinLabel = [[UILabel alloc] init]; + self.coinLabel.textColor = RGB16(0xffffff); + self.coinLabel.text = @"0"; + self.coinLabel.textAlignment = NSTextAlignmentCenter; + self.coinLabel.font = [UIFont systemFontOfSize:10]; + [self.coinView addSubview:self.coinLabel]; + [self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.coinImageView.mas_right).offset(2); + make.right.equalTo(self.coinView.mas_right).offset(-5); + make.top.equalTo(self.coinView).offset(10); + }]; + + self.rechargeBtn = [[UIButton alloc] init]; + [self.rechargeBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)]; + [self.rechargeBtn setTitle:@"充值" forState:(UIControlStateNormal)]; + self.rechargeBtn.titleLabel.font = [UIFont systemFontOfSize:12]; + [self.coinView addSubview:self.rechargeBtn]; + [self.rechargeBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.coinLabel); + make.right.equalTo(self.coinView).offset(-5); + make.bottom.equalTo(self.coinView).offset(-5); + make.height.mas_equalTo(20); + }]; + + UIButton *button = [[UIButton alloc] init]; + [button addTarget:self action:@selector(rechargeAction) forControlEvents:(UIControlEventTouchUpInside)];; + [self.coinView addSubview:button]; + [button mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.coinView); + }]; + MJWeakSelf + [QXMineNetwork getWalletInfoSuccessBlock:^(NSString * _Nonnull coin, NSString * _Nonnull earnings, NSString * _Nonnull title, NSString * _Nonnull url) { + weakSelf.coinLabel.text = coin; + } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { + + }]; +} + +-(void)rechargeAction{ + QXRechargeViewcController *vc = [[QXRechargeViewcController alloc] init]; + [self.navigationController pushViewController:vc animated:YES]; +} + -(void)barRoomSeductionEffectWithModel:(QXRoomChatListModel*)model{ [self.seatContentView barRoomSeductionEffectWithModel:model]; } diff --git a/QXLive/Room(房间)/Controller/QXRoomViewController.h b/QXLive/Room(房间)/Controller/QXRoomViewController.h index 3797f56..1b9ddcb 100644 --- a/QXLive/Room(房间)/Controller/QXRoomViewController.h +++ b/QXLive/Room(房间)/Controller/QXRoomViewController.h @@ -63,6 +63,12 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,strong)QXMeetActivityView *meetView; /// 任务待领取数量 @property (nonatomic,strong)NSString *taskWaitDrawNum; + +@property (nonatomic,strong)UIView *coinView; +@property (nonatomic,strong)UIImageView *coinImageView; +@property (nonatomic,strong)UILabel *coinLabel; +@property (nonatomic,strong)UIButton *rechargeBtn; + -(void)configBottomTools; -(void)stopHWDMP4; -(void)playHWDMP4; diff --git a/QXLive/Room(房间)/Controller/QXRoomViewController.m b/QXLive/Room(房间)/Controller/QXRoomViewController.m index 0608bca..c51b5d9 100644 --- a/QXLive/Room(房间)/Controller/QXRoomViewController.m +++ b/QXLive/Room(房间)/Controller/QXRoomViewController.m @@ -41,6 +41,7 @@ #import "QXRoomViewController+Singer.h" #import "QXRoomViewController+Sign.h" #import "QXDrifNobilityJoinRoomView.h" +#import "QXRoomViewController+Bar.h" @interface QXRoomViewController ()< QXRoomBottomViewDelegate, @@ -479,6 +480,7 @@ QXUpSeatViewDelegate make.top.equalTo(self.seatContentView.mas_bottom); make.width.mas_equalTo(ScaleWidth(280)); }]; + [self createCoinView]; }else{ self.bottomView.isCabinRoom = YES; //小黑屋 diff --git a/QXLive/Room(房间)/View/PK/QXRoomPKSetView.m b/QXLive/Room(房间)/View/PK/QXRoomPKSetView.m index e882f57..4f30f5d 100644 --- a/QXLive/Room(房间)/View/PK/QXRoomPKSetView.m +++ b/QXLive/Room(房间)/View/PK/QXRoomPKSetView.m @@ -120,7 +120,7 @@ // [self.eventSwitch setOn:self.isOn animated:YES]; // }]; // - [QXMineNetwork noAgreePKInvite:isOn?@"1":@"2" room_id:self.roomId successBlock:^(NSString * _Nonnull token) { + [QXMineNetwork noAgreePKInvite:isOn?@"2":@"1" room_id:self.roomId successBlock:^(NSString * _Nonnull token) { if (isOn) { [sender setOn:YES animated:YES]; }else{ diff --git a/QXLive/Room(房间)/View/QXRoomTitleView.m b/QXLive/Room(房间)/View/QXRoomTitleView.m index 87d0b5e..dc445d2 100644 --- a/QXLive/Room(房间)/View/QXRoomTitleView.m +++ b/QXLive/Room(房间)/View/QXRoomTitleView.m @@ -381,6 +381,7 @@ -(void)cabinAction{ QXRoomBarCabinListView *cabinListView = [[QXRoomBarCabinListView alloc] init]; + cabinListView.roomId = self.roomModel.room_info.room_id; [cabinListView showInView:self.viewController.view]; } diff --git a/QXLive/Room(房间)/View/拍卖房/QXSelectAuctionInfoView.m b/QXLive/Room(房间)/View/拍卖房/QXSelectAuctionInfoView.m index 10b06a2..09ad6e8 100644 --- a/QXLive/Room(房间)/View/拍卖房/QXSelectAuctionInfoView.m +++ b/QXLive/Room(房间)/View/拍卖房/QXSelectAuctionInfoView.m @@ -422,7 +422,7 @@ -(void)setTimeModel:(QXRoomRelationModel *)timeModel{ _timeModel = timeModel; [self.selectedBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateSelected)]; - [self.selectedBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)]; + [self.selectedBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)]; [self.selectedBtn setTitle:timeModel.name forState:(UIControlStateNormal)]; self.selectedBtn.layer.borderColor = RGB16(0xF1F2F3).CGColor; self.selectedBtn.layer.borderWidth = 1; diff --git a/QXLive/Room(房间)/View/礼物特效/QXGiftDisplayManager.m b/QXLive/Room(房间)/View/礼物特效/QXGiftDisplayManager.m index fa50e05..76b89b3 100644 --- a/QXLive/Room(房间)/View/礼物特效/QXGiftDisplayManager.m +++ b/QXLive/Room(房间)/View/礼物特效/QXGiftDisplayManager.m @@ -55,7 +55,7 @@ CGFloat viewHeight = 40; CGFloat spacing = 10; - CGFloat topMargin = 400; + CGFloat topMargin = 460; CGFloat width = 290; for (int i = 0; i < 3; i++) { diff --git a/QXLive/Room(房间)/View/设置/QXDirectSetScaleView.m b/QXLive/Room(房间)/View/设置/QXDirectSetScaleView.m index 2faa2a7..afe33ca 100644 --- a/QXLive/Room(房间)/View/设置/QXDirectSetScaleView.m +++ b/QXLive/Room(房间)/View/设置/QXDirectSetScaleView.m @@ -169,7 +169,7 @@ showToast(@"抢头条成功"); [weakSelf hide]; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - [weakSelf hide]; +// [weakSelf hide]; showToast(msg); }]; }else{ diff --git a/QXLive/Room(房间)/View/酒吧房/QXRoomBarCabinListView.m b/QXLive/Room(房间)/View/酒吧房/QXRoomBarCabinListView.m index 50310e4..9441333 100644 --- a/QXLive/Room(房间)/View/酒吧房/QXRoomBarCabinListView.m +++ b/QXLive/Room(房间)/View/酒吧房/QXRoomBarCabinListView.m @@ -89,7 +89,9 @@ }]; } - +-(void)setRoomId:(NSString *)roomId{ + _roomId = roomId; +} -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ diff --git a/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.h b/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.h index 17a0d8a..9875f6e 100644 --- a/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.h +++ b/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.h @@ -6,15 +6,22 @@ // #import - +typedef NS_ENUM(NSInteger) { + /// 撩他 + QXSeductionAlertTypeSeduction = 0, + /// 小黑屋送礼物 + QXSeductionAlertTypeSendGift = 1, +}QXSeductionAlertType; NS_ASSUME_NONNULL_BEGIN @interface QXSeductionAlertView : UIView -@property (nonatomic,copy)void(^commitBlock)(void); +@property (nonatomic,copy)void(^commitBlock)(BOOL isNoAlert); @property (nonatomic,copy)void(^cancelBlock)(void); @property (nonatomic,strong)QXRoomPitModel *pitModel; +@property (nonatomic,strong)QXGiftModel *giftModel; @property (nonatomic,strong)NSString *sexy_coin; @property (nonatomic,strong)NSString *roomId; +@property (nonatomic,assign)QXSeductionAlertType alertType; -(void)showInView:(UIView *)view; -(void)hide; diff --git a/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.m b/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.m index 0715923..237c781 100644 --- a/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.m +++ b/QXLive/Room(房间)/View/酒吧房/QXSeductionAlertView.m @@ -123,13 +123,47 @@ [attr yy_setColor:QXConfig.themeColor range:[str rangeOfString:self.sexy_coin]]; self.messageLabel.attributedText = attr; } - +- (void)setGiftModel:(QXGiftModel *)giftModel{ + _giftModel = giftModel; + NSString *str = [NSString stringWithFormat:@"将送出 %@ 需要消费 %@个 金币。",giftModel.gift_name,giftModel.gift_price]; + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:str]; + [attr yy_setColor:QXConfig.themeColor range:[str rangeOfString:giftModel.gift_name]]; + [attr yy_setColor:QXConfig.themeColor range:[str rangeOfString:giftModel.gift_price]]; + self.messageLabel.attributedText = attr; +} -(void)noShowAction{ self.noShowBtn.selected = !self.noShowBtn.selected; - [[NSUserDefaults standardUserDefaults] setBool:self.noShowBtn.isSelected forKey:kIsCloseSeductionAlert]; - [[NSUserDefaults standardUserDefaults] synchronize]; + switch (self.alertType) { + case QXSeductionAlertTypeSeduction:{ + [[NSUserDefaults standardUserDefaults] setBool:self.noShowBtn.isSelected forKey:kIsCloseSeductionAlert]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } + break; + case QXSeductionAlertTypeSendGift:{ + } + break; + default: + break; + } + + } +-(void)setAlertType:(QXSeductionAlertType)alertType{ + _alertType = alertType; + switch (alertType) { + case QXSeductionAlertTypeSeduction:{ + [self.noShowBtn setTitle:@" 以后不再提示" forState:(UIControlStateNormal)]; + } + break; + case QXSeductionAlertTypeSendGift:{ + [self.noShowBtn setTitle:@" 此交友小屋以后不再提示" forState:(UIControlStateNormal)]; + } + break; + default: + break; + } +} -(void)cancelAction{ @@ -140,14 +174,26 @@ } -(void)commitAction{ if (self.commitBlock) { - self.commitBlock(); + self.commitBlock(self.noShowBtn.selected); + } + switch (self.alertType) { + case QXSeductionAlertTypeSeduction:{ + [QXMineNetwork roomSeductionWithRoomId:self.roomId to_user_id:self.pitModel.user_id type:@"1" successBlock:^(NSDictionary * _Nonnull dict) { + + } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { + showToast(msg); + }]; + } + break; + case QXSeductionAlertTypeSendGift:{ + + } + break; + default: + break; } [self hide]; - [QXMineNetwork roomSeductionWithRoomId:self.roomId to_user_id:self.pitModel.user_id type:@"1" successBlock:^(NSDictionary * _Nonnull dict) { - - } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { - showToast(msg); - }]; + } -(void)showInView:(UIView *)view{ diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarCabinView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarCabinView.m index c3853d9..477b795 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarCabinView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarCabinView.m @@ -9,6 +9,7 @@ #import "QXMineNetwork.h" #import "UIView+FloatingAnimation.h" #import "QXAgoraEngine.h" +#import "QXSeductionAlertView.h" @class QXRoomSeatBarCabinGiftView; @interface QXRoomSeatBarCabinView() //倒计时 @@ -46,6 +47,8 @@ @property (nonatomic,strong)QXTimer *timer; @property (nonatomic,assign)long startTime; +@property (nonatomic,assign)BOOL isNoAlert; + @end @implementation QXRoomSeatBarCabinView @@ -58,6 +61,7 @@ return self; } -(void)initSubviews{ + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(rechargeSuccess) name:noticeAlipayResult object:nil]; self.titleLabel = [[UILabel alloc] init]; self.titleLabel.text = @"房间名称"; self.titleLabel.font = [UIFont systemFontOfSize:14]; @@ -205,6 +209,9 @@ // self.audioBtn.tag = 21; // [self.audioBtn setImage:[UIImage imageNamed:@"room_event_mute_audio_nor"] forState:(UIControlStateNormal)]; // [self.audioBtn setImage:[UIImage imageNamed:@"room_event_mute_audio_sel"] forState:(UIControlStateSelected)]; + + + } -(void)setRoomModel:(QXRoomModel *)roomModel{ @@ -243,6 +250,10 @@ [self getGiftList]; } +-(void)rechargeSuccess{ + [self getWallet]; +} + -(void)getGiftList{ MJWeakSelf // [QXMineNetwork giftListWithLabel:@"99" roomId:self.roomModel.room_info.room_id successBlock:^(NSArray * _Nonnull list) { @@ -277,14 +288,36 @@ } -(void)didSendGiftWithGiftModel:(QXGiftModel *)giftModel giftView:(QXRoomSeatBarCabinGiftView *)giftView{ + if (self.isNoAlert) { + [self sendGiftNetWorkWithGiftModel:giftModel giftView:giftView]; + }else{ + QXSeductionAlertView *seductionView = [[QXSeductionAlertView alloc] init]; + seductionView.alertType = QXSeductionAlertTypeSendGift; + seductionView.roomId = self.roomModel.room_info.room_id; + seductionView.giftModel = giftModel; + [seductionView showInView:self.viewController.view]; + __weak typeof(self) weakSelf = self; + seductionView.commitBlock = ^(BOOL isNoAlert) { + __strong typeof(weakSelf) strongSelf = weakSelf; + if (!strongSelf) return; + strongSelf.isNoAlert = isNoAlert; + [strongSelf sendGiftNetWorkWithGiftModel:giftModel giftView:giftView]; + }; + + } +} +-(void)sendGiftNetWorkWithGiftModel:(QXGiftModel*)giftModel giftView:(QXRoomSeatBarCabinGiftView *)giftView{ NSString *to_uid = @""; if ([self.roomModel.cp_user.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { to_uid = self.roomModel.cp_user.user_id1; }else{ to_uid = self.roomModel.cp_user.user_id; } + __weak typeof(self) weakSelf = self; [QXMineNetwork roomSendGiftWithRoomId:self.roomModel.room_info.room_id gift_id:giftModel.gift_id gift_num:@"1" to_uid:to_uid heart_id:@"" type:@"1" pit_number:@"" gift_bag_id:giftModel.gift_bag successBlock:^(NSDictionary * _Nonnull dict) { - + __strong typeof(weakSelf) strongSelf = weakSelf; + if (!strongSelf) return; + [strongSelf getWallet]; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { showToast(msg); }]; @@ -295,6 +328,17 @@ [self giftViewShow:giftView]; }]; } +-(void)getWallet{ + __weak typeof(self) weakSelf = self; + [QXMineNetwork getWalletInfoSuccessBlock:^(NSString * _Nonnull coin, NSString * _Nonnull earnings, NSString * _Nonnull title, NSString * _Nonnull url) { + __strong typeof(weakSelf) strongSelf = weakSelf; + if (!strongSelf) return; + QXRoomViewController *vc = (QXRoomViewController *)strongSelf.viewController; + vc.coinLabel.text = coin; + } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { + + }]; +} -(void)giftViewShow:(QXRoomSeatBarCabinGiftView*)giftView{ QXGiftModel *gift = [self randomResultGift]; @@ -420,6 +464,7 @@ _rightSeatView = nil; } [self stopTimer]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; } -(NSMutableArray *)dataArray{ if (!_dataArray) { diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarView.m index 8e2b657..e94cbff 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatBarView.m @@ -296,18 +296,17 @@ -(void)everyOneFollowMe{ NSInteger count = 0; - for (int i = 0 ; i < self.seatArray.count;i++) { + for (int i = 0 ; i < 6;i++) { id object = self.seatArray[i]; if ([object isKindOfClass:[QXRoomSeatContentView class] ]) { - QXRoomSeatContentView *contentView = (QXRoomSeatContentView*)object; - if (contentView.pitModel.user_id.longLongValue > 0 && ![contentView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { - count++; - } +// QXRoomSeatContentView *contentView = (QXRoomSeatContentView*)object; +// if (contentView.pitModel.user_id.longLongValue > 0 && ![contentView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { +// } continue; } if ([object isKindOfClass:[QXRoomSeatBarSeatView class] ]) { QXRoomSeatBarSeatView *contentView = (QXRoomSeatBarSeatView*)object; - if (contentView.pitModel.user_id.longLongValue > 0 && ![contentView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { + if (contentView.contentView.pitModel.user_id.longLongValue > 0 && ![contentView.contentView.pitModel.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { count++; } continue; @@ -368,6 +367,7 @@ }]; }else{ QXSeductionAlertView *seductionView = [[QXSeductionAlertView alloc] init]; + seductionView.alertType = QXSeductionAlertTypeSeduction; seductionView.roomId = self.roomModel.room_info.room_id; seductionView.sexy_coin = self.roomModel.room_info.sexy_coin; seductionView.pitModel = pitModel; @@ -1042,14 +1042,15 @@ -(void)playSeductionEffectWithPlayImage:(NSString *)playImage isMute:(BOOL)isMute{ MJWeakSelf if ([playImage hasPrefix:@"http"] || [playImage hasPrefix:@"https"]) { + [weakSelf.mp4View stopHWDMP4]; [[QXRequset shareInstance] downloadVideoPlayerWithUrl:playImage completion:^(BOOL result, NSString * _Nonnull fileName) { NSString *videoPath = [QXFileManager getGiftVideoPath:playImage.lastPathComponent]; weakSelf.mp4View.hidden = NO; + [weakSelf.mp4View setMute:isMute]; [weakSelf.mp4View playHWDMP4:videoPath repeatCount:1 delegate:self]; }]; // self.mp4View.hidden = NO; // NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"zizi" ofType:@"mp4"]; -// [self.mp4View setMute:isMute]; // [self.mp4View playHWDMP4:videoPath repeatCount:1 delegate:self]; } diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m index 97bfc4e..586099c 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatContentView.m @@ -81,7 +81,7 @@ make.height.equalTo(self.noUserImageView.mas_width); }]; - [self insertSubview:self.micSvgaView belowSubview:self.headerView]; + [self insertSubview:self.micSvgaView aboveSubview:self.headerView]; [self.micSvgaView mas_remakeConstraints:^(MASConstraintMaker *make) { make.left.top.equalTo(self.headerView).offset(-10); make.right.bottom.equalTo(self.headerView).offset(10); diff --git a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSongView.m b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSongView.m index a9f1c9b..d558300 100644 --- a/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSongView.m +++ b/QXLive/Room(房间)/View/麦位视图/QXRoomSeatTypeSongView.m @@ -643,6 +643,7 @@ QXRoomSeatDelegate QXRoomPitModel *model = self.dataArray[indexPath.row]; cell.seatContentView.pitModel = model; cell.seatContentView.delegate = self; + [cell.seatContentView stopAudioAnimation]; return cell; } -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ diff --git a/QXLive/Tabbar/飘屏/QXGiftDriftView.m b/QXLive/Tabbar/飘屏/QXGiftDriftView.m index 8807233..5917165 100644 --- a/QXLive/Tabbar/飘屏/QXGiftDriftView.m +++ b/QXLive/Tabbar/飘屏/QXGiftDriftView.m @@ -81,6 +81,9 @@ [self giftAction]; } -(void)addGiftModelList:(NSArray *)list{ + if (self.isClose) { + return; + } [self.dataArray addObjectsFromArray:list]; [self giftAction]; } diff --git a/QXLive/Tools/COS/QXCOSUploadManager.m b/QXLive/Tools/COS/QXCOSUploadManager.m index afc89a6..77df219 100644 --- a/QXLive/Tools/COS/QXCOSUploadManager.m +++ b/QXLive/Tools/COS/QXCOSUploadManager.m @@ -94,7 +94,9 @@ } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { - + if (complete) { + complete(msg,QXCOSUploadImageFailed); + } }]; } @@ -165,7 +167,9 @@ } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { - + if (complete) { + complete(msg,QXCOSUploadImageFailed); + } }]; } @@ -262,7 +266,9 @@ } } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { - + if (complete) { + complete(msg,QXCOSUploadImageFailed); + } }]; } @@ -347,7 +353,9 @@ } } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { - + if (complete) { + complete(msg,QXCOSUploadImageFailed); + } }]; } - (NSString *)currentDate { diff --git a/QXLive/活动/天空之境/QXSkyPraizeView.m b/QXLive/活动/天空之境/QXSkyPraizeView.m index a1da8a8..a0d6b34 100644 --- a/QXLive/活动/天空之境/QXSkyPraizeView.m +++ b/QXLive/活动/天空之境/QXSkyPraizeView.m @@ -454,9 +454,11 @@ static NSInteger toSlowCount = 4; if (self.isOpenSpecial) { NSString *path = [[NSBundle mainBundle] pathForResource:@"draw_music" ofType:@"mp3"]; _player = [[AVPlayer alloc] initWithURL:[NSURL fileURLWithPath:path]]; + _player.volume = 0.2; }else{ NSString *path = [[NSBundle mainBundle] pathForResource:@"no_animate_draw_music" ofType:@"mp3"]; _player = [[AVPlayer alloc] initWithURL:[NSURL fileURLWithPath:path]]; + _player.volume = 0.2; } } -(void)soundAction:(UIButton*)sender{ @@ -465,9 +467,11 @@ static NSInteger toSlowCount = 4; if (self.isOpenSpecial) { NSString *path = [[NSBundle mainBundle] pathForResource:@"draw_music" ofType:@"mp3"]; _player = [[AVPlayer alloc] initWithURL:[NSURL fileURLWithPath:path]]; + _player.volume = 0.2; }else{ NSString *path = [[NSBundle mainBundle] pathForResource:@"no_animate_draw_music" ofType:@"mp3"]; _player = [[AVPlayer alloc] initWithURL:[NSURL fileURLWithPath:path]]; + _player.volume = 0.2; } } -(void)startAction:(QXSkyDrawBtn*)sender{ @@ -542,6 +546,7 @@ static NSInteger toSlowCount = 4; 0.01 * NSEC_PER_SEC); if (self.isOpenSound) { [self.player seekToTime:CMTimeMake(0, 1)]; + self.player.volume = 0.2; [self.player play]; } __weak typeof(self) weakSelf = self; @@ -606,9 +611,9 @@ static NSInteger toSlowCount = 4; for (NSNumber *index in targetArrayIndex) { if (newCurrentIndex == index.integerValue) { QXSkyPraizeSubView *targetGiftView = strongSelfInMain.allViewsArray[index.integerValue]; - targetGiftView.isSelected = YES; +// targetGiftView.isSelected = YES; targetGiftView.resultView.hidden = NO; - [targetGiftView startPulseAnimationWithLayer]; +// [targetGiftView startPulseAnimationWithLayer]; // 在主线程安全地修改数组 [strongSelfInMain.targetArrayIndex removeObject:index]; @@ -626,6 +631,11 @@ static NSInteger toSlowCount = 4; strongSelfInMain.isDrawing = NO; [strongSelfInMain stopFastAnimate]; [strongSelfInMain animateFinishedSendGift]; + for (NSNumber *index in strongSelfInMain.finishTargetArrayIndex) { + QXSkyPraizeSubView *targetGiftView = strongSelfInMain.allViewsArray[index.integerValue]; + targetGiftView.isSelected = YES; + [targetGiftView startPulseAnimationWithLayer]; + } } } else { // 使用局部变量避免频繁访问属性 @@ -722,6 +732,7 @@ static NSInteger toSlowCount = 4; if (!_player) { NSString *path = [[NSBundle mainBundle] pathForResource:@"draw_music" ofType:@"mp3"]; _player = [[AVPlayer alloc] initWithURL:[NSURL fileURLWithPath:path]]; + _player.volume = 0.2; } return _player; } @@ -882,6 +893,7 @@ static NSInteger toSlowCount = 4; } - (void)startPulseAnimationWithLayer { + [self setIsSelected:YES]; CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; pulseAnimation.duration = 0.5; pulseAnimation.fromValue = @0.9; diff --git a/QXLive/活动/岁月之城/QXAgePraizeView.m b/QXLive/活动/岁月之城/QXAgePraizeView.m index 6f4cd95..ffcc481 100644 --- a/QXLive/活动/岁月之城/QXAgePraizeView.m +++ b/QXLive/活动/岁月之城/QXAgePraizeView.m @@ -546,6 +546,7 @@ static NSInteger toSlowCount = 4; 0.01 * NSEC_PER_SEC); if (self.isOpenSound) { [self.player seekToTime:CMTimeMake(0, 1)]; + _player.volume = 0.2; [self.player play]; } __weak typeof(self) weakSelf = self; @@ -607,9 +608,9 @@ static NSInteger toSlowCount = 4; for (NSNumber *index in targetArrayIndex) { if (newCurrentIndex == index.integerValue) { QXAgePraizeSubView *targetGiftView = strongSelfInMain.allViewsArray[index.integerValue]; - targetGiftView.isSelected = YES; +// targetGiftView.isSelected = YES; targetGiftView.resultView.hidden = NO; - [targetGiftView startPulseAnimationWithLayer]; +// [targetGiftView startPulseAnimationWithLayer]; // 在主线程安全地修改数组 [strongSelfInMain.targetArrayIndex removeObject:index]; @@ -627,6 +628,11 @@ static NSInteger toSlowCount = 4; strongSelfInMain.isDrawing = NO; [strongSelfInMain stopFastAnimate]; [strongSelfInMain animateFinishedSendGift]; + for (NSNumber *index in strongSelfInMain.finishTargetArrayIndex) { + QXSkyPraizeSubView *targetGiftView = strongSelfInMain.allViewsArray[index.integerValue]; + targetGiftView.isSelected = YES; + [targetGiftView startPulseAnimationWithLayer]; + } } } else { // 使用局部变量避免频繁访问属性 @@ -711,6 +717,7 @@ static NSInteger toSlowCount = 4; if (!_player) { NSString *path = [[NSBundle mainBundle] pathForResource:@"draw_music" ofType:@"mp3"]; _player = [[AVPlayer alloc] initWithURL:[NSURL fileURLWithPath:path]]; + _player.volume = 0.2; } return _player; } diff --git a/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@2x.png b/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@2x.png index fd67233..8aed00e 100644 Binary files a/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@2x.png and b/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@2x.png differ diff --git a/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@3x.png b/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@3x.png index f6a4789..eb2b046 100644 Binary files a/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@3x.png and b/QXLive/活动/巡乐会/Resource/ac_meet_in_bag@3x.png differ diff --git a/QXLive/活动/时空之巅/QXTimePraizeView.m b/QXLive/活动/时空之巅/QXTimePraizeView.m index 9160597..1eede12 100644 --- a/QXLive/活动/时空之巅/QXTimePraizeView.m +++ b/QXLive/活动/时空之巅/QXTimePraizeView.m @@ -553,6 +553,7 @@ static NSInteger toSlowCount = 4; 0.01 * NSEC_PER_SEC); if (self.isOpenSound) { [self.player seekToTime:CMTimeMake(0, 1)]; + _player.volume = 0.2; [self.player play]; } __weak typeof(self) weakSelf = self; @@ -614,9 +615,9 @@ static NSInteger toSlowCount = 4; for (NSNumber *index in targetArrayIndex) { if (newCurrentIndex == index.integerValue) { QXTimePraizeSubView *targetGiftView = strongSelfInMain.allViewsArray[index.integerValue]; - targetGiftView.isSelected = YES; +// targetGiftView.isSelected = YES; targetGiftView.resultView.hidden = NO; - [targetGiftView startPulseAnimationWithLayer]; +// [targetGiftView startPulseAnimationWithLayer]; // 在主线程安全地修改数组 [strongSelfInMain.targetArrayIndex removeObject:index]; @@ -634,6 +635,11 @@ static NSInteger toSlowCount = 4; strongSelfInMain.isDrawing = NO; [strongSelfInMain stopFastAnimate]; [strongSelfInMain animateFinishedSendGift]; + for (NSNumber *index in strongSelfInMain.finishTargetArrayIndex) { + QXSkyPraizeSubView *targetGiftView = strongSelfInMain.allViewsArray[index.integerValue]; + targetGiftView.isSelected = YES; + [targetGiftView startPulseAnimationWithLayer]; + } } } else { // 使用局部变量避免频繁访问属性 diff --git a/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.h b/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.h index 4bab76f..d5a4963 100644 --- a/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.h +++ b/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @interface TUIC2CChatViewController : TUIBaseChatViewController - +@property (nonatomic,assign)BOOL isServices; @end NS_ASSUME_NONNULL_END diff --git a/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.m b/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.m index dba3081..d362135 100644 --- a/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.m +++ b/TUIKit/TUIChat/UI_Classic/Chat/TUIC2CChatViewController.m @@ -48,11 +48,15 @@ } -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; - NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; - if (isCanChat != 1) { - self.bottomToolBtn.hidden = NO; - }else{ + if (self.isServices) { self.bottomToolBtn.hidden = YES; + }else{ + NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; + if (isCanChat != 1) { + self.bottomToolBtn.hidden = NO; + }else{ + self.bottomToolBtn.hidden = YES; + } } } -(void)viewDidLayoutSubviews{