diff --git a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/UserInterfaceState.xcuserstate b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/UserInterfaceState.xcuserstate
index e9ecf96..ddb2ff3 100644
Binary files a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/UserInterfaceState.xcuserstate and b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index 961a479..b839bcc 100644
--- a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -224,22 +224,6 @@
landmarkType = "7">
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.h b/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.h
index 05ace75..d3a9b0f 100644
--- a/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.h
+++ b/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.h
@@ -40,12 +40,14 @@ NS_ASSUME_NONNULL_BEGIN
@interface QXEffectContentView : UIView
+@property (nonatomic,assign) BOOL isShow;
+@property (nonatomic,assign) BOOL isOnece;
@property (nonatomic,strong) VAPView *playerMp4View;
@property (nonatomic, strong) dispatch_queue_t queue;
+-(void)previewEffectWith:(NSString *)play_image;
- (void)displayEffectView:(NSString *)play_image;
- (void)displayEffectViewWithMorePlayImages:(NSArray *)playImages;
- (void)openOrCloseEffectViewWith:(BOOL)isShow;
-@property (nonatomic,assign) BOOL isShow;
- (void)destroyEffectView;
-(void)stopPlay;
-(void)startPlay;
diff --git a/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.m b/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.m
index d71f5ee..e2d64c8 100644
--- a/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.m
+++ b/QXLive/HomePage(声播)/View/礼物/QXGiftPlayerManager.m
@@ -280,6 +280,35 @@ static NSString *PLAY_IMAGE = @"play_image";
}
});
}
+-(void)previewEffectWith:(NSString *)play_image{
+ self.isOnece = YES;
+ dispatch_async(dispatch_get_main_queue(), ^{
+ if ([play_image hasSuffix:@"mp4"]) {
+ __weak typeof(self)weakSelf = self;
+ /// mp4格式下载播放
+ [[QXRequset shareInstance] downloadVideoPlayerWithUrl:play_image completion:^(BOOL result, NSString * _Nonnull fileName) {
+ NSString *videoPath = [QXFileManager getGiftVideoPath:fileName];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ weakSelf.playerMp4View.hidden = NO;
+ weakSelf.svagView.hidden = YES;
+ });
+ [weakSelf.playerMp4View stopHWDMP4];
+ [weakSelf.playerMp4View playHWDMP4:videoPath delegate:self];
+ }];
+ }else if ([play_image hasSuffix:@"svg"] || [play_image hasSuffix:@"svga"]) {
+ __weak typeof(self)weakSelf = self;
+ /// svga下载播放
+ [[QXRequset shareInstance] downloadVideoPlayerWithUrl:play_image completion:^(BOOL result, NSString * _Nonnull fileName) {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ weakSelf.playerMp4View.hidden = YES;
+ weakSelf.svagView.hidden = NO;
+ });
+ NSString *filePath = [QXFileManager getGiftVideoPath:fileName];
+ [weakSelf.svagView loadSVGAPlayerWith:filePath];
+ }];
+ }
+ });
+}
- (void)openOrCloseEffectViewWith:(BOOL)isShow {
_isShow = isShow;
@@ -307,9 +336,13 @@ static NSString *PLAY_IMAGE = @"play_image";
[self loadStartSVGAPlayer];
}
-(void)viewDidFinishPlayMP4:(NSInteger)totalFrameCount view:(VAPView *)container{
+
dispatch_async(dispatch_get_main_queue(), ^{
self.playerMp4View.hidden = YES;
});
+ if (self.isOnece) {
+ return;
+ }
dispatch_async(dispatch_get_main_queue(), ^{
[self loadStartSVGAPlayer];
});
@@ -318,6 +351,9 @@ static NSString *PLAY_IMAGE = @"play_image";
dispatch_async(dispatch_get_main_queue(), ^{
self.playerMp4View.hidden = YES;
});
+ if (self.isOnece) {
+ return;
+ }
dispatch_async(dispatch_get_main_queue(), ^{
[self loadStartSVGAPlayer];
});
@@ -417,6 +453,9 @@ static NSString *PLAY_IMAGE = @"play_image";
__weak typeof(self)weakSelf = self;
_svagView.didFinishedDisplay = ^(QXEffectSvgaView * _Nonnull svgaView) {
[svgaView destroySvga];
+ if (weakSelf.isOnece) {
+ return;
+ }
[weakSelf loadEndSvgaPlayer];
};
}
diff --git a/QXLive/Login(登录)/Controlller/QXLoginViewController.m b/QXLive/Login(登录)/Controlller/QXLoginViewController.m
index 44c21fb..66fcd2f 100644
--- a/QXLive/Login(登录)/Controlller/QXLoginViewController.m
+++ b/QXLive/Login(登录)/Controlller/QXLoginViewController.m
@@ -497,6 +497,9 @@
MJWeakSelf
[QXLoginNetwork loginAccountWithUser_login:user_login successBlock:^(QXLoginModel * _Nonnull loginModel) {
hideLoadingInView(self.view);
+ [[NSUserDefaults standardUserDefaults] setInteger:loginModel.is_can_chat forKey:kIsCanChat];
+ [[NSUserDefaults standardUserDefaults] setObject:loginModel.can_chat_money forKey:kIsCanChatMoney];
+ [[NSUserDefaults standardUserDefaults] synchronize];
[[QXGlobal shareGlobal] saveLoginData:[loginModel yy_modelToJSONString]];
AppDelegate *delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
[delegate tencentLogin];
diff --git a/QXLive/Login(登录)/Model/QXLoginModel.h b/QXLive/Login(登录)/Model/QXLoginModel.h
index 08b61a1..eb6012b 100644
--- a/QXLive/Login(登录)/Model/QXLoginModel.h
+++ b/QXLive/Login(登录)/Model/QXLoginModel.h
@@ -36,6 +36,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *dress;
/// 各种卡片
@property (nonatomic,strong)NSArray *icon;
+/// 1 能聊天 0不能聊天
+@property (nonatomic,assign)NSInteger is_can_chat;
+/// 需要充值金额
+@property (nonatomic,strong)NSString* can_chat_money;
@end
diff --git a/QXLive/Mine(音域)/Controller/个性装扮/QXDressSubViewController.m b/QXLive/Mine(音域)/Controller/个性装扮/QXDressSubViewController.m
index aac1d67..4b4de79 100644
--- a/QXLive/Mine(音域)/Controller/个性装扮/QXDressSubViewController.m
+++ b/QXLive/Mine(音域)/Controller/个性装扮/QXDressSubViewController.m
@@ -9,12 +9,14 @@
#import "QXDressCell.h"
#import "QXMineNetwork.h"
#import "QXSeatHeaderView.h"
+#import "QXGiftPlayerManager.h"
@interface QXDressSubViewController ()
@property (nonatomic,strong)QXSeatHeaderView *headerImageView;
@property (nonatomic,strong)UICollectionView *collectionView;
@property (nonatomic,strong)UIButton *commitBtn;
@property (nonatomic,assign)NSInteger selectedIndex;
+@property (nonatomic,strong)QXEffectContentView *fullEffectView;
@end
@implementation QXDressSubViewController
@@ -40,6 +42,7 @@
}
[self.view addSubview:self.collectionView];
[self.view addSubview:self.commitBtn];
+ [self.view addSubview:self.fullEffectView];
}
-(void)getData{
@@ -84,7 +87,10 @@
self.selectedIndex = indexPath.row;
[collectionView reloadData];
// MJWeakSelf
-
+ if ([self.model.id isEqualToString:@"2"]) {
+ self.fullEffectView.hidden = NO;
+ [self.fullEffectView previewEffectWith:model.play_image];
+ }
[self.headerImageView setHeadIcon:[QXGlobal shareGlobal].loginModel.avatar dress:model.play_image];
}
@@ -144,4 +150,12 @@
}
return _headerImageView;
}
+- (QXEffectContentView *)fullEffectView {
+ if (!_fullEffectView) {
+ _fullEffectView = [[QXEffectContentView alloc] initWithFrame:[UIScreen mainScreen].bounds];
+ _fullEffectView.queue = dispatch_queue_create("qx_room_full_preview_message.com", NULL);
+ _fullEffectView.hidden = YES;
+ }
+ return _fullEffectView;
+}
@end
diff --git a/QXLive/Mine(音域)/Model/QXUserModel.h b/QXLive/Mine(音域)/Model/QXUserModel.h
index 2f704ed..4cbd8e2 100644
--- a/QXLive/Mine(音域)/Model/QXUserModel.h
+++ b/QXLive/Mine(音域)/Model/QXUserModel.h
@@ -39,6 +39,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *is_use_code;
/// 在线状态
@property (nonatomic,assign)BOOL is_online;
+/// 1 能聊天 0不能聊天
+@property (nonatomic,assign)NSInteger is_can_chat;
+/// 需要充值金额
+@property (nonatomic,strong)NSString* can_chat_money;
@end
diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.h b/QXLive/Mine(音域)/Services/QXMineNetwork.h
index e8aa7cf..69f9083 100644
--- a/QXLive/Mine(音域)/Services/QXMineNetwork.h
+++ b/QXLive/Mine(音域)/Services/QXMineNetwork.h
@@ -1040,6 +1040,13 @@ NS_ASSUME_NONNULL_BEGIN
+(void)roomGiftBagPricesuccessBlock:(void (^)(NSString* price))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
+/**
+ 用户重连
+ */
++(void)roomUserReconnectWithRoomId:(NSString*)roomId
+ successBlock:(void (^)(NSDictionary* dict))successBlock
+ failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
+
@end
diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.m b/QXLive/Mine(音域)/Services/QXMineNetwork.m
index e0e45ed..08f74df 100644
--- a/QXLive/Mine(音域)/Services/QXMineNetwork.m
+++ b/QXLive/Mine(音域)/Services/QXMineNetwork.m
@@ -18,6 +18,9 @@
[QXGlobal shareGlobal].loginModel.dress = userModel.dress;
[QXGlobal shareGlobal].loginModel.auth = userModel.auth.intValue;
[[QXGlobal shareGlobal] updateUserInfoWithMolde:[QXGlobal shareGlobal].loginModel];
+ [[NSUserDefaults standardUserDefaults] setInteger:userModel.is_can_chat forKey:kIsCanChat];
+ [[NSUserDefaults standardUserDefaults] setObject:userModel.can_chat_money forKey:kIsCanChatMoney];
+ [[NSUserDefaults standardUserDefaults] synchronize];
if (successBlock) {
successBlock(userModel);
}
@@ -2045,4 +2048,19 @@
failBlock(error,msg);
}];
}
+
++(void)roomUserReconnectWithRoomId:(NSString*)roomId
+ successBlock:(void (^)(NSDictionary* dict))successBlock
+ failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
+ NSDictionary *parameters =@{
+ @"room_id":roomId?roomId:@"",
+ };
+ [[QXRequset shareInstance] postWithUrl:QXRoomUserReconnect parameters:parameters needCache:NO success:^(id responseObject) {
+ if (successBlock) {
+ successBlock(responseObject[@"data"]);
+ }
+ } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
+ failBlock(error,msg);
+ }];
+}
@end
diff --git a/QXLive/Other/AppDelegate+Login.m b/QXLive/Other/AppDelegate+Login.m
index 9e030f3..a50b72b 100644
--- a/QXLive/Other/AppDelegate+Login.m
+++ b/QXLive/Other/AppDelegate+Login.m
@@ -74,6 +74,14 @@
-(void)onConnectSuccess{
// showToast(@"腾讯重连服务器成功");
// NSLog(@"腾讯重连服务器成功");
+ if ([QXGlobal.shareGlobal.roomId isExist]) {
+ return;
+ }
+ [QXMineNetwork roomUserReconnectWithRoomId:QXGlobal.shareGlobal.roomId successBlock:^(NSDictionary * _Nonnull dict) {
+
+ } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
+
+ }];
}
-(void)onConnecting{
// NSLog(@"腾讯重连服务器中");
diff --git a/QXLive/Other/NoitceAndKey.h b/QXLive/Other/NoitceAndKey.h
index d15a5ee..f3bd848 100644
--- a/QXLive/Other/NoitceAndKey.h
+++ b/QXLive/Other/NoitceAndKey.h
@@ -104,6 +104,10 @@ static NSString *const kIsOpenRecharge = @"kIsOpenRecharge";
static NSString *const kChirldLocalPassword = @"kChirldLocalPassword";
/// 是否开启飘屏
static NSString *const kIsCloseDrifPop = @"kIsCloseDrifPop";
+/// 是否可以聊天
+static NSString *const kIsCanChat = @"kIsCanChat";
+/// 充值多少钱可以聊天
+static NSString *const kIsCanChatMoney = @"kIsCanChatMoney";
// 微信登录
diff --git a/QXLive/Other/QXApi.h b/QXLive/Other/QXApi.h
index d311d44..0639ed8 100644
--- a/QXLive/Other/QXApi.h
+++ b/QXLive/Other/QXApi.h
@@ -437,4 +437,8 @@ static NSString * QXRoomGiftBagClear = @"api/Room/room_gift_all_clear";
/// 背包礼物价值
static NSString * QXRoomGiftBagPrice = @"api/UserGiftPack/get_gift_pack_list_count";
+/// 腾讯重连成功后更新在线列表
+static NSString * QXRoomUserReconnect = @"api/Room/user_reconnect";
+
+
#endif /* Api_h */
diff --git a/QXLive/QXLive.entitlements b/QXLive/QXLive.entitlements
index dbdedb2..1fb99e0 100644
--- a/QXLive/QXLive.entitlements
+++ b/QXLive/QXLive.entitlements
@@ -10,8 +10,8 @@
com.apple.developer.associated-domains
- webcredentials:mdh.xscmmidi.site
- applinks:mdh.xscmmidi.site
+ webcredentials:my.qxhs.xyz
+ applinks:my.qxhs.xyz
diff --git a/QXLive/活动/巡乐会/QXMeetActivityView.h b/QXLive/活动/巡乐会/QXMeetActivityView.h
index 919f7c1..53442fd 100644
--- a/QXLive/活动/巡乐会/QXMeetActivityView.h
+++ b/QXLive/活动/巡乐会/QXMeetActivityView.h
@@ -17,6 +17,13 @@ typedef NS_ENUM(NSInteger) {
/// 抽100次
QXMeetDrawBtnTypeHundred = 100,
}QXMeetDrawBtnType;
+
+@protocol QXMeetActivityViewDelegate
+
+@optional
+-(void)timeDownDidFinished;
+
+@end
@interface QXMeetActivityView : UIView
-(void)showInView:(UIView *)view;
@property (nonatomic,strong)NSString *roomId;
@@ -42,6 +49,8 @@ typedef NS_ENUM(NSInteger) {
@property (nonatomic,assign)long long startTime;
@property (nonatomic,strong)QXTimer *timer;
+
+@property (nonatomic,weak)iddelegate;
@end
diff --git a/QXLive/活动/巡乐会/QXMeetActivityView.m b/QXLive/活动/巡乐会/QXMeetActivityView.m
index a8850de..6337f4f 100644
--- a/QXLive/活动/巡乐会/QXMeetActivityView.m
+++ b/QXLive/活动/巡乐会/QXMeetActivityView.m
@@ -14,7 +14,7 @@
#import "QXMeetLotteryView.h"
#import "QXDiamondViewController.h"
-@interface QXMeetActivityView()
+@interface QXMeetActivityView()
@property (nonatomic,strong)UIView *bgView;
@property (nonatomic,strong)UIImageView *bgImageView;
/// 奖池
@@ -146,6 +146,7 @@
[self.bgView addSubview:self.recordBtn];
self.timeDownView = [[QXMeetTimeDownView alloc] initWithFrame:CGRectMake((self.bgView.width-ScaleWidth(122))/2, self.rankBtn.top-4, ScaleWidth(122), ScaleWidth(29))];
+ self.timeDownView.delegate = self;
[self.bgView addSubview:self.timeDownView];
self.giftImageView = [[UIImageView alloc] initWithFrame:CGRectMake((self.bgView.width-ScaleWidth(118))/2, self.timeDownView.bottom+11, ScaleWidth(118), ScaleWidth(118))];
@@ -325,6 +326,9 @@
}
}
}
+-(void)timeDownDidFinished{
+ [self hide];
+}
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
return touch.view == self;
}
@@ -624,10 +628,10 @@
NSString *time = [NSString stringWithFormat:@"%02ld%02ld",min,second];
if (time.length == 4) {
- self.timeLabel1.text = [time substringWithRange:NSMakeRange(0, 1)];
- self.timeLabel2.text = [time substringWithRange:NSMakeRange(1, 1)];
- self.timeLabel3.text = [time substringWithRange:NSMakeRange(2, 1)];
- self.timeLabel4.text = [time substringWithRange:NSMakeRange(3, 1)];
+ weakSelf.timeLabel1.text = [time substringWithRange:NSMakeRange(0, 1)];
+ weakSelf.timeLabel2.text = [time substringWithRange:NSMakeRange(1, 1)];
+ weakSelf.timeLabel3.text = [time substringWithRange:NSMakeRange(2, 1)];
+ weakSelf.timeLabel4.text = [time substringWithRange:NSMakeRange(3, 1)];
}
if (weakSelf.startTime<=0) {
[weakSelf stopTimer];
@@ -635,6 +639,9 @@
weakSelf.timeLabel2.text = @"0";
weakSelf.timeLabel3.text = @"0";
weakSelf.timeLabel4.text = @"0";
+ if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(timeDownDidFinished)]) {
+ [weakSelf.delegate timeDownDidFinished];
+ }
}
});
}];
diff --git a/QXLive/活动/巡乐会/QXMeetLotteryView.m b/QXLive/活动/巡乐会/QXMeetLotteryView.m
index bb0f16b..3ffe580 100644
--- a/QXLive/活动/巡乐会/QXMeetLotteryView.m
+++ b/QXLive/活动/巡乐会/QXMeetLotteryView.m
@@ -36,7 +36,7 @@
self.scrollView.showsHorizontalScrollIndicator = NO;
self.scrollView.showsVerticalScrollIndicator = NO;
self.scrollView.scrollEnabled = YES;
- self.scrollView.hidden = YES;
+// self.scrollView.hidden = YES;
self.scrollView.decelerationRate = UIScrollViewDecelerationRateFast;
[self addSubview:self.scrollView];
_itemSpace = 25;
@@ -76,7 +76,7 @@
}
-(void)startLotteryAnimation{
- self.scrollView.hidden = NO;
+// self.scrollView.hidden = NO;
[self.scrollView setContentOffset:CGPointZero animated:NO];
MJWeakSelf
[UIView animateWithDuration:6 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
diff --git a/TUIKit/TUIChat/UI_Classic/Input/TUIInputBar.m b/TUIKit/TUIChat/UI_Classic/Input/TUIInputBar.m
index f9d6e6e..8bf5876 100644
--- a/TUIKit/TUIChat/UI_Classic/Input/TUIInputBar.m
+++ b/TUIKit/TUIChat/UI_Classic/Input/TUIInputBar.m
@@ -342,6 +342,30 @@
#pragma mark - Text input
#pragma mark-- UITextViewDelegate
- (void)textViewDidBeginEditing:(UITextView *)textView {
+ NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
+ NSString* canChatMoney = [[NSUserDefaults standardUserDefaults] objectForKey:@"kIsCanChatMoney"];
+ if (isCanChat != 1) {
+ [self.inputTextView resignFirstResponder];
+ UIWindow*keyWindow = nil;
+ NSArray *windows = [UIApplication sharedApplication].windows;
+ for (UIWindow *window in windows){
+ if(window.isKeyWindow){
+ keyWindow = window;
+ break;
+ }
+ }
+ UINavigationController*na = (UINavigationController*)keyWindow.rootViewController;
+ NSString *title = [NSString stringWithFormat:@"充值不足%@元,您无法发送消息",canChatMoney];
+ UIAlertController *al = [UIAlertController alertControllerWithTitle:title message:@"" preferredStyle:(UIAlertControllerStyleAlert)];
+ [al addAction:[UIAlertAction actionWithTitle:@"去充值" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
+ [na pushViewController:[[NSClassFromString(@"QXRechargeViewcController") alloc] init] animated:YES];
+ }]];
+ [al addAction:[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
+
+ }]];
+ [na presentViewController:al animated:YES completion:nil];
+ return;
+ }
self.keyboardButton.hidden = YES;
self.micButton.hidden = NO;
self.faceButton.hidden = NO;