提交
@@ -1207,7 +1207,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@@ -1271,7 +1271,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
MARKETING_VERSION = 1.1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "QXAppStartViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "TUIChatConfig.h"
|
||||
@interface QXAppStartViewController ()
|
||||
@property (nonatomic,strong)UIImageView *bgImaegView;
|
||||
@end
|
||||
@@ -77,6 +78,8 @@
|
||||
QXConfig.shared.tabbarArray = @[tabbarIndex1,tabbarIndex2,tabbarIndex3,tabbarIndex4];
|
||||
AppDelegate *delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
|
||||
[delegate changeRootViewControllerIsTabbar];
|
||||
BOOL api_version = [responseObject[@"api_version"] boolValue];
|
||||
TUIChatConfig.defaultConfig.isAppStore = api_version;
|
||||
NSLog(@"请求成功");
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
NSLog(@"请求失败");
|
||||
|
||||
@@ -23,7 +23,7 @@ typedef void (^showFinishBlock)(void);
|
||||
@property (nonatomic,readonly,assign)BOOL isLogin;
|
||||
@property (nonatomic,assign)BOOL isShowLoginVC;
|
||||
/// 房间id
|
||||
@property (nonatomic,strong,readonly)NSString *roomId;
|
||||
@property (nonatomic,strong)NSString *roomId;
|
||||
// 是否实名
|
||||
@property (nonatomic,assign)BOOL isRealName;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
@interface QXGlobal()
|
||||
@property (nonatomic,assign)BOOL isLogin;
|
||||
@property (nonatomic,strong)NSString *roomId;
|
||||
|
||||
|
||||
@property (nonatomic,assign)BOOL isClickJoinRoom;
|
||||
|
||||
|
||||
@@ -37,15 +37,15 @@
|
||||
// make.left.mas_equalTo(16);
|
||||
// make.top.mas_equalTo(kSafeAreaTop +10);
|
||||
// }];
|
||||
self.categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(14, kSafeAreaTop, 100, 44)];
|
||||
self.categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(14, kSafeAreaTop, 300, 44)];
|
||||
self.categoryView.delegate = self;
|
||||
// self.categoryView.titles = @[QXText(@"发现"),QXText(@"扩列")];
|
||||
self.categoryView.titles = @[QXText(@"扩列"),QXText(@"发现")];
|
||||
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"];
|
||||
self.categoryView.titles = @[QXText(@"新人/扩列"),QXText(@"发现")];
|
||||
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"];
|
||||
self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"];
|
||||
self.categoryView.cellWidth = 50;
|
||||
self.categoryView.contentEdgeInsetLeft = 0;
|
||||
self.categoryView.cellSpacing = 0;
|
||||
self.categoryView.cellWidth = JXCategoryViewAutomaticDimension;
|
||||
self.categoryView.contentEdgeInsetLeft = 10;
|
||||
self.categoryView.cellSpacing = 25;
|
||||
// self.categoryView.titleLabelZoomScale = 1.1;
|
||||
self.categoryView.titleLabelZoomEnabled = YES;
|
||||
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:16];
|
||||
@@ -62,7 +62,7 @@
|
||||
[self.view addSubview:self.categoryView];
|
||||
[self.view addSubview:self.containerView];
|
||||
self.categoryView.listContainer = self.containerView;
|
||||
|
||||
[self categoryView:self.categoryView didSelectedItemAtIndex:0];
|
||||
[self.view addSubview:self.publishBtn];
|
||||
|
||||
}
|
||||
@@ -90,6 +90,16 @@
|
||||
}
|
||||
-(void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{
|
||||
self.publishBtn.hidden = !(index==1);
|
||||
[self updateBgImage:index==0?@"exbpansion_bg":@"app_bg"];
|
||||
if (index == 0) {
|
||||
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"];
|
||||
self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"];
|
||||
}else{
|
||||
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"];
|
||||
self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#pragma mark - action
|
||||
-(void)pulishAction{
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
self.bgImageHidden = YES;
|
||||
self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, 100, 24)];
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
self.titleLabel.textColor = QXConfig.textColor;
|
||||
self.titleLabel.textColor = RGB16(0xffffff);
|
||||
self.titleLabel.text = QXText(@"扩列交友");
|
||||
[self.view addSubview:self.titleLabel];
|
||||
|
||||
self.sortBtn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-75-13, 0, 75, 48)];
|
||||
[self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:QXConfig.textColor] forState:(UIControlStateNormal)];
|
||||
[self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:RGB16(0xffffff)] forState:(UIControlStateNormal)];
|
||||
if ([QXGlobal shareGlobal].loginModel.sex.integerValue == 1) {
|
||||
[self.sortBtn setTitle:QXText(@"只看女生") forState:(UIControlStateNormal)];
|
||||
self.type = @"2";
|
||||
@@ -48,7 +48,7 @@
|
||||
[self.sortBtn setTitle:QXText(@"只看男生") forState:(UIControlStateNormal)];
|
||||
self.type = @"1";
|
||||
}
|
||||
[self.sortBtn setTitleColor:QXConfig.textColor forState:(UIControlStateNormal)];
|
||||
[self.sortBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
||||
self.sortBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.sortBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:3];
|
||||
[self.sortBtn addTarget:self action:@selector(sortAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
@@ -81,11 +81,19 @@
|
||||
}
|
||||
if (isAppStore) {
|
||||
self.appStoreView.hidden = NO;
|
||||
[self.sortBtn setTitleColor:RGB16(0xFFEB9D) forState:(UIControlStateNormal)];
|
||||
[self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:RGB16(0xFFEB9D)] forState:(UIControlStateNormal)];
|
||||
self.sortBtn.top = ScaleWidth(71);
|
||||
self.tableView.hidden = YES;
|
||||
self.appStoreView.users = list;
|
||||
self.titleLabel.hidden = YES;
|
||||
}else{
|
||||
[self.sortBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
||||
[self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:RGB16(0xffffff)] forState:(UIControlStateNormal)];
|
||||
self.sortBtn.top = 0;
|
||||
self.tableView.hidden = NO;
|
||||
self.appStoreView.hidden = YES;
|
||||
self.titleLabel.hidden = NO;
|
||||
}
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#import "QXUserHomePageViewController.h"
|
||||
#import "QXDynamicLikeListView.h"
|
||||
#import "QXReportViewController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
|
||||
@interface QXDynamicListCell ()<QXShareViewDelegate>
|
||||
|
||||
@@ -346,6 +347,13 @@
|
||||
reportVC.reportType = @"3";
|
||||
reportVC.fromId = self.model.id;
|
||||
[self.navigationController pushViewController:reportVC animated:YES];
|
||||
}else if ([model.name isEqualToString:QXText(@"拉黑")]) {
|
||||
|
||||
[QXMineNetwork addOrRemoveBlackListIsAdd:YES userId:self.model.user_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"操作成功");
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXExpansionAppStoreSubView : UIView
|
||||
@property(nonatomic,strong)UIImageView *headerImageView;
|
||||
@property(nonatomic,strong)UIView *nameBgView;
|
||||
@property(nonatomic,strong)UILabel *nameLabel;
|
||||
@property(nonatomic,strong)UIImageView *sexImageView;
|
||||
@property(nonatomic,strong)QXUserHomeModel *model;
|
||||
|
||||
@@ -8,8 +8,14 @@
|
||||
#import "QXExpansionAppStoreView.h"
|
||||
#import "CKShimmerLabel.h"
|
||||
@interface QXExpansionAppStoreView()<CAAnimationDelegate>
|
||||
@property (nonatomic,strong)CKShimmerLabel *titleLabel;
|
||||
@property (nonatomic,strong)UIImageView *topCenterImageView;
|
||||
@property (nonatomic,strong)UIImageView *moonImageView;
|
||||
@property (nonatomic,strong)UIImageView *bottomImageView;
|
||||
@property (nonatomic,strong)UIImageView *legImageView;
|
||||
|
||||
@property (nonatomic,strong)UIView *centerBgView;
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
|
||||
@property (nonatomic,strong)UIImageView *fengcheImageView;
|
||||
@property (nonatomic,strong)UIButton *changeBtn;
|
||||
@property (nonatomic,strong)NSMutableArray *randomArray;
|
||||
@@ -18,6 +24,10 @@
|
||||
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView2;
|
||||
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView3;
|
||||
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView4;
|
||||
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView5;
|
||||
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView6;
|
||||
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView7;
|
||||
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView8;
|
||||
@property (nonatomic,strong)NSMutableArray *userViews;
|
||||
@end
|
||||
|
||||
@@ -44,54 +54,61 @@
|
||||
}
|
||||
-(void)initSubviews{
|
||||
|
||||
self.topCenterImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_word"]];
|
||||
self.topCenterImageView.frame = CGRectMake((SCREEN_WIDTH-ScaleWidth(275))/2, 17, ScaleWidth(275), ScaleWidth(40));
|
||||
self.topCenterImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:self.topCenterImageView];
|
||||
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"expansion_bg"]];
|
||||
self.bgImageView.frame = CGRectMake((self.width-375)/2, (self.height-375)/2-20, 375, 375);
|
||||
[self addSubview:self.bgImageView];
|
||||
self.moonImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_moon"]];
|
||||
self.moonImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
self.moonImageView.frame = CGRectMake(self.topCenterImageView.right, 5, ScaleWidth(44), ScaleWidth(52));
|
||||
[self addSubview:self.moonImageView];
|
||||
|
||||
self.bottomImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_bottom_bg"]];
|
||||
self.bottomImageView.frame = CGRectMake(0, self.height-ScaleWidth(180), SCREEN_WIDTH, ScaleWidth(180));
|
||||
self.bottomImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:self.bottomImageView];
|
||||
|
||||
self.legImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_bottom_leg"]];
|
||||
self.legImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
self.legImageView.frame = CGRectMake((SCREEN_WIDTH-ScaleWidth(175))/2, self.bottomImageView.top-ScaleWidth(240-56), ScaleWidth(175), ScaleWidth(240));
|
||||
[self insertSubview:self.legImageView belowSubview:self.bottomImageView];
|
||||
|
||||
|
||||
self.centerBgView = [[UIView alloc] initWithFrame:CGRectMake(0, self.legImageView.top-SCREEN_WIDTH/2, SCREEN_WIDTH, SCREEN_WIDTH)];
|
||||
[self addSubview:self.centerBgView];
|
||||
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_center_bg"]];
|
||||
self.bgImageView.frame = CGRectMake((SCREEN_WIDTH-ScaleWidth(300))/2, (SCREEN_WIDTH-ScaleWidth(300))/2,ScaleWidth(300), ScaleWidth(300));
|
||||
[self.centerBgView addSubview:self.bgImageView];
|
||||
// [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.height.width.mas_equalTo(375);
|
||||
// make.centerX.centerY.equalTo(self);
|
||||
// }];
|
||||
|
||||
self.titleLabel = [[CKShimmerLabel alloc] init];
|
||||
self.titleLabel.shimmerWidth = 20;
|
||||
self.titleLabel.shimmerRadius = 20;
|
||||
self.titleLabel.shimmerColor = QXConfig.themeColor;
|
||||
self.titleLabel.shimmerType = ST_LeftToRight;
|
||||
self.titleLabel.repeat = YES;
|
||||
self.titleLabel.textColor = RGB16(0x333333);
|
||||
self.titleLabel.font = [UIFont fontWithName:@"YouSheBiaoTiHei" size:30];
|
||||
self.titleLabel.text = @"风车转转转,找寻新玩伴";
|
||||
self.titleLabel.top = 80;
|
||||
[self.titleLabel.contentLabel sizeToFit];
|
||||
self.titleLabel.width = self.titleLabel.contentLabel.width;
|
||||
self.titleLabel.centerX = self.centerX;
|
||||
|
||||
[self.titleLabel startShimmer];
|
||||
[self addSubview:self.titleLabel];
|
||||
|
||||
|
||||
self.fengcheImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fengche"]];
|
||||
self.fengcheImageView.hidden = YES;
|
||||
self.fengcheImageView.frame = CGRectMake((self.width-70)/2, (self.height-70)/2-20, 70, 70);
|
||||
[self.fengcheImageView addRoundedCornersWithRadius:35];
|
||||
self.fengcheImageView.frame = CGRectMake((self.centerBgView.width-ScaleWidth(60))/2, (self.centerBgView.top-ScaleWidth(60))/2, ScaleWidth(60), ScaleWidth(60));
|
||||
[self.fengcheImageView addRoundedCornersWithRadius:ScaleWidth(30)];
|
||||
self.fengcheImageView.layer.borderWidth = 5;
|
||||
self.fengcheImageView.layer.borderColor = UIColor.whiteColor.CGColor;
|
||||
self.fengcheImageView.centerX = self.centerBgView.centerX;
|
||||
self.fengcheImageView.centerY = self.centerBgView.centerY;
|
||||
[self addSubview:self.fengcheImageView];
|
||||
// [self.fengcheImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.centerY.centerX.equalTo(self.bgImageView);
|
||||
// make.height.width.mas_offset(70);
|
||||
// }];
|
||||
|
||||
|
||||
self.changeBtn = [[UIButton alloc] init];
|
||||
self.changeBtn.frame = self.fengcheImageView.frame;
|
||||
self.changeBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.changeBtn addRoundedCornersWithRadius:35];
|
||||
[self.changeBtn setTitle:@"换一批" forState:(UIControlStateNormal)];
|
||||
[self.changeBtn addRoundedCornersWithRadius:ScaleWidth(30)];
|
||||
[self.changeBtn setTitle:@"换" forState:(UIControlStateNormal)];
|
||||
self.changeBtn.layer.borderWidth = 5;
|
||||
self.changeBtn.layer.borderColor = UIColor.whiteColor.CGColor;
|
||||
self.changeBtn.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[self.changeBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
[self.changeBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
||||
[self.changeBtn addTarget:self action:@selector(changeAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.changeBtn];
|
||||
// [self.changeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -99,45 +116,52 @@
|
||||
// make.height.width.mas_offset(70);
|
||||
// }];
|
||||
|
||||
self.userView1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.left+40, self.bgImageView.top+28, 100, 100)];
|
||||
[self addSubview:self.userView1];
|
||||
// [self.userView1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.equalTo(self.bgImageView).offset(40);
|
||||
// make.top.equalTo(self.bgImageView).offset(32);
|
||||
// make.width.mas_equalTo(100);
|
||||
// make.height.mas_equalTo(100);
|
||||
// }];
|
||||
self.userView1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView1];
|
||||
|
||||
self.userView2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.right-40-100, self.bgImageView.top+28, 100, 100)];
|
||||
[self addSubview:self.userView2];
|
||||
// [self.userView2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.right.equalTo(self.bgImageView).offset(-40);
|
||||
// make.top.equalTo(self.bgImageView).offset(32);
|
||||
// make.width.mas_equalTo(100);
|
||||
// make.height.mas_equalTo(100);
|
||||
// }];
|
||||
|
||||
self.userView3 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.left+40, self.bgImageView.bottom-55-100, 100, 100)];
|
||||
[self addSubview:self.userView3];
|
||||
// [self.userView3 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.equalTo(self.bgImageView).offset(40);
|
||||
// make.bottom.equalTo(self.bgImageView).offset(-55);
|
||||
// make.width.mas_equalTo(100);
|
||||
// make.height.mas_equalTo(100);
|
||||
// }];
|
||||
self.userView2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView2];
|
||||
|
||||
|
||||
self.userView3 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-ScaleWidth(66), (self.centerBgView.height-ScaleWidth(71))/2, ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView3];
|
||||
|
||||
self.userView4 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView2.left, self.userView3.bottom+ScaleWidth(32), ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView4];
|
||||
|
||||
self.userView5 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView1.left, self.centerBgView.height-ScaleWidth(71), ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView5];
|
||||
|
||||
|
||||
|
||||
self.userView7 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(ScaleWidth(10), self.userView3.top, ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView7];
|
||||
|
||||
self.userView8 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(ScaleWidth(48), self.userView2.top, ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView8];
|
||||
|
||||
self.userView6 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView8.left, self.userView4.top, ScaleWidth(56), ScaleWidth(71))];
|
||||
[self.centerBgView addSubview:self.userView6];
|
||||
|
||||
|
||||
self.userView4 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.right-40-100, self.bgImageView.bottom-55-100, 100, 100)];
|
||||
[self addSubview:self.userView4];
|
||||
// [self.userView4 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.right.equalTo(self.bgImageView).offset(-40);
|
||||
// make.bottom.equalTo(self.bgImageView).offset(-55);
|
||||
// make.width.mas_equalTo(100);
|
||||
// make.height.mas_equalTo(100);
|
||||
// }];
|
||||
[self.userViews addObject:self.userView1];
|
||||
[self.userViews addObject:self.userView2];
|
||||
[self.userViews addObject:self.userView3];
|
||||
[self.userViews addObject:self.userView4];
|
||||
[self.userViews addObject:self.userView5];
|
||||
[self.userViews addObject:self.userView6];
|
||||
[self.userViews addObject:self.userView7];
|
||||
[self.userViews addObject:self.userView8];
|
||||
self.userView1.alpha = 0;
|
||||
self.userView2.alpha = 0;
|
||||
self.userView3.alpha = 0;
|
||||
self.userView4.alpha = 0;
|
||||
|
||||
self.userView5.alpha = 0;
|
||||
self.userView6.alpha = 0;
|
||||
self.userView7.alpha = 0;
|
||||
self.userView8.alpha = 0;
|
||||
MJWeakSelf
|
||||
[self.userView1 addTapBlock:^(id _Nonnull obj) {
|
||||
if (weakSelf.userBlock) {
|
||||
@@ -162,13 +186,63 @@
|
||||
weakSelf.userBlock(weakSelf.userView4.model);
|
||||
}
|
||||
}];
|
||||
[self.userView5 addTapBlock:^(id _Nonnull obj) {
|
||||
if (weakSelf.userBlock) {
|
||||
weakSelf.userBlock(weakSelf.userView5.model);
|
||||
}
|
||||
}];
|
||||
|
||||
[self.userView6 addTapBlock:^(id _Nonnull obj) {
|
||||
if (weakSelf.userBlock) {
|
||||
weakSelf.userBlock(weakSelf.userView6.model);
|
||||
}
|
||||
}];
|
||||
|
||||
[self.userView7 addTapBlock:^(id _Nonnull obj) {
|
||||
if (weakSelf.userBlock) {
|
||||
weakSelf.userBlock(weakSelf.userView7.model);
|
||||
}
|
||||
}];
|
||||
|
||||
[self.userView8 addTapBlock:^(id _Nonnull obj) {
|
||||
if (weakSelf.userBlock) {
|
||||
weakSelf.userBlock(weakSelf.userView8.model);
|
||||
}
|
||||
}];
|
||||
[self startAnimate];
|
||||
[self.userView1 startSmoothFloatAnimation];
|
||||
[self.userView2 startSmoothFloatAnimation];
|
||||
[self.userView3 startSmoothFloatAnimation];
|
||||
[self.userView4 startSmoothFloatAnimation];
|
||||
[self.userView5 startSmoothFloatAnimation];
|
||||
[self.userView6 startSmoothFloatAnimation];
|
||||
[self.userView7 startSmoothFloatAnimation];
|
||||
[self.userView8 startSmoothFloatAnimation];
|
||||
}
|
||||
|
||||
-(void)startAnimate{
|
||||
CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
|
||||
//旋转角度
|
||||
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI];
|
||||
//每次旋转的时间(单位秒)
|
||||
rotationAnimation.duration = 15;
|
||||
rotationAnimation.cumulative = YES;
|
||||
rotationAnimation.removedOnCompletion = NO;
|
||||
//重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT
|
||||
rotationAnimation.repeatCount = MAXFLOAT;
|
||||
[self.centerBgView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
|
||||
}
|
||||
|
||||
|
||||
-(void)changeAction:(UIButton*)sender{
|
||||
[self.userView1 stopFloatAnimation];
|
||||
[self.userView2 stopFloatAnimation];
|
||||
[self.userView3 stopFloatAnimation];
|
||||
[self.userView4 stopFloatAnimation];
|
||||
// [self.userView1 stopFloatAnimation];
|
||||
// [self.userView2 stopFloatAnimation];
|
||||
// [self.userView3 stopFloatAnimation];
|
||||
// [self.userView4 stopFloatAnimation];
|
||||
// [self.userView5 stopFloatAnimation];
|
||||
// [self.userView6 stopFloatAnimation];
|
||||
// [self.userView7 stopFloatAnimation];
|
||||
// [self.userView8 stopFloatAnimation];
|
||||
|
||||
self.fengcheImageView.alpha = 0;
|
||||
self.fengcheImageView.hidden = NO;
|
||||
@@ -185,13 +259,24 @@
|
||||
self.userView4.centerX = self.bgImageView.centerX;
|
||||
self.userView4.centerY = self.bgImageView.centerY;
|
||||
|
||||
self.userView5.centerX = self.bgImageView.centerX;
|
||||
self.userView5.centerY = self.bgImageView.centerY;
|
||||
self.userView6.centerX = self.bgImageView.centerX;
|
||||
self.userView6.centerY = self.bgImageView.centerY;
|
||||
self.userView7.centerX = self.bgImageView.centerX;
|
||||
self.userView7.centerY = self.bgImageView.centerY;
|
||||
self.userView8.centerX = self.bgImageView.centerX;
|
||||
self.userView8.centerY = self.bgImageView.centerY;
|
||||
|
||||
self.userView1.alpha = 0;
|
||||
self.userView2.alpha = 0;
|
||||
self.userView3.alpha = 0;
|
||||
self.userView4.alpha = 0;
|
||||
|
||||
|
||||
self.userView5.alpha = 0;
|
||||
self.userView6.alpha = 0;
|
||||
self.userView7.alpha = 0;
|
||||
self.userView8.alpha = 0;
|
||||
|
||||
} completion:^(BOOL finished) {
|
||||
self.changeBtn.hidden = YES;
|
||||
@@ -218,24 +303,32 @@
|
||||
self.changeBtn.alpha = 0;
|
||||
self.changeBtn.hidden = NO;
|
||||
self.fengcheImageView.hidden = YES;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self configData];
|
||||
});
|
||||
|
||||
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.changeBtn.alpha = 1;
|
||||
self.userView1.frame = CGRectMake(self.bgImageView.left+40, self.bgImageView.top+28, 100, 100);
|
||||
self.userView2.frame = CGRectMake(self.bgImageView.right-40-100, self.bgImageView.top+28, 100, 100);
|
||||
self.userView3.frame = CGRectMake(self.bgImageView.left+40, self.bgImageView.bottom-55-100, 100, 100);
|
||||
self.userView4.frame = CGRectMake(self.bgImageView.right-40-100, self.bgImageView.bottom-55-100, 100, 100);
|
||||
|
||||
self.userView1.frame = CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView2.frame = CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView3.frame = CGRectMake(SCREEN_WIDTH-ScaleWidth(66), (self.centerBgView.height-ScaleWidth(71))/2, ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView4.frame = CGRectMake(self.userView2.left, self.userView3.bottom+ScaleWidth(32), ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView5.frame = CGRectMake(self.userView1.left, self.centerBgView.height-ScaleWidth(71), ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView7.frame = CGRectMake(ScaleWidth(10), self.userView3.top, ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView8.frame = CGRectMake(ScaleWidth(48), self.userView2.top, ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView6.frame = CGRectMake(self.userView8.left, self.userView4.top, ScaleWidth(56), ScaleWidth(71));
|
||||
self.userView1.alpha = 1;
|
||||
self.userView2.alpha = 1;
|
||||
self.userView3.alpha = 1;
|
||||
self.userView4.alpha = 1;
|
||||
|
||||
self.userView5.alpha = 1;
|
||||
self.userView6.alpha = 1;
|
||||
self.userView7.alpha = 1;
|
||||
self.userView8.alpha = 1;
|
||||
} completion:^(BOOL finished) {
|
||||
[self.userView1 startSmoothFloatAnimation];
|
||||
[self.userView2 startSmoothFloatAnimation];
|
||||
[self.userView3 startSmoothFloatAnimation];
|
||||
[self.userView4 startSmoothFloatAnimation];
|
||||
|
||||
}];
|
||||
}
|
||||
-(void)setUsers:(NSArray *)users{
|
||||
@@ -245,7 +338,7 @@
|
||||
|
||||
-(void)configData{
|
||||
[self.randomArray removeAllObjects];
|
||||
if (_users.count <= 4) {
|
||||
if (_users.count <= 8) {
|
||||
[self.randomArray addObjectsFromArray:self.users];
|
||||
}else{
|
||||
NSArray *rArr = [self optimizedRandomFourNumbers];
|
||||
@@ -267,8 +360,8 @@
|
||||
[allNumbers addObject:@(i)];
|
||||
}
|
||||
|
||||
NSMutableArray *result = [NSMutableArray arrayWithCapacity:4];
|
||||
for (int i = 0; i < 4; i++) {
|
||||
NSMutableArray *result = [NSMutableArray arrayWithCapacity:8];
|
||||
for (int i = 0; i < 8; i++) {
|
||||
int remainingCount = (int)allNumbers.count;
|
||||
int randomIndex = arc4random_uniform(remainingCount);
|
||||
[result addObject:allNumbers[randomIndex]];
|
||||
@@ -309,27 +402,39 @@
|
||||
self.nameLabel.text = model.nickname;
|
||||
UIImage *sexImage = [UIImage imageNamed:model.sex.intValue==1?@"user_sex_boy":@"user_sex_girl"];
|
||||
self.sexImageView.image = sexImage;
|
||||
self.nameBgView.hidden = NO;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.headerImageView = [[UIImageView alloc] init];
|
||||
self.headerImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[self.headerImageView addRoundedCornersWithRadius:35];
|
||||
// self.headerImageView.backgroundColor = [UIColor brownColor];;
|
||||
[self.headerImageView addRoundedCornersWithRadius:self.width/2];
|
||||
[self addSubview:self.headerImageView];
|
||||
[self.headerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.centerX.equalTo(self);
|
||||
make.height.width.mas_offset(70);
|
||||
make.centerX.equalTo(self);
|
||||
make.top.equalTo(self);
|
||||
make.height.width.mas_offset(self.width);
|
||||
}];
|
||||
|
||||
|
||||
self.nameLabel = [[UILabel alloc] init];
|
||||
self.nameLabel.textColor = RGB16(0x333333);
|
||||
self.nameLabel.font = [UIFont systemFontOfSize:14];
|
||||
// self.nameLabel.text = @"张三";
|
||||
self.nameLabel.textColor = RGB16(0xe5e5e5);
|
||||
self.nameLabel.font = [UIFont systemFontOfSize:9];
|
||||
[self addSubview:self.nameLabel];
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.headerImageView.mas_bottom).offset(8);
|
||||
make.top.equalTo(self.headerImageView.mas_bottom).offset(2);
|
||||
make.centerX.equalTo(self);
|
||||
make.height.mas_equalTo(20);
|
||||
make.height.mas_equalTo(ScaleWidth(15));
|
||||
}];
|
||||
|
||||
self.nameBgView = [[UIView alloc] init];
|
||||
self.nameBgView.hidden = YES;
|
||||
self.nameBgView.backgroundColor = RGB16A(0x000000, 0.58);
|
||||
[self.nameBgView addRoundedCornersWithRadius:ScaleWidth(15)/2];
|
||||
[self insertSubview:self.nameBgView belowSubview:self.nameLabel];
|
||||
[self.nameBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.equalTo(self.nameLabel);
|
||||
make.left.mas_equalTo(-8);
|
||||
make.right.mas_equalTo(8);
|
||||
}];
|
||||
|
||||
self.sexImageView = [[UIImageView alloc] init];
|
||||
@@ -340,37 +445,20 @@
|
||||
}];
|
||||
}
|
||||
- (void)startSmoothFloatAnimation {
|
||||
[self animateFloatUp];
|
||||
// [self animateFloatUp];
|
||||
CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
|
||||
//旋转角度
|
||||
rotationAnimation.toValue = [NSNumber numberWithFloat: -M_PI];
|
||||
//每次旋转的时间(单位秒)
|
||||
rotationAnimation.duration = 15;
|
||||
rotationAnimation.cumulative = YES;
|
||||
rotationAnimation.removedOnCompletion = NO;
|
||||
//重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT
|
||||
rotationAnimation.repeatCount = MAXFLOAT;
|
||||
[self.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
|
||||
}
|
||||
|
||||
- (void)animateFloatUp {
|
||||
CGFloat floatDistance = 10.0f;
|
||||
CGFloat duration = 2.0f;
|
||||
|
||||
[UIView animateWithDuration:duration
|
||||
delay:0
|
||||
options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction
|
||||
animations:^{
|
||||
self.transform = CGAffineTransformMakeTranslation(0, -floatDistance);
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
[self animateFloatDown];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)animateFloatDown {
|
||||
CGFloat duration = 2.0f;
|
||||
|
||||
[UIView animateWithDuration:duration
|
||||
delay:0
|
||||
options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction
|
||||
animations:^{
|
||||
self.transform = CGAffineTransformIdentity;
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
[self animateFloatUp];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)stopFloatAnimation {
|
||||
[self.layer removeAllAnimations];
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
[self getRechargePermission];
|
||||
}
|
||||
|
||||
- (void)initSubViews{
|
||||
@@ -140,7 +141,7 @@
|
||||
// make.width.height.mas_equalTo(ScaleWidth(57));
|
||||
// }];
|
||||
[self getBanner];
|
||||
[self getRechargePermission];
|
||||
// [self getRechargePermission];
|
||||
self.appStoreView.hidden = YES;
|
||||
[self.view addSubview:self.appStoreView];
|
||||
|
||||
@@ -193,7 +194,7 @@
|
||||
-(void)getRechargePermission{
|
||||
// sky_drop_gift_icon ,new_people_recharge_icon ,first_recharge_icon
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork getRechargePermissionSuccessBlock:^(QXRechargePermissionModel * _Nonnull model) {
|
||||
[QXHomePageNetwork getRechargePermissionSuccessBlock:^(QXRechargePermissionModel * _Nonnull model, BOOL isAppStore) {
|
||||
@strongify(self)
|
||||
self.permissionModel = model;
|
||||
[self.rechargePermissionArray removeAllObjects];
|
||||
@@ -222,7 +223,11 @@
|
||||
if (imgs.count==0) {
|
||||
return;
|
||||
}
|
||||
if (isAppStore) {
|
||||
self.rechargePermissionView.hidden = YES;
|
||||
}else{
|
||||
self.rechargePermissionView.hidden = NO;
|
||||
}
|
||||
self.rechargePermissionView.imageURLStringsGroup = imgs;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
充值权限
|
||||
*/
|
||||
+(void)getRechargePermissionSuccessBlock:(void (^)(QXRechargePermissionModel *model))successBlock
|
||||
+(void)getRechargePermissionSuccessBlock:(void (^)(QXRechargePermissionModel *model,BOOL isAppStore))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
/**
|
||||
天降好礼
|
||||
|
||||
@@ -131,11 +131,12 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
+(void)getRechargePermissionSuccessBlock:(void (^)(QXRechargePermissionModel * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
+(void)getRechargePermissionSuccessBlock:(void (^)(QXRechargePermissionModel * _Nonnull, BOOL))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXAppRechargePermission parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
BOOL api_version = [responseObject[@"api_version"] boolValue];
|
||||
QXRechargePermissionModel *model = [QXRechargePermissionModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
successBlock(model);
|
||||
successBlock(model,api_version);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
|
||||
@@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UIView *displayMaskView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *IDLabel;
|
||||
@property (weak, nonatomic) IBOutlet MarqueeLabel *nameLabel;
|
||||
@property (weak, nonatomic) IBOutlet MarqueeLabel *appStoreNameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *countLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *roomTypeView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *animateImageView;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
[self.coverImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover]];
|
||||
self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_number];
|
||||
self.nameLabel.text = [NSString stringWithFormat:@"%@",model.room_name];
|
||||
self.appStoreNameLabel.text = [NSString stringWithFormat:@"%@",model.room_name];
|
||||
self.countLabel.text = [NSString qx_showHotCountNum:model.hot_value.longLongValue];
|
||||
// if ([model.label_id isEqualToString:@"23"]) {
|
||||
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7153"];
|
||||
@@ -53,6 +54,17 @@
|
||||
self.countLabel.text = [NSString qx_showHotCountNum:searchModel.hot_value.longLongValue];
|
||||
[self.roomTypeView sd_setImageWithURL:[NSURL URLWithString:searchModel.label_icon]];
|
||||
}
|
||||
-(void)setIsAppStore:(BOOL)isAppStore{
|
||||
_isAppStore = isAppStore;
|
||||
if (isAppStore) {
|
||||
self.appStoreNameLabel.hidden = NO;
|
||||
self.nameLabel.hidden = YES;
|
||||
}else{
|
||||
self.appStoreNameLabel.hidden = YES;
|
||||
self.nameLabel.hidden = NO;
|
||||
}
|
||||
|
||||
}
|
||||
//-(void)setHotRoomModel:(SRHomeChatRoomListModel *)hotRoomModel{
|
||||
// _hotRoomModel = hotRoomModel;
|
||||
// [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:hotRoomModel.cover_picture]];
|
||||
|
||||
@@ -109,6 +109,17 @@
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三李四王" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EgE-mA-IY6" customClass="MarqueeLabel">
|
||||
<rect key="frame" x="8" y="239.66666666666666" width="276" height="14.333333333333343"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="marqueeType">
|
||||
<integer key="value" value="0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三李四王" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V8F-du-Rah" customClass="MarqueeLabel">
|
||||
<rect key="frame" x="8" y="258" width="65" height="14.333333333333314"/>
|
||||
<constraints>
|
||||
@@ -130,14 +141,17 @@
|
||||
<constraint firstItem="V8F-du-Rah" firstAttribute="centerY" secondItem="FdH-8c-jAP" secondAttribute="centerY" id="1Yd-6L-A2k"/>
|
||||
<constraint firstItem="074-Lr-sTa" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="12" id="3jT-jw-g2s"/>
|
||||
<constraint firstItem="raq-XK-qhh" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="65M-Vz-wVN"/>
|
||||
<constraint firstItem="EgE-mA-IY6" firstAttribute="leading" secondItem="V8F-du-Rah" secondAttribute="leading" id="8jK-In-uoQ"/>
|
||||
<constraint firstItem="GYb-S9-FB8" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="Ejx-IG-t0a"/>
|
||||
<constraint firstItem="nPz-Ym-vpk" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="IlJ-YP-mXS"/>
|
||||
<constraint firstItem="074-Lr-sTa" firstAttribute="top" secondItem="EgE-mA-IY6" secondAttribute="bottom" constant="2" id="J5p-tp-Jph"/>
|
||||
<constraint firstItem="qsd-Ig-Nmi" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="8" id="O5K-MQ-58N"/>
|
||||
<constraint firstItem="FdH-8c-jAP" firstAttribute="centerY" secondItem="074-Lr-sTa" secondAttribute="centerY" id="SJP-Iu-Agm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="raq-XK-qhh" secondAttribute="trailing" id="Sr2-8l-I7Z"/>
|
||||
<constraint firstAttribute="trailing" secondItem="FdH-8c-jAP" secondAttribute="trailing" constant="12" id="Vg4-Bv-qiW"/>
|
||||
<constraint firstItem="nPz-Ym-vpk" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="WJN-ti-QhO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="nPz-Ym-vpk" secondAttribute="bottom" id="aif-M8-0Jh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EgE-mA-IY6" secondAttribute="trailing" constant="10" id="dhp-tQ-3T6"/>
|
||||
<constraint firstAttribute="bottom" secondItem="raq-XK-qhh" secondAttribute="bottom" id="eE2-ef-bWE"/>
|
||||
<constraint firstItem="qsd-Ig-Nmi" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="8" id="gwT-Kf-zHQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="GYb-S9-FB8" secondAttribute="trailing" id="mDi-oS-hhJ"/>
|
||||
@@ -150,6 +164,7 @@
|
||||
<connections>
|
||||
<outlet property="IDLabel" destination="074-Lr-sTa" id="e79-2B-vZT"/>
|
||||
<outlet property="animateImageView" destination="T17-NM-Dxi" id="umd-Lq-85F"/>
|
||||
<outlet property="appStoreNameLabel" destination="EgE-mA-IY6" id="zKo-hi-h1M"/>
|
||||
<outlet property="countLabel" destination="BSc-rv-bf4" id="3DZ-sZ-CCV"/>
|
||||
<outlet property="coverImageView" destination="nPz-Ym-vpk" id="3tk-L4-05N"/>
|
||||
<outlet property="displayMaskView" destination="raq-XK-qhh" id="gYi-Af-gep"/>
|
||||
@@ -160,6 +175,6 @@
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="room_hot_icon" width="16" height="16"/>
|
||||
<image name="room_hot_icon" width="14" height="14"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
@property (nonatomic,strong)UIImageView *logoImageView;
|
||||
@property (nonatomic,strong)UILabel *welcomeLabel;
|
||||
@property (nonatomic,strong)UILabel *subTitleLabel;
|
||||
@property (nonatomic,strong)UILabel *loginMessageLabel;
|
||||
@property (nonatomic,strong)QXLoginTextField *accountTextField;
|
||||
@property (nonatomic,strong)QXLoginTextField *codeTextField;
|
||||
@property (nonatomic,strong)QXLoginTextField *passwordTextField;
|
||||
@@ -120,6 +121,12 @@
|
||||
[self.changeTypeBtn addTarget:self action:@selector(changeAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.view addSubview:self.changeTypeBtn];
|
||||
|
||||
self.loginMessageLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.accountTextField.left+20, self.changeTypeBtn.top, 200, 40)];
|
||||
self.loginMessageLabel.textColor = QXConfig.textColor;
|
||||
self.loginMessageLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.loginMessageLabel.text = @"首次登录即注册";
|
||||
[self.view addSubview:self.loginMessageLabel];
|
||||
|
||||
self.loginBtn = [[UIButton alloc] initWithFrame:CGRectMake(38, self.codeTextField.bottom+55, SCREEN_WIDTH-38*2, 42)];
|
||||
[self.loginBtn setTitle:QXText(@"验证并登录") forState:(UIControlStateNormal)];
|
||||
[self.loginBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
|
||||
|
||||
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXAgoraEngineEx : NSObject
|
||||
+ (instancetype)sharedEngine;
|
||||
-(void)joinExWithAgora_token:(NSString*)agora_token channel:(NSString*)channel;
|
||||
-(void)joinExWithAgora_token:(NSString*)agora_token channel:(NSString*)channel pkUserId:(NSString*)pkUserId;
|
||||
- (void)muteLocalEXAudioStream:(BOOL)mute fromUserInfo:(QXUserHomeModel *)fromUserInfo;;
|
||||
|
||||
- (void)muteRemoteEXAudioStream:(BOOL)mute;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
@property (nonatomic,strong)NSString*channel;
|
||||
@property (nonatomic,strong)AgoraRtcConnection *connection;
|
||||
@property (nonatomic,strong)AgoraRtcChannelMediaOptions *option;
|
||||
@property (nonatomic,strong)NSString *pkUserId;
|
||||
@end
|
||||
@implementation QXAgoraEngineEx
|
||||
|
||||
@@ -22,18 +23,25 @@
|
||||
});
|
||||
return instance;
|
||||
}
|
||||
-(void)joinExWithAgora_token:(NSString*)agora_token channel:(NSString*)channel{
|
||||
-(void)joinExWithAgora_token:(NSString*)agora_token channel:(NSString*)channel pkUserId:(NSString*)pkUserId{
|
||||
// AgoraRtcChannelMediaOptions *option = [AgoraRtcChannelMediaOptions new];
|
||||
// option.publishMicrophoneTrack = YES;
|
||||
// option.publishMediaPlayerAudioTrack = YES;
|
||||
// option.enableAudioRecordingOrPlayout = YES;
|
||||
_pkUserId = pkUserId;
|
||||
AgoraRtcConnection *connection = [[AgoraRtcConnection alloc] initWithChannelId:channel localUid:QXGlobal.shareGlobal.loginModel.user_id.longLongValue];
|
||||
_channel = channel;
|
||||
_connection = connection;
|
||||
MJWeakSelf
|
||||
int result = [[QXAgoraEngine sharedEngine].agoraKit joinChannelExByToken:agora_token connection:connection delegate:self mediaOptions:self.option joinSuccess:^(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed) {
|
||||
/// 此处为:声网加入扩展流成功回调
|
||||
|
||||
/// 打开自己在扩展流的推流权限
|
||||
[[QXAgoraEngine sharedEngine].agoraKit muteLocalAudioStreamEx:NO connection:connection];
|
||||
[[QXAgoraEngine sharedEngine].agoraKit muteAllRemoteAudioStreamsEx:NO connection:connection];;
|
||||
/// 屏蔽扩展流中所有人的流
|
||||
[[QXAgoraEngine sharedEngine].agoraKit muteAllRemoteAudioStreamsEx:YES connection:connection];;
|
||||
/// 只接收扩展流中对方主持的流 pkUserId
|
||||
[[QXAgoraEngine sharedEngine].agoraKit muteRemoteAudioStreamEx:pkUserId.longLongValue mute:NO connection:connection];;
|
||||
}];
|
||||
QXLOG(@"声网加入扩展流result---->%d",result)
|
||||
}
|
||||
@@ -67,8 +75,8 @@
|
||||
|
||||
}
|
||||
-(void)muteRemoteEXAudioStream:(BOOL)mute{
|
||||
int result = [[QXAgoraEngine sharedEngine].agoraKit muteAllRemoteAudioStreamsEx:mute connection:_connection];;
|
||||
|
||||
// int result = [[QXAgoraEngine sharedEngine].agoraKit muteAllRemoteAudioStreamsEx:mute connection:_connection];;
|
||||
int result = [[QXAgoraEngine sharedEngine].agoraKit muteRemoteAudioStreamEx:_pkUserId.longLongValue mute:mute connection:_connection];;
|
||||
QXLOG(@"声网屏蔽远端声音result---->%d",result)
|
||||
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 根据用户userid 插入消息
|
||||
-(void)didInsertMessge:(QXRoomChatListModel*)message userId:(NSString*)userId;
|
||||
/// 上下麦
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel*)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel*)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
|
||||
/// 上麦模式发生变化 2 自由麦 | 1 排麦
|
||||
-(void)aplayPitModeDidChanged:(NSString*)upMicType;
|
||||
/// 排麦人数发生变化
|
||||
@@ -192,7 +192,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 10秒自动校正在线人数
|
||||
-(void)roomOnlineNumberDidChangedOnlineNumber:(NSString*)onlineNumber;
|
||||
/// 房间换麦
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo;
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,12 +30,6 @@
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
/// 设置聊天消息是否展示已读未读,只有旗舰版才支持
|
||||
#if DEVELOPENT == 1
|
||||
[TUIChatConfig defaultConfig].msgNeedReadReceipt = NO;
|
||||
#else
|
||||
[TUIChatConfig defaultConfig].msgNeedReadReceipt = YES;
|
||||
#endif
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -172,11 +166,14 @@
|
||||
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
||||
model.messageType = QXRoomChatMessageTypeSystem;
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
|
||||
if (!model.is_pk) {
|
||||
// 非pk房间的消息插入公屏
|
||||
[self.delegate didInsertMessge:model];
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didUpDownSeatWithUser:isUpSeat:pit_number:)]) {
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didUpDownSeatWithUser:isUpSeat:pit_number:isPK:)]) {
|
||||
NSString *pit_number = [NSString stringWithFormat:@"%@",msg.Text[@"pit_number"]];
|
||||
[self.delegate didUpDownSeatWithUser:model.FromUserInfo isUpSeat:YES pit_number:pit_number.integerValue];
|
||||
[self.delegate didUpDownSeatWithUser:model.FromUserInfo isUpSeat:YES pit_number:pit_number.integerValue isPK:model.is_pk];
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -185,11 +182,14 @@
|
||||
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
||||
model.messageType = QXRoomChatMessageTypeSystem;
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
|
||||
if (!model.is_pk) {
|
||||
// 非pk房间的消息插入公屏
|
||||
[self.delegate didInsertMessge:model];
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didUpDownSeatWithUser:isUpSeat:pit_number:)]) {
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didUpDownSeatWithUser:isUpSeat:pit_number:isPK:)]) {
|
||||
NSString *pit_number = [NSString stringWithFormat:@"%@",msg.Text[@"pit_number"]];
|
||||
[self.delegate didUpDownSeatWithUser:model.FromUserInfo isUpSeat:NO pit_number:pit_number.integerValue];
|
||||
[self.delegate didUpDownSeatWithUser:model.FromUserInfo isUpSeat:NO pit_number:pit_number.integerValue isPK:model.is_pk];
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -599,14 +599,17 @@
|
||||
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
||||
NSInteger fromPitNumber = [msg.Text[@"from_pit_number"] integerValue];
|
||||
NSInteger toPitNumber = [msg.Text[@"to_pit_number"] integerValue];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(roomSeatExchangedWithFromPitNumber:toPitNumber:userInfo:)]) {
|
||||
[self.delegate roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:model.FromUserInfo];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(roomSeatExchangedWithFromPitNumber:toPitNumber:userInfo:isPK:)]) {
|
||||
[self.delegate roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:model.FromUserInfo isPK:model.is_pk];
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
|
||||
if (!model.is_pk) {
|
||||
// 非pk房间的消息插入公屏
|
||||
model.messageType = QXRoomChatMessageTypeSystem;
|
||||
[self.delegate didInsertMessge:model];
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case QXRoomMessageTypeRoomClearUserCharm:{
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
#import "TUIChatConfig_Classic.h"
|
||||
#import "QXUserHomePageViewController.h"
|
||||
#import "QXGuildGroupSettingVC.h"
|
||||
@interface QXChatViewController ()<TUIChatConfigDelegate_Classic>
|
||||
#import "QXMenuPopView.h"
|
||||
#import "QXReportViewController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
@interface QXChatViewController ()<TUIChatConfigDelegate_Classic,QXMenuPopViewDelegate>
|
||||
@property (nonatomic,strong)QXChatTitleView *titleView;
|
||||
@end
|
||||
|
||||
@@ -35,11 +38,14 @@
|
||||
// backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading;
|
||||
[backBtn addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
|
||||
|
||||
|
||||
|
||||
|
||||
UIButton*moreBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
|
||||
[moreBtn setImage:[UIImage imageNamed:@"dynamic_more"] forState:(UIControlStateNormal)];
|
||||
// backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading;
|
||||
[moreBtn addTarget:self action:@selector(moreAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:moreBtn];
|
||||
}
|
||||
|
||||
|
||||
-(BOOL)onUserAvatarClicked:(UIView *)view messageCellData:(TUIMessageCellData *)celldata{
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
NSString *userId = [celldata.identifier stringByReplacingOccurrencesOfString:@"u" withString:@""];
|
||||
@@ -69,11 +75,32 @@
|
||||
}
|
||||
}
|
||||
-(void)moreAction{
|
||||
if (self.data.groupID.length>0) {
|
||||
QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init];
|
||||
vc.groupId = [self.data.groupID stringByReplacingOccurrencesOfString:@"g" withString:@""];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}else{
|
||||
QXMenuPopView *menuView = [[QXMenuPopView alloc] initWithPoint:CGPointMake(SCREEN_WIDTH-60, NavContentHeight+10)];
|
||||
menuView.dataArray = @[QXText(@"举报"),QXText(@"拉黑")];
|
||||
menuView.delegate = self;
|
||||
[menuView showInView:KEYWINDOW];
|
||||
}
|
||||
}
|
||||
-(void)didSelectedIndex:(NSInteger)index menuTitle:(NSString*)menuTitle{
|
||||
NSString *userId = [self.data.userID substringFromIndex:1];
|
||||
if ([menuTitle isEqualToString:QXText(@"举报")]) {
|
||||
QXReportViewController *reportVC = [[QXReportViewController alloc] init];
|
||||
reportVC.reportType = @"1";
|
||||
reportVC.fromId = userId;
|
||||
[self.navigationController pushViewController:reportVC animated:YES];
|
||||
}else if ([menuTitle isEqualToString:QXText(@"拉黑")]) {
|
||||
[QXMineNetwork addOrRemoveBlackListIsAdd:YES userId:userId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"操作成功");
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)initSubViews{
|
||||
[TUIChatConfig_Classic sharedConfig].delegate = self;
|
||||
@@ -84,11 +111,7 @@
|
||||
vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight);
|
||||
[self addChildViewController:vc];
|
||||
[self.view addSubview:vc.view];
|
||||
UIButton*moreBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
|
||||
[moreBtn setImage:[UIImage imageNamed:@"dynamic_more"] forState:(UIControlStateNormal)];
|
||||
// backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading;
|
||||
[moreBtn addTarget:self action:@selector(moreAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:moreBtn];
|
||||
|
||||
}else{
|
||||
TUIC2CChatViewController *vc = [[TUIC2CChatViewController alloc] init];
|
||||
[vc setConversationData:self.data];
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
[self getUserInfo];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)initSubViews{
|
||||
@@ -185,6 +186,7 @@
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView];
|
||||
cell.delegate = self;
|
||||
[cell cellReload];
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
@@ -309,6 +309,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSString *pk_room_id;
|
||||
/// pk发起者
|
||||
@property (nonatomic,strong)NSString *invite_pk_user_id;
|
||||
/// pk接受者
|
||||
@property (nonatomic,strong)NSString *receive_pk_user_id;
|
||||
/// pkid
|
||||
@property (nonatomic,strong)NSString *pk_id;
|
||||
/// 剩余时间
|
||||
|
||||
@@ -16,7 +16,16 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
@interface QXMineServiceCell : UITableViewCell
|
||||
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
|
||||
-(void)cellReload;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
@interface QXMineServiceSubCell : UICollectionViewCell
|
||||
@property (nonatomic,strong)UIImageView *imageView;
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
//
|
||||
|
||||
#import "QXMineServiceCell.h"
|
||||
@interface QXMineServiceCell()
|
||||
@class QXMineServiceSubCell;
|
||||
@interface QXMineServiceCell()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@property (nonatomic,strong)NSArray *serviceArray;
|
||||
@property (nonatomic,strong)NSArray *serviceImageArray;
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
@property (nonatomic,strong)NSMutableArray *serviceArray;
|
||||
@property (nonatomic,strong)NSMutableArray *serviceImageArray;
|
||||
@end
|
||||
|
||||
@implementation QXMineServiceCell
|
||||
@@ -51,74 +53,107 @@
|
||||
make.right.mas_equalTo(-12);
|
||||
make.height.mas_equalTo(24);
|
||||
}];
|
||||
|
||||
|
||||
NSInteger maxCount = 4;
|
||||
CGFloat btnWith = (SCREEN_WIDTH-32)/maxCount;
|
||||
CGFloat btnWith = (int)(SCREEN_WIDTH-32-1)/maxCount;
|
||||
CGFloat btnHeight = 44;
|
||||
for (int i = 0; i < self.serviceArray.count; i++) {
|
||||
NSInteger col = i / maxCount;
|
||||
NSInteger line = i % maxCount;
|
||||
UIButton *btn = [[UIButton alloc] init];
|
||||
[self.bgView addSubview:btn];
|
||||
[btn setTitle:self.serviceArray[i] forState:(UIControlStateNormal)];
|
||||
[btn setTitleColor:[UIColor clearColor] forState:(UIControlStateNormal)];
|
||||
[btn addTarget:self action:@selector(serviceClick:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(line*btnWith);
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).offset(13+col*(btnHeight+13));
|
||||
make.height.mas_equalTo(btnHeight);
|
||||
make.width.mas_equalTo(btnWith);
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(btnWith, btnHeight);
|
||||
layout.minimumLineSpacing = 10;
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
[self.collectionView registerClass:[QXMineServiceSubCell class] forCellWithReuseIdentifier:@"QXMineServiceSubCell"];
|
||||
self.collectionView.delegate = self;
|
||||
self.collectionView.dataSource = self;
|
||||
self.collectionView.showsHorizontalScrollIndicator = NO;
|
||||
self.collectionView.bounces = NO;
|
||||
self.collectionView.backgroundColor = UIColor.clearColor;
|
||||
[self.bgView addSubview:self.collectionView];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self.bgView);
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).offset(22);
|
||||
make.height.mas_equalTo(btnHeight*2+10);
|
||||
// make.right.mas_equalTo(-12);
|
||||
}];
|
||||
|
||||
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:self.serviceImageArray[i]]];
|
||||
[self.bgView addSubview:imageView];
|
||||
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.centerX.equalTo(btn);
|
||||
make.height.width.mas_equalTo(18);
|
||||
}];
|
||||
|
||||
UILabel *titleLabel = [[UILabel alloc] init];
|
||||
titleLabel.textColor = QXConfig.textColor;
|
||||
titleLabel.text = self.serviceArray[i];
|
||||
titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.bgView addSubview:titleLabel];
|
||||
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(imageView.mas_bottom).offset(3);
|
||||
make.centerX.equalTo(btn);
|
||||
make.height.mas_equalTo(17);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
// for (int i = 0; i < self.serviceArray.count; i++) {
|
||||
// NSInteger col = i / maxCount;
|
||||
// NSInteger line = i % maxCount;
|
||||
// UIButton *btn = [[UIButton alloc] init];
|
||||
// [self.bgView addSubview:btn];
|
||||
// [btn setTitle:self.serviceArray[i] forState:(UIControlStateNormal)];
|
||||
// [btn setTitleColor:[UIColor clearColor] forState:(UIControlStateNormal)];
|
||||
// [btn addTarget:self action:@selector(serviceClick:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
// [btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_equalTo(line*btnWith);
|
||||
// make.top.equalTo(self.titleLabel.mas_bottom).offset(13+col*(btnHeight+13));
|
||||
// make.height.mas_equalTo(btnHeight);
|
||||
// make.width.mas_equalTo(btnWith);
|
||||
// }];
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
}
|
||||
-(void)serviceClick:(UIButton*)sender{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickServiceWithBtn:title:)]) {
|
||||
[self.delegate didClickServiceWithBtn:sender title:sender.titleLabel.text];
|
||||
}
|
||||
}
|
||||
-(NSArray *)serviceArray{
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.serviceArray.count;
|
||||
}
|
||||
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXMineServiceSubCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXMineServiceSubCell" forIndexPath:indexPath];
|
||||
cell.imageView.image = [UIImage imageNamed:self.serviceImageArray[indexPath.row]];
|
||||
cell.titleLabel.text = self.serviceArray[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickServiceWithBtn:title:)]) {
|
||||
[self.delegate didClickServiceWithBtn:nil title:self.serviceArray[indexPath.row]];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)cellReload{
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge){
|
||||
if ([self.serviceArray containsObject:QXText(@"每日任务")]) {
|
||||
return;
|
||||
}
|
||||
[self.serviceArray addObject:QXText(@"每日任务")];
|
||||
[self.serviceImageArray addObject:@"service_task"];
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
}
|
||||
-(NSMutableArray *)serviceArray{
|
||||
if (!_serviceArray) {
|
||||
_serviceArray = @[
|
||||
_serviceArray = [NSMutableArray arrayWithArray:@[
|
||||
QXText(@"钱包"),
|
||||
QXText(@"段位"),
|
||||
QXText(@"公会中心"),
|
||||
QXText(@"个性装扮"),
|
||||
QXText(@"道具商城"),
|
||||
QXText(@"我的背包"),
|
||||
QXText(@"每日任务"),
|
||||
];
|
||||
]];
|
||||
}
|
||||
return _serviceArray;
|
||||
}
|
||||
-(NSArray *)serviceImageArray{
|
||||
-(NSMutableArray *)serviceImageArray{
|
||||
if (!_serviceImageArray) {
|
||||
_serviceImageArray = @[
|
||||
_serviceImageArray = [NSMutableArray arrayWithArray:@[
|
||||
@"service_wallet",
|
||||
@"service_level",
|
||||
@"service_guild",
|
||||
@"service_dress",
|
||||
@"service_shop",
|
||||
@"service_bag",
|
||||
@"service_task",
|
||||
];
|
||||
]];
|
||||
}
|
||||
|
||||
return _serviceImageArray;
|
||||
@@ -135,3 +170,37 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXMineServiceSubCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
UIImageView *imageView = [[UIImageView alloc] init];
|
||||
[self.contentView addSubview:imageView];
|
||||
self.imageView = imageView;
|
||||
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.centerX.equalTo(self.contentView);
|
||||
make.height.width.mas_equalTo(18);
|
||||
}];
|
||||
|
||||
UILabel *titleLabel = [[UILabel alloc] init];
|
||||
titleLabel.textColor = QXConfig.textColor;
|
||||
titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.contentView addSubview:titleLabel];
|
||||
self.titleLabel = titleLabel;
|
||||
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(imageView.mas_bottom).offset(3);
|
||||
make.centerX.equalTo(self.contentView);
|
||||
make.height.mas_equalTo(17);
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
self.rightBgView = [[QXWalletHomeTopSubview alloc] init];
|
||||
self.rightBgView.isCorn = NO;
|
||||
self.rightBgView.delegate = self;
|
||||
self.rightBgView.btn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
|
||||
[self addSubview:self.rightBgView];
|
||||
[self.rightBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-16);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#import "QXMessageServices.h"
|
||||
#import "QXManagerMqtt.h"
|
||||
#import "OpenUDID.h"
|
||||
#import "TUIChatConfig.h"
|
||||
|
||||
@implementation AppDelegate (Login)
|
||||
-(void)configThirdPartLogin{
|
||||
@@ -31,6 +32,13 @@
|
||||
|
||||
- (void)ATAuthSDK {
|
||||
//设置SDK参数,app生命周期内调用一次即可
|
||||
/// 设置聊天消息是否展示已读未读,只有旗舰版才支持
|
||||
#if DEVELOPENT == 1
|
||||
[TUIChatConfig defaultConfig].msgNeedReadReceipt = NO;
|
||||
#else
|
||||
[TUIChatConfig defaultConfig].msgNeedReadReceipt = YES;
|
||||
#endif
|
||||
[TUIChatConfig defaultConfig].enableWelcomeCustomMessage = NO;
|
||||
[[TXCommonHandler sharedInstance] setAuthSDKInfo:AuthSDKKey complete:^(NSDictionary * _Nonnull resultDic) {
|
||||
if ([PNSCodeSuccess isEqualToString:[resultDic objectForKey:@"resultCode"]]) {
|
||||
//success
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group 6931@2x.png",
|
||||
"filename" : "dynamic_copy_link@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group 6931@3x.png",
|
||||
"filename" : "dynamic_copy_link@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_copy_link.imageset/dynamic_copy_link@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_copy_link.imageset/dynamic_copy_link@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Frame 1321316080@2x.png",
|
||||
"filename" : "dynamic_delete@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Frame 1321316080@3x.png",
|
||||
"filename" : "dynamic_delete@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_delete.imageset/dynamic_delete@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_delete.imageset/dynamic_delete@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group 115@2x.png",
|
||||
"filename" : "dynamic_report@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group 115@3x.png",
|
||||
"filename" : "dynamic_report@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_report.imageset/dynamic_report@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_report.imageset/dynamic_report@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
22
QXLive/Other/Assets.xcassets/dynamic/dynamic_user_black.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "dynamic_user_black@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "dynamic_user_black@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_user_black.imageset/dynamic_user_black@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/dynamic_user_black.imageset/dynamic_user_black@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
21
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bg.imageset/exbpansion_bg@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
22
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_bottom_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_bottom_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 466 KiB |
|
After Width: | Height: | Size: 973 KiB |
22
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_leg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_bottom_leg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_bottom_leg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 130 KiB |
22
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_center_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_center_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 298 KiB |
22
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_icon_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_center_icon_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_center_icon_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 37 KiB |
22
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_moon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_moon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_moon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_moon.imageset/exbpansion_moon@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_moon.imageset/exbpansion_moon@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
22
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_word.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_word@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "exbpansion_word@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_word.imageset/exbpansion_word@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_word.imageset/exbpansion_word@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 74 KiB |
@@ -76,7 +76,7 @@ NSPhotoLibraryUsageDescription = "访问您的相册,允许可以把视频保存
|
||||
"此刻想和大家分享点什么" = "此刻想和大家分享点什么";
|
||||
"选择话题" = "选择话题";
|
||||
"发现" = "发现";
|
||||
"扩列" = "扩列";
|
||||
"新人/扩列" = "新人/扩列";
|
||||
"扩列交友" = "扩列交友";
|
||||
"只看女生" = "只看女生";
|
||||
"只看男生" = "只看男生";
|
||||
|
||||
@@ -98,11 +98,18 @@ QXRoomUserInfoViewDelegate
|
||||
[self initRedpacketManager];
|
||||
[self initGiftDriftManager];
|
||||
[self initActivityObeserver];
|
||||
// [self performSelector:@selector(test) afterDelay:5];
|
||||
}
|
||||
//-(void)test{
|
||||
// [self roomPKRecieveLoserWantToRunRoadWithUserInfo:nil];
|
||||
//27b36h
|
||||
//}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
self.dayTaskTagView.hidden = NO;
|
||||
}
|
||||
}
|
||||
-(void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
@@ -288,6 +295,8 @@ QXRoomUserInfoViewDelegate
|
||||
}else{
|
||||
MJWeakSelf
|
||||
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
|
||||
QXGlobal.shareGlobal.roomId = self.roomId;
|
||||
QXGlobal.shareGlobal.roomVC = self;
|
||||
[QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
weakSelf.roomModel = roomModel;
|
||||
[self resetSubviews];
|
||||
@@ -585,7 +594,11 @@ QXRoomUserInfoViewDelegate
|
||||
|
||||
if (self.seatContentView.myPitNumber == 9) {
|
||||
[QXMineNetwork updateShengWangTokenWithRoomId:weakSelf.roomModel.pk_info.pk_room_id successBlock:^(NSString * _Nonnull token) {
|
||||
[[QXAgoraEngineEx sharedEngine] joinExWithAgora_token:token channel:weakSelf.roomModel.pk_info.pk_room_id];
|
||||
NSString *pkUserId = weakSelf.roomModel.pk_info.invite_pk_user_id;
|
||||
if ([pkUserId isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
pkUserId = weakSelf.roomModel.pk_info.receive_pk_user_id;
|
||||
}
|
||||
[[QXAgoraEngineEx sharedEngine] joinExWithAgora_token:token channel:weakSelf.roomModel.pk_info.pk_room_id pkUserId:pkUserId];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
@@ -615,15 +628,16 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
self.bottomView.roomModel = self.roomModel;
|
||||
BOOL hasPK = NO;
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
// if ((self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
hasPK = YES;
|
||||
}
|
||||
BOOL hasSong = NO;
|
||||
if (self.roomModel.room_info.type_id.intValue == 1 || self.roomModel.room_info.type_id.intValue == 3 || self.roomModel.room_info.type_id.intValue == 4 || self.roomModel.room_info.type_id.intValue == 8){
|
||||
if ((self.roomModel.room_info.type_id.intValue == 1) && self.roomModel.room_info.label_id.intValue == 1) {
|
||||
hasSong = YES;
|
||||
}
|
||||
/// 暂时不要pk
|
||||
hasPK = NO;
|
||||
// hasPK = NO;
|
||||
// /// 暂时不要ktv
|
||||
// hasSong = NO;
|
||||
/// 普通麦位
|
||||
@@ -792,8 +806,8 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
}
|
||||
/// 上下麦发生变化
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
[self.seatContentView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
|
||||
[self.seatContentView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
|
||||
if ([user.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:isUpSeat];
|
||||
@@ -825,17 +839,17 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
|
||||
}
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo{
|
||||
[self.seatContentView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo];
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
|
||||
[self.seatContentView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
|
||||
if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
if (toPitNumber == 9) {
|
||||
self.soundBtn.hidden = NO;
|
||||
self.titleView.isCompere = YES;
|
||||
self.seatContentView.myPitNumber = toPitNumber;
|
||||
}else{
|
||||
self.soundBtn.hidden = YES;
|
||||
self.titleView.isCompere = NO;
|
||||
}
|
||||
self.seatContentView.myPitNumber = toPitNumber;
|
||||
}
|
||||
}
|
||||
// 踢出房间
|
||||
@@ -1092,7 +1106,7 @@ QXRoomUserInfoViewDelegate
|
||||
MJWeakSelf
|
||||
QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
|
||||
al.type = QXAlertViewTypeAgreeSong;
|
||||
al.message = [NSString stringWithFormat:@"%@想结束本厂PK,您确定结束吗",fromUserInfo.nickname];
|
||||
al.message = [NSString stringWithFormat:@"%@想结束本场PK,您确定结束吗",fromUserInfo.nickname];
|
||||
al.commitBlock = ^{
|
||||
[QXMineNetwork roomPkEndWithPk_id:weakSelf.roomModel.pk_info.pk_id type:@"3" user_id:[QXGlobal shareGlobal].loginModel.user_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
@@ -1118,20 +1132,40 @@ QXRoomUserInfoViewDelegate
|
||||
// [self getRoomInfo];
|
||||
|
||||
MJWeakSelf
|
||||
// 获取自己房间信息
|
||||
[QXMineNetwork getRoomInfoWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
// 获取自己房间信息成功回调
|
||||
// 更新当前的数据
|
||||
weakSelf.roomModel = roomModel;
|
||||
// 重置视图
|
||||
[weakSelf resetSubviews];
|
||||
// 更新赋值
|
||||
weakSelf.seatContentView.roomModel = roomModel;
|
||||
/// 这里的roomId 是对方的roomid 获取对方房间信息 赋值给右侧视图 pk分为左右两侧 左侧为自己 右侧是对方
|
||||
// 这里的roomId 是对方的roomid 获取对方房间信息 赋值给右侧视图 pk分为左右两侧 左侧为自己 右侧是对方
|
||||
|
||||
// 获取pk的对方的房间信息
|
||||
[QXMineNetwork getRoomInfoWithRoomId:room_id successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
// 获取pk的对方的房间信息成功回调
|
||||
// 赋值
|
||||
weakSelf.seatContentView.pkRoomModel = roomModel;
|
||||
if (self.seatContentView.myPitNumber == 9) {
|
||||
// 如果自己当前在9号麦 加入对方房间
|
||||
[[QXAgoraEngineEx sharedEngine] joinExWithAgora_token:roomModel.user_info.agora_token channel:room_id];
|
||||
}
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
if (weakSelf.seatContentView.myPitNumber == 9) {
|
||||
// 如果自己当前在9号麦 加入对方房间
|
||||
// 获取声网token 这里的roomid是对方房间的roomid
|
||||
[QXMineNetwork updateShengWangTokenWithRoomId:weakSelf.roomModel.pk_info.pk_room_id successBlock:^(NSString * _Nonnull token) {
|
||||
NSString *pkUserId = weakSelf.roomModel.pk_info.invite_pk_user_id;
|
||||
if ([pkUserId isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
pkUserId = weakSelf.roomModel.pk_info.receive_pk_user_id;
|
||||
}
|
||||
/// 加入扩展流
|
||||
[[QXAgoraEngineEx sharedEngine] joinExWithAgora_token:token channel:weakSelf.roomModel.pk_info.pk_room_id pkUserId:pkUserId];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
@@ -1418,7 +1452,9 @@ QXRoomUserInfoViewDelegate
|
||||
self.userInfoView.isOwner = NO;
|
||||
self.userInfoView.isManager = NO;
|
||||
self.userInfoView.roomId = pkRoomId;
|
||||
self.userInfoView.isPK = YES;
|
||||
}else{
|
||||
self.userInfoView.isPK = NO;
|
||||
if (self.seatContentView.myPitNumber == 9 || self.roomModel.user_info.is_host.intValue == 1) {
|
||||
self.userInfoView.isCompere = YES;
|
||||
}else{
|
||||
@@ -2027,6 +2063,7 @@ QXRoomUserInfoViewDelegate
|
||||
-(QXRoomDayTaskTagView *)dayTaskTagView{
|
||||
if (!_dayTaskTagView) {
|
||||
_dayTaskTagView = [[QXRoomDayTaskTagView alloc] init];
|
||||
_dayTaskTagView.hidden = YES;
|
||||
MJWeakSelf
|
||||
_dayTaskTagView.startBlock = ^{
|
||||
QXTaskViewController *vc = [[QXTaskViewController alloc] init];
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#import "QXHomePageNetwork.h"
|
||||
|
||||
|
||||
@interface QXAppstoreHomeView()<UICollectionViewDelegate,UICollectionViewDataSource,SDCycleScrollViewDelegate>
|
||||
@interface QXAppstoreHomeView()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,SDCycleScrollViewDelegate>
|
||||
@property (nonatomic,strong)UIScrollView *scrollView;
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
@property (nonatomic,strong)SDCycleScrollView *bannerScrollView;
|
||||
@@ -197,6 +197,15 @@
|
||||
return CGSizeMake(ScaleWidth(90), ScaleWidth(90));
|
||||
}
|
||||
|
||||
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXHomeRoomCell *roomCell = (QXHomeRoomCell *)cell;
|
||||
[roomCell startAnimating];
|
||||
}
|
||||
|
||||
-(void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXHomeRoomCell *roomCell = (QXHomeRoomCell *)cell;
|
||||
[roomCell endAnimating];
|
||||
}
|
||||
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXRoomListModel *model = self.dataArray[indexPath.row];
|
||||
|
||||
@@ -123,6 +123,9 @@ typedef NS_ENUM(NSInteger) {
|
||||
/// 礼物数量 巡乐会
|
||||
@property (nonatomic,strong)NSString *gift_num;
|
||||
|
||||
/// 是否是pk房间的信息
|
||||
@property (nonatomic,assign)BOOL is_pk;
|
||||
|
||||
- (BOOL)isSameGiftFromSameSender:(QXRoomChatListModel *)otherGift;
|
||||
|
||||
- (instancetype)copy;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-330, 80, 60);
|
||||
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-400, 80, 60);
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
self.followBtn = [[UIButton alloc] init];
|
||||
self.followBtn.hidden = YES;
|
||||
[self.followBtn setImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)];
|
||||
[self.followBtn addTarget:self action:@selector(eventAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.followBtn addTarget:self action:@selector(followAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.bgView addSubview:self.followBtn];
|
||||
[self.followBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(22);
|
||||
@@ -451,6 +451,10 @@
|
||||
[self.relationView showInView:self.viewController.view];
|
||||
}
|
||||
|
||||
-(void)followAction{
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:self.roomId isRejoin:NO navagationController:self.viewController.navigationController];
|
||||
}
|
||||
|
||||
-(void)toHomePage{
|
||||
[self hide];
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
|
||||
@@ -357,7 +357,7 @@
|
||||
-(void)setOnlyShowHeader:(BOOL)onlyShowHeader{
|
||||
_onlyShowHeader = onlyShowHeader;
|
||||
self.charmBgView.hidden = onlyShowHeader;
|
||||
self.nameLabel.font = onlyShowHeader?[UIFont systemFontOfSize:8]:[UIFont systemFontOfSize:ScaleWidth(12.0)];;
|
||||
self.nameLabel.font = onlyShowHeader?[UIFont systemFontOfSize:10]:[UIFont systemFontOfSize:ScaleWidth(12.0)];;
|
||||
}
|
||||
|
||||
-(void)setPitModel:(QXRoomPitModel *)pitModel{
|
||||
@@ -384,7 +384,12 @@
|
||||
self.nameLabel.hidden = NO;
|
||||
[self.headerView setHeadIcon:pitModel.avatar dress:pitModel.dress];
|
||||
self.nameLabel.text = pitModel.nickname;
|
||||
if (self.onlyShowHeader) {
|
||||
self.charmBgView.hidden = YES;
|
||||
}else{
|
||||
self.charmBgView.hidden = NO;
|
||||
}
|
||||
|
||||
self.charmLabel.text = [NSString qx_showHotCountNum:pitModel.charm.longLongValue];
|
||||
|
||||
// if (pitModel.is_mute.intValue == 1) {
|
||||
|
||||
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)QXRoomModel *roomModel;
|
||||
@property (nonatomic,strong)QXRoomModel *pkRoomModel;
|
||||
@property (nonatomic,assign)NSInteger myPitNumber;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
|
||||
/// 清除魅力
|
||||
-(void)clearCharm;
|
||||
/// 清除个人魅力
|
||||
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 设置麦位锁麦状态
|
||||
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber;
|
||||
/// 房间内换麦
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo;
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK;
|
||||
|
||||
/// pk开始
|
||||
-(void)pkStartWithPkEndTimes:(NSString *)pk_end_times pk_id:(NSString*)pk_id;
|
||||
|
||||
@@ -258,6 +258,21 @@
|
||||
}else{
|
||||
self.muteRemoteBtn.hidden = YES;
|
||||
}
|
||||
if (self.startBtn.isHidden) {
|
||||
[self.endBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(7);
|
||||
make.width.mas_equalTo(46);
|
||||
make.height.mas_equalTo(24);
|
||||
make.top.equalTo(self);
|
||||
}];
|
||||
}else{
|
||||
[self.endBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.startBtn.mas_right).offset(10);
|
||||
make.width.mas_equalTo(46);
|
||||
make.height.mas_equalTo(24);
|
||||
make.top.equalTo(self);
|
||||
}];
|
||||
}
|
||||
}
|
||||
-(void)setPkRoomModel:(QXRoomModel *)pkRoomModel{
|
||||
_pkRoomModel = pkRoomModel;
|
||||
@@ -274,7 +289,7 @@
|
||||
_myPitNumber = myPitNumber;
|
||||
self.leftSeatView.myPitNumber = myPitNumber;
|
||||
}
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
|
||||
if ([user.user_id isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) {
|
||||
if (isUpSeat) {
|
||||
self.myPitNumber = pit_number;
|
||||
@@ -286,10 +301,18 @@
|
||||
self.muteRemoteBtn.hidden = YES;
|
||||
}
|
||||
}
|
||||
[self.leftSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
if (isPK) {
|
||||
[self.rightSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
}else{
|
||||
[self.leftSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
}
|
||||
}
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
|
||||
if (isPK) {
|
||||
[self.rightSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
|
||||
}else{
|
||||
[self.leftSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
|
||||
}
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo{
|
||||
[self.leftSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo];
|
||||
}
|
||||
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user{
|
||||
[self.leftSeatView roomUserInfoDidChanged:user];
|
||||
@@ -348,6 +371,11 @@
|
||||
NSString *jsonStr = [dict jsonStringEncoded];
|
||||
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:QXRoomMessageTypeMuteRemoteAudio userId:self.pk_userId];
|
||||
[[QXAgoraEngineEx sharedEngine] muteRemoteEXAudioStream:sender.selected];
|
||||
// QXUserHomeModel *userModel = [QXUserHomeModel yy_modelWithJSON:msg.Text[@"FromUserInfo"]];
|
||||
AgoraRtcAudioVolumeInfo *userInfo = [[AgoraRtcAudioVolumeInfo alloc] init];
|
||||
userInfo.uid = [self.pk_userId longLongValue];
|
||||
userInfo.volume = 0;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:noticeUserSpeak object:userInfo];
|
||||
}
|
||||
|
||||
-(void)didClickUserHeaderWithPitModel:(QXRoomPitModel *)pitModel userModel:(id)userModel isPkRoom:(BOOL)isPkRoom pkRoomId:(NSString *)pkRoomId isNoTakeOff:(BOOL)isNoTakeOff{
|
||||
|
||||
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)QXSelectAuctionInfoView *auctionInfoView;
|
||||
|
||||
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
|
||||
/// 拍卖者上麦
|
||||
-(void)didAuctiontUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat;
|
||||
/// 开始
|
||||
|
||||
@@ -680,7 +680,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
|
||||
QXRoomSeatContentView *contentView;
|
||||
if (pit_number == 9) {
|
||||
contentView = self.compereView;
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef NS_ENUM(NSInteger) {
|
||||
@property (nonatomic,weak)id<QXRoomSeatDelegate>delegate;
|
||||
|
||||
/// 上下麦
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
|
||||
/// 交友房阶段发生变化 step 阶段 1等待 2心动 3牵手 friend_id 场次id
|
||||
-(void)friendPartDidChangedWithType:(NSString*)step friend_id:(NSString*)friend_id end_time:(NSString*)end_time relationModel:(QXRoomFriendRelationModel*)relationModel;
|
||||
/// 交友房时间发生延时 end_time 截止时间
|
||||
@@ -54,7 +54,7 @@ typedef NS_ENUM(NSInteger) {
|
||||
/// 用户信息发生改变
|
||||
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user;
|
||||
/// 房间内换麦
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo;
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK;
|
||||
-(void)stopHWDMP4;
|
||||
-(void)playHWDMP4;
|
||||
/// 销毁视图
|
||||
|
||||
@@ -819,7 +819,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
|
||||
if (pit_number > 10) {
|
||||
return;
|
||||
}
|
||||
@@ -859,7 +859,7 @@
|
||||
contentView.pitModel = model;
|
||||
[self configGameOptionBtn];
|
||||
}
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo{
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
|
||||
if (fromPitNumber == 0 || toPitNumber == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign)NSInteger myPitNumber;
|
||||
@property (nonatomic,strong)QXRoomSeatContentView* mySeatView;
|
||||
/// 上下麦
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
|
||||
/// 清除魅力
|
||||
-(void)clearCharm;
|
||||
/// 清除个人魅力
|
||||
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user;
|
||||
|
||||
/// 房间内换麦
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo;
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK;
|
||||
|
||||
-(void)stopHWDMP4;
|
||||
-(void)playHWDMP4;
|
||||
|
||||
@@ -190,7 +190,7 @@ static NSInteger maxSeat = 8;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
|
||||
if (pit_number > 10) {
|
||||
return;
|
||||
}
|
||||
@@ -274,6 +274,7 @@ static NSInteger maxSeat = 8;
|
||||
-(void)setIsPKOtherRoom:(BOOL)isPKOtherRoom{
|
||||
_isPKOtherRoom = isPKOtherRoom;
|
||||
self.compereView.isPK = YES;
|
||||
self.compereView.onlyShowHeader = YES;
|
||||
[self.compereView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self).offset(0);
|
||||
make.width.mas_equalTo(ScaleWidth(60));
|
||||
@@ -298,6 +299,7 @@ static NSInteger maxSeat = 8;
|
||||
if (i < 8) {
|
||||
QXRoomSeatContentView *contentView = self.seatArray[i];
|
||||
contentView.isPK = YES;
|
||||
contentView.onlyShowHeader = YES;
|
||||
[contentView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.guestView.mas_bottom).offset(topSpace+(seatHeight+topSpace)*(i/4));
|
||||
make.left.equalTo(self).offset(leftMargin+(seatWidth+itemSpace)*(i%4));
|
||||
@@ -324,7 +326,8 @@ static NSInteger maxSeat = 8;
|
||||
for (QXRoomSeatContentView *seatView in self.seatArray) {
|
||||
QXRoomPitModel *model = seatView.pitModel;
|
||||
model.charm = @"0";
|
||||
seatView.pitModel = model;
|
||||
// seatView.pitModel = model;
|
||||
[seatView updateUserCharm:model.charm];
|
||||
// if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// [seatView hideCharm];
|
||||
// }
|
||||
@@ -335,7 +338,8 @@ static NSInteger maxSeat = 8;
|
||||
QXRoomPitModel *model = seatView.pitModel;
|
||||
if ([model.user_id isEqualToString:userId]) {
|
||||
model.charm = @"0";
|
||||
seatView.pitModel = model;
|
||||
// seatView.pitModel = model;
|
||||
[seatView updateUserCharm:model.charm];
|
||||
break;
|
||||
}
|
||||
// if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
@@ -364,7 +368,7 @@ static NSInteger maxSeat = 8;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo{
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
|
||||
if (fromPitNumber == 0 || toPitNumber == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -377,7 +381,9 @@ static NSInteger maxSeat = 8;
|
||||
fromPitModel.pit_number = totModel.pit_number;
|
||||
totModel.pit_number = tmpPitNum;
|
||||
NSMutableArray*arr = [NSMutableArray arrayWithArray:self.roomModel.room_info.pit_list];
|
||||
if (toPitNumber <= arr.count) {
|
||||
[arr exchangeObjectAtIndex:fromPitNumber-1 withObjectAtIndex:toPitNumber-1];
|
||||
}
|
||||
self.roomModel.room_info.pit_list = arr;
|
||||
toSeatView.pitModel = fromPitModel;
|
||||
fromSeatView.pitModel = totModel;
|
||||
|
||||
@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 设置多人魅力
|
||||
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users;
|
||||
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
|
||||
/// 榜单发生变化
|
||||
-(void)songRoomCharmRankListDidChanged:(NSArray<QXRoomPitModel *>*)list;
|
||||
/// 房间内用户信息发生变化
|
||||
|
||||
@@ -267,7 +267,7 @@ QXRoomSeatDelegate
|
||||
[self.delegate previewRoomUserCharmListWithUserId:userId];
|
||||
}
|
||||
}
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
|
||||
// if (pit_number==9999) {
|
||||
// for (<#type *object#> in <#collection#>) {
|
||||
// <#statements#>
|
||||
|
||||
@@ -61,11 +61,11 @@ typedef NS_ENUM(NSInteger) {
|
||||
/// 设置麦位锁麦状态
|
||||
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber;
|
||||
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK;
|
||||
/// 房间内用户信息发生变化
|
||||
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user;
|
||||
/// 房间内换麦
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo;
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -918,13 +918,13 @@
|
||||
}
|
||||
}
|
||||
/// 房间内换麦
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo{
|
||||
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo];
|
||||
[self.normalSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
|
||||
break;
|
||||
case QXRoomSeatViewTypeSing:
|
||||
// [self.songView clearCharm];
|
||||
@@ -934,10 +934,10 @@
|
||||
case QXRoomSeatViewTypeCabin:
|
||||
break;
|
||||
case QXRoomSeatViewTypePK:
|
||||
[self.roomPkView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo];
|
||||
[self.roomPkView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
|
||||
break;
|
||||
case QXRoomSeatViewTypeFriend:
|
||||
[self.roomFriendView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo];
|
||||
[self.roomFriendView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1189,28 +1189,28 @@
|
||||
-(void)didHugSeatWithPitNumber:(NSString *)pitNumber{
|
||||
[self showOnlineListWithPitNumber:pitNumber];
|
||||
}
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number isPK:(BOOL)isPK{
|
||||
if (self.roomModel == nil) {
|
||||
return;
|
||||
}
|
||||
switch (self.type) {
|
||||
case QXRoomSeatViewTypeNormal:
|
||||
[self.normalSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
[self.normalSeatView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
break;
|
||||
case QXRoomSeatViewTypeSing:
|
||||
[self.songView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
[self.songView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
break;
|
||||
case QXRoomSeatViewTypeAuction:
|
||||
[self.auctionView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
[self.auctionView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
break;
|
||||
case QXRoomSeatViewTypeCabin:
|
||||
// self.cabinView.roomModel = roomModel;
|
||||
break;
|
||||
case QXRoomSeatViewTypePK:
|
||||
[self.roomPkView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
[self.roomPkView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
break;
|
||||
case QXRoomSeatViewTypeFriend:
|
||||
[self.roomFriendView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number];
|
||||
[self.roomFriendView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -99,17 +99,18 @@
|
||||
break;
|
||||
case QXAlertViewTypeAgreeSong:
|
||||
case QXAlertViewTypeAgreePK:{
|
||||
MJWeakSelf
|
||||
@weakify(self)
|
||||
[self.cancelBtn setTitle:QXText(@"拒绝") forState:(UIControlStateNormal)];
|
||||
[self.commitBtn setTitle:QXText(@"同意") forState:(UIControlStateNormal)];
|
||||
__block int timeCount = 10;
|
||||
_timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{
|
||||
self.timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{
|
||||
@strongify(self);
|
||||
timeCount--;
|
||||
if (timeCount<=0) {
|
||||
[self->_timer invalidate];
|
||||
[weakSelf cancelAction];
|
||||
[self.timer invalidate];
|
||||
[self cancelAction];
|
||||
}else{
|
||||
[self->_cancelBtn setTitle:[NSString stringWithFormat:@"%@(%d)",QXText(@"拒绝"),timeCount] forState:(UIControlStateNormal)];
|
||||
[self.cancelBtn setTitle:[NSString stringWithFormat:@"%@(%d)",QXText(@"拒绝"),timeCount] forState:(UIControlStateNormal)];
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -137,26 +138,28 @@
|
||||
self.titleLabel.text = title;
|
||||
}
|
||||
-(void)cancelAction{
|
||||
if (_timer) {
|
||||
[self->_timer invalidate];
|
||||
_timer = nil;
|
||||
if (self.timer) {
|
||||
[self.timer invalidate];
|
||||
self.timer = nil;
|
||||
}
|
||||
MJWeakSelf
|
||||
@weakify(self)
|
||||
[[QXGlobal shareGlobal] hideViewBlock:^{
|
||||
if (weakSelf.cancelBlock) {
|
||||
weakSelf.cancelBlock();
|
||||
@strongify(self)
|
||||
if (self.cancelBlock) {
|
||||
self.cancelBlock();
|
||||
}
|
||||
}];
|
||||
}
|
||||
-(void)commitAction{
|
||||
if (_timer) {
|
||||
[self->_timer invalidate];
|
||||
_timer = nil;
|
||||
if (self.timer) {
|
||||
[self.timer invalidate];
|
||||
self.timer = nil;
|
||||
}
|
||||
MJWeakSelf
|
||||
@weakify(self)
|
||||
[[QXGlobal shareGlobal] hideViewBlock:^{
|
||||
if (weakSelf.commitBlock) {
|
||||
weakSelf.commitBlock();
|
||||
@strongify(self)
|
||||
if (self.commitBlock) {
|
||||
self.commitBlock();
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
self.topImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"app_update_top_bg"]];
|
||||
self.topImageView.frame = CGRectMake(0, 0, self.bgView.width, ScaleWidth(170));
|
||||
self.topImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self.bgView addSubview:self.topImageView];
|
||||
|
||||
self.bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, self.topImageView.bottom-ScaleWidth(12), self.bgView.width, self.bgView.height-self.topImageView.height+ScaleWidth(12))];
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
-(void)initSubViews{
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_chirld_mode"]];
|
||||
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:self.bgImageView];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
}];
|
||||
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_first_recharge_bg"]];
|
||||
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.centerY.equalTo(self);
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
}];
|
||||
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_new_user_recharge"]];
|
||||
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.centerY.equalTo(self);
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
}];
|
||||
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_nice_gift"]];
|
||||
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.centerY.equalTo(self);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
-(void)initSubViews{
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_realname"]];
|
||||
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:self.bgImageView];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
|
||||
@@ -260,6 +260,8 @@
|
||||
-(void)setDynamicModel:(QXDynamicModel *)dynamicModel{
|
||||
_dynamicModel = dynamicModel;
|
||||
if (![dynamicModel.user_id isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) {
|
||||
[self.eventArray removeObjectAtIndex:2];
|
||||
}else{
|
||||
[self.eventArray removeLastObject];
|
||||
}
|
||||
MJWeakSelf
|
||||
@@ -321,7 +323,12 @@
|
||||
model3.icon = @"dynamic_delete";
|
||||
model3.name = QXText(@"删除");
|
||||
model3.Id = @"2";
|
||||
_eventArray = [NSMutableArray arrayWithArray:@[model1,model2,model3]];
|
||||
|
||||
QXShareViewModel *model4 = [[QXShareViewModel alloc] init];
|
||||
model4.icon = @"dynamic_user_black";
|
||||
model4.name = QXText(@"拉黑");
|
||||
model4.Id = @"3";
|
||||
_eventArray = [NSMutableArray arrayWithArray:@[model1,model2,model3,model4]];
|
||||
}
|
||||
return _eventArray;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-220, 80, 100);
|
||||
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-300, 80, 100);
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
|
||||
@@ -199,6 +199,8 @@ typedef NS_OPTIONS(NSInteger, TUIChatInputBarMoreMenuItem) {
|
||||
*/
|
||||
@property (nonatomic, weak) id<TUIChatShortcutViewDataSource> shortcutViewDataSource;
|
||||
|
||||
@property (nonatomic, assign)BOOL isAppStore;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -399,9 +399,12 @@
|
||||
#pragma mark-- UITextViewDelegate
|
||||
- (void)textViewDidBeginEditing:(UITextView *)textView {
|
||||
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
|
||||
#if DEBUG
|
||||
//#if DEBUG
|
||||
// isCanChat = 1;
|
||||
//#endif
|
||||
if (TUIChatConfig.defaultConfig.isAppStore) {
|
||||
isCanChat = 1;
|
||||
#endif
|
||||
}
|
||||
if (isCanChat != 1) {
|
||||
[self.inputTextView resignFirstResponder];
|
||||
[self alertChat];
|
||||
|
||||