提交
@@ -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;
|
||||
|
||||
/**
|
||||
去公会群聊
|
||||
*/
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
|
||||
- (IBAction)comitUserInfoBtnAction:(id)sender {
|
||||
//提交信息
|
||||
if (_userNameTF.text.length == 0) {
|
||||
if (![_userNameTF.text isExist]) {
|
||||
showToastInView(QXText(@"请填写昵称"), self.view);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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}"];
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -13,11 +13,14 @@
|
||||
#import "QXSystemTopView.h"
|
||||
#import "QXSystemNoticeViewController.h"
|
||||
#import "QXMessageServices.h"
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface QXMessageViewController ()<TUIConversationListControllerListener,QXSystemTopViewDelegate>
|
||||
@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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1587,6 +1587,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
successBlock:(void (^)(NSArray* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 1010 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 354 KiB After Width: | Height: | Size: 511 KiB |
@@ -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;
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRoomViewController (Bar)
|
||||
|
||||
-(void)createCoinView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
//小黑屋
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -381,6 +381,7 @@
|
||||
|
||||
-(void)cabinAction{
|
||||
QXRoomBarCabinListView *cabinListView = [[QXRoomBarCabinListView alloc] init];
|
||||
cabinListView.roomId = self.roomModel.room_info.room_id;
|
||||
[cabinListView showInView:self.viewController.view];
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
showToast(@"抢头条成功");
|
||||
[weakSelf hide];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
[weakSelf hide];
|
||||
// [weakSelf hide];
|
||||
showToast(msg);
|
||||
}];
|
||||
}else{
|
||||
|
||||
@@ -89,7 +89,9 @@
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)setRoomId:(NSString *)roomId{
|
||||
_roomId = roomId;
|
||||
}
|
||||
|
||||
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
|
||||
@@ -6,15 +6,22 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
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;
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#import "QXMineNetwork.h"
|
||||
#import "UIView+FloatingAnimation.h"
|
||||
#import "QXAgoraEngine.h"
|
||||
#import "QXSeductionAlertView.h"
|
||||
@class QXRoomSeatBarCabinGiftView;
|
||||
@interface QXRoomSeatBarCabinView()<QXRoomSeatBarCabinGiftViewDelegate>
|
||||
//倒计时
|
||||
@@ -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<QXGiftModel *> * _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) {
|
||||
|
||||
@@ -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];
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -81,6 +81,9 @@
|
||||
[self giftAction];
|
||||
}
|
||||
-(void)addGiftModelList:(NSArray<QXGiftScrollModel *> *)list{
|
||||
if (self.isClose) {
|
||||
return;
|
||||
}
|
||||
[self.dataArray addObjectsFromArray:list];
|
||||
[self giftAction];
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 93 KiB |
@@ -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 {
|
||||
// 使用局部变量避免频繁访问属性
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TUIC2CChatViewController : TUIBaseChatViewController
|
||||
|
||||
@property (nonatomic,assign)BOOL isServices;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -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{
|
||||
|
||||