This commit is contained in:
启星
2025-10-30 00:45:15 +08:00
parent acc4cffad2
commit aa356202e2
96 changed files with 881 additions and 303 deletions

View File

@@ -1207,7 +1207,7 @@
"$(inherited)", "$(inherited)",
"$(SDKROOT)/usr/lib/swift", "$(SDKROOT)/usr/lib/swift",
); );
MARKETING_VERSION = 1.0.0; MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -1271,7 +1271,7 @@
"$(inherited)", "$(inherited)",
"$(SDKROOT)/usr/lib/swift", "$(SDKROOT)/usr/lib/swift",
); );
MARKETING_VERSION = 1.0.0; MARKETING_VERSION = 1.1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@@ -7,6 +7,7 @@
#import "QXAppStartViewController.h" #import "QXAppStartViewController.h"
#import "AppDelegate.h" #import "AppDelegate.h"
#import "TUIChatConfig.h"
@interface QXAppStartViewController () @interface QXAppStartViewController ()
@property (nonatomic,strong)UIImageView *bgImaegView; @property (nonatomic,strong)UIImageView *bgImaegView;
@end @end
@@ -77,6 +78,8 @@
QXConfig.shared.tabbarArray = @[tabbarIndex1,tabbarIndex2,tabbarIndex3,tabbarIndex4]; QXConfig.shared.tabbarArray = @[tabbarIndex1,tabbarIndex2,tabbarIndex3,tabbarIndex4];
AppDelegate *delegate = (AppDelegate*)[UIApplication sharedApplication].delegate; AppDelegate *delegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
[delegate changeRootViewControllerIsTabbar]; [delegate changeRootViewControllerIsTabbar];
BOOL api_version = [responseObject[@"api_version"] boolValue];
TUIChatConfig.defaultConfig.isAppStore = api_version;
NSLog(@"请求成功"); NSLog(@"请求成功");
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
NSLog(@"请求失败"); NSLog(@"请求失败");

View File

@@ -23,7 +23,7 @@ typedef void (^showFinishBlock)(void);
@property (nonatomic,readonly,assign)BOOL isLogin; @property (nonatomic,readonly,assign)BOOL isLogin;
@property (nonatomic,assign)BOOL isShowLoginVC; @property (nonatomic,assign)BOOL isShowLoginVC;
/// 房间id /// 房间id
@property (nonatomic,strong,readonly)NSString *roomId; @property (nonatomic,strong)NSString *roomId;
// 是否实名 // 是否实名
@property (nonatomic,assign)BOOL isRealName; @property (nonatomic,assign)BOOL isRealName;

View File

@@ -25,7 +25,7 @@
@interface QXGlobal() @interface QXGlobal()
@property (nonatomic,assign)BOOL isLogin; @property (nonatomic,assign)BOOL isLogin;
@property (nonatomic,strong)NSString *roomId;
@property (nonatomic,assign)BOOL isClickJoinRoom; @property (nonatomic,assign)BOOL isClickJoinRoom;

View File

@@ -37,15 +37,15 @@
// make.left.mas_equalTo(16); // make.left.mas_equalTo(16);
// make.top.mas_equalTo(kSafeAreaTop +10); // 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.delegate = self;
// self.categoryView.titles = @[QXText(@"发现"),QXText(@"扩列")]; // self.categoryView.titles = @[QXText(@"发现"),QXText(@"扩列")];
self.categoryView.titles = @[QXText(@"扩列"),QXText(@"发现")]; self.categoryView.titles = @[QXText(@"新人/扩列"),QXText(@"发现")];
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"]; self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"];
self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"]; self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"];
self.categoryView.cellWidth = 50; self.categoryView.cellWidth = JXCategoryViewAutomaticDimension;
self.categoryView.contentEdgeInsetLeft = 0; self.categoryView.contentEdgeInsetLeft = 10;
self.categoryView.cellSpacing = 0; self.categoryView.cellSpacing = 25;
// self.categoryView.titleLabelZoomScale = 1.1; // self.categoryView.titleLabelZoomScale = 1.1;
self.categoryView.titleLabelZoomEnabled = YES; self.categoryView.titleLabelZoomEnabled = YES;
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:16]; self.categoryView.titleFont = [UIFont boldSystemFontOfSize:16];
@@ -62,7 +62,7 @@
[self.view addSubview:self.categoryView]; [self.view addSubview:self.categoryView];
[self.view addSubview:self.containerView]; [self.view addSubview:self.containerView];
self.categoryView.listContainer = self.containerView; self.categoryView.listContainer = self.containerView;
[self categoryView:self.categoryView didSelectedItemAtIndex:0];
[self.view addSubview:self.publishBtn]; [self.view addSubview:self.publishBtn];
} }
@@ -90,6 +90,16 @@
} }
-(void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{ -(void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{
self.publishBtn.hidden = !(index==1); 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 #pragma mark - action
-(void)pulishAction{ -(void)pulishAction{

View File

@@ -35,12 +35,12 @@
self.bgImageHidden = YES; self.bgImageHidden = YES;
self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, 100, 24)]; self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, 100, 24)];
self.titleLabel.font = [UIFont systemFontOfSize:16]; self.titleLabel.font = [UIFont systemFontOfSize:16];
self.titleLabel.textColor = QXConfig.textColor; self.titleLabel.textColor = RGB16(0xffffff);
self.titleLabel.text = QXText(@"扩列交友"); self.titleLabel.text = QXText(@"扩列交友");
[self.view addSubview:self.titleLabel]; [self.view addSubview:self.titleLabel];
self.sortBtn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-75-13, 0, 75, 48)]; 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) { if ([QXGlobal shareGlobal].loginModel.sex.integerValue == 1) {
[self.sortBtn setTitle:QXText(@"只看女生") forState:(UIControlStateNormal)]; [self.sortBtn setTitle:QXText(@"只看女生") forState:(UIControlStateNormal)];
self.type = @"2"; self.type = @"2";
@@ -48,7 +48,7 @@
[self.sortBtn setTitle:QXText(@"只看男生") forState:(UIControlStateNormal)]; [self.sortBtn setTitle:QXText(@"只看男生") forState:(UIControlStateNormal)];
self.type = @"1"; 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.titleLabel.font = [UIFont systemFontOfSize:12];
[self.sortBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:3]; [self.sortBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:3];
[self.sortBtn addTarget:self action:@selector(sortAction) forControlEvents:(UIControlEventTouchUpInside)]; [self.sortBtn addTarget:self action:@selector(sortAction) forControlEvents:(UIControlEventTouchUpInside)];
@@ -81,11 +81,19 @@
} }
if (isAppStore) { if (isAppStore) {
self.appStoreView.hidden = NO; 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.tableView.hidden = YES;
self.appStoreView.users = list; self.appStoreView.users = list;
self.titleLabel.hidden = YES;
}else{ }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.tableView.hidden = NO;
self.appStoreView.hidden = YES; self.appStoreView.hidden = YES;
self.titleLabel.hidden = NO;
} }
[weakSelf.dataArray addObjectsFromArray:list]; [weakSelf.dataArray addObjectsFromArray:list];
[weakSelf.tableView.mj_header endRefreshing]; [weakSelf.tableView.mj_header endRefreshing];

View File

@@ -18,6 +18,7 @@
#import "QXUserHomePageViewController.h" #import "QXUserHomePageViewController.h"
#import "QXDynamicLikeListView.h" #import "QXDynamicLikeListView.h"
#import "QXReportViewController.h" #import "QXReportViewController.h"
#import "QXMineNetwork.h"
@interface QXDynamicListCell ()<QXShareViewDelegate> @interface QXDynamicListCell ()<QXShareViewDelegate>
@@ -346,6 +347,13 @@
reportVC.reportType = @"3"; reportVC.reportType = @"3";
reportVC.fromId = self.model.id; reportVC.fromId = self.model.id;
[self.navigationController pushViewController:reportVC animated:YES]; [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);
}];
} }
} }

View File

@@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface QXExpansionAppStoreSubView : UIView @interface QXExpansionAppStoreSubView : UIView
@property(nonatomic,strong)UIImageView *headerImageView; @property(nonatomic,strong)UIImageView *headerImageView;
@property(nonatomic,strong)UIView *nameBgView;
@property(nonatomic,strong)UILabel *nameLabel; @property(nonatomic,strong)UILabel *nameLabel;
@property(nonatomic,strong)UIImageView *sexImageView; @property(nonatomic,strong)UIImageView *sexImageView;
@property(nonatomic,strong)QXUserHomeModel *model; @property(nonatomic,strong)QXUserHomeModel *model;

View File

@@ -8,8 +8,14 @@
#import "QXExpansionAppStoreView.h" #import "QXExpansionAppStoreView.h"
#import "CKShimmerLabel.h" #import "CKShimmerLabel.h"
@interface QXExpansionAppStoreView()<CAAnimationDelegate> @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 *bgImageView;
@property (nonatomic,strong)UIImageView *fengcheImageView; @property (nonatomic,strong)UIImageView *fengcheImageView;
@property (nonatomic,strong)UIButton *changeBtn; @property (nonatomic,strong)UIButton *changeBtn;
@property (nonatomic,strong)NSMutableArray *randomArray; @property (nonatomic,strong)NSMutableArray *randomArray;
@@ -18,6 +24,10 @@
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView2; @property (nonatomic,strong)QXExpansionAppStoreSubView *userView2;
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView3; @property (nonatomic,strong)QXExpansionAppStoreSubView *userView3;
@property (nonatomic,strong)QXExpansionAppStoreSubView *userView4; @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; @property (nonatomic,strong)NSMutableArray *userViews;
@end @end
@@ -44,54 +54,61 @@
} }
-(void)initSubviews{ -(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.moonImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_moon"]];
self.bgImageView.frame = CGRectMake((self.width-375)/2, (self.height-375)/2-20, 375, 375); self.moonImageView.contentMode = UIViewContentModeScaleToFill;
[self addSubview:self.bgImageView]; 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) { // [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.height.width.mas_equalTo(375); // make.height.width.mas_equalTo(375);
// make.centerX.centerY.equalTo(self); // 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 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fengche"]];
self.fengcheImageView.hidden = YES; self.fengcheImageView.hidden = YES;
self.fengcheImageView.frame = CGRectMake((self.width-70)/2, (self.height-70)/2-20, 70, 70); self.fengcheImageView.frame = CGRectMake((self.centerBgView.width-ScaleWidth(60))/2, (self.centerBgView.top-ScaleWidth(60))/2, ScaleWidth(60), ScaleWidth(60));
[self.fengcheImageView addRoundedCornersWithRadius:35]; [self.fengcheImageView addRoundedCornersWithRadius:ScaleWidth(30)];
self.fengcheImageView.layer.borderWidth = 5; self.fengcheImageView.layer.borderWidth = 5;
self.fengcheImageView.layer.borderColor = UIColor.whiteColor.CGColor; self.fengcheImageView.layer.borderColor = UIColor.whiteColor.CGColor;
self.fengcheImageView.centerX = self.centerBgView.centerX;
self.fengcheImageView.centerY = self.centerBgView.centerY;
[self addSubview:self.fengcheImageView]; [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 = [[UIButton alloc] init];
self.changeBtn.frame = self.fengcheImageView.frame; self.changeBtn.frame = self.fengcheImageView.frame;
self.changeBtn.backgroundColor = QXConfig.themeColor; self.changeBtn.backgroundColor = QXConfig.themeColor;
[self.changeBtn addRoundedCornersWithRadius:35]; [self.changeBtn addRoundedCornersWithRadius:ScaleWidth(30)];
[self.changeBtn setTitle:@"换一批" forState:(UIControlStateNormal)]; [self.changeBtn setTitle:@"换" forState:(UIControlStateNormal)];
self.changeBtn.layer.borderWidth = 5; self.changeBtn.layer.borderWidth = 5;
self.changeBtn.layer.borderColor = UIColor.whiteColor.CGColor; self.changeBtn.layer.borderColor = UIColor.whiteColor.CGColor;
self.changeBtn.titleLabel.font = [UIFont systemFontOfSize:15]; 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.changeBtn addTarget:self action:@selector(changeAction:) forControlEvents:(UIControlEventTouchUpInside)];
[self addSubview:self.changeBtn]; [self addSubview:self.changeBtn];
// [self.changeBtn mas_makeConstraints:^(MASConstraintMaker *make) { // [self.changeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -99,45 +116,52 @@
// make.height.width.mas_offset(70); // make.height.width.mas_offset(70);
// }]; // }];
self.userView1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.left+40, self.bgImageView.top+28, 100, 100)]; self.userView1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71))];
[self addSubview:self.userView1]; [self.centerBgView 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.userView2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.right-40-100, self.bgImageView.top+28, 100, 100)]; self.userView2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71))];
[self addSubview:self.userView2]; [self.centerBgView addSubview:self.userView2];
// [self.userView2 mas_makeConstraints:^(MASConstraintMaker *make) {
// make.right.equalTo(self.bgImageView).offset(-40);
// make.top.equalTo(self.bgImageView).offset(32); self.userView3 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-ScaleWidth(66), (self.centerBgView.height-ScaleWidth(71))/2, ScaleWidth(56), ScaleWidth(71))];
// make.width.mas_equalTo(100); [self.centerBgView addSubview:self.userView3];
// make.height.mas_equalTo(100);
// }]; 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.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.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.userView1];
[self.userViews addObject:self.userView2]; [self.userViews addObject:self.userView2];
[self.userViews addObject:self.userView3]; [self.userViews addObject:self.userView3];
[self.userViews addObject:self.userView4]; [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 MJWeakSelf
[self.userView1 addTapBlock:^(id _Nonnull obj) { [self.userView1 addTapBlock:^(id _Nonnull obj) {
if (weakSelf.userBlock) { if (weakSelf.userBlock) {
@@ -162,13 +186,63 @@
weakSelf.userBlock(weakSelf.userView4.model); 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{ -(void)changeAction:(UIButton*)sender{
[self.userView1 stopFloatAnimation]; // [self.userView1 stopFloatAnimation];
[self.userView2 stopFloatAnimation]; // [self.userView2 stopFloatAnimation];
[self.userView3 stopFloatAnimation]; // [self.userView3 stopFloatAnimation];
[self.userView4 stopFloatAnimation]; // [self.userView4 stopFloatAnimation];
// [self.userView5 stopFloatAnimation];
// [self.userView6 stopFloatAnimation];
// [self.userView7 stopFloatAnimation];
// [self.userView8 stopFloatAnimation];
self.fengcheImageView.alpha = 0; self.fengcheImageView.alpha = 0;
self.fengcheImageView.hidden = NO; self.fengcheImageView.hidden = NO;
@@ -185,13 +259,24 @@
self.userView4.centerX = self.bgImageView.centerX; self.userView4.centerX = self.bgImageView.centerX;
self.userView4.centerY = self.bgImageView.centerY; 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.userView1.alpha = 0;
self.userView2.alpha = 0; self.userView2.alpha = 0;
self.userView3.alpha = 0; self.userView3.alpha = 0;
self.userView4.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) { } completion:^(BOOL finished) {
self.changeBtn.hidden = YES; self.changeBtn.hidden = YES;
@@ -218,24 +303,32 @@
self.changeBtn.alpha = 0; self.changeBtn.alpha = 0;
self.changeBtn.hidden = NO; self.changeBtn.hidden = NO;
self.fengcheImageView.hidden = YES; self.fengcheImageView.hidden = YES;
[self configData]; dispatch_async(dispatch_get_main_queue(), ^{
[self configData];
});
[UIView animateWithDuration:0.3 animations:^{ [UIView animateWithDuration:0.3 animations:^{
self.changeBtn.alpha = 1; 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.userView1.frame = CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71));
self.userView3.frame = CGRectMake(self.bgImageView.left+40, self.bgImageView.bottom-55-100, 100, 100); self.userView2.frame = CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71));
self.userView4.frame = CGRectMake(self.bgImageView.right-40-100, self.bgImageView.bottom-55-100, 100, 100); 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.userView1.alpha = 1;
self.userView2.alpha = 1; self.userView2.alpha = 1;
self.userView3.alpha = 1; self.userView3.alpha = 1;
self.userView4.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) { } completion:^(BOOL finished) {
[self.userView1 startSmoothFloatAnimation];
[self.userView2 startSmoothFloatAnimation];
[self.userView3 startSmoothFloatAnimation];
[self.userView4 startSmoothFloatAnimation];
}]; }];
} }
-(void)setUsers:(NSArray *)users{ -(void)setUsers:(NSArray *)users{
@@ -245,7 +338,7 @@
-(void)configData{ -(void)configData{
[self.randomArray removeAllObjects]; [self.randomArray removeAllObjects];
if (_users.count <= 4) { if (_users.count <= 8) {
[self.randomArray addObjectsFromArray:self.users]; [self.randomArray addObjectsFromArray:self.users];
}else{ }else{
NSArray *rArr = [self optimizedRandomFourNumbers]; NSArray *rArr = [self optimizedRandomFourNumbers];
@@ -267,8 +360,8 @@
[allNumbers addObject:@(i)]; [allNumbers addObject:@(i)];
} }
NSMutableArray *result = [NSMutableArray arrayWithCapacity:4]; NSMutableArray *result = [NSMutableArray arrayWithCapacity:8];
for (int i = 0; i < 4; i++) { for (int i = 0; i < 8; i++) {
int remainingCount = (int)allNumbers.count; int remainingCount = (int)allNumbers.count;
int randomIndex = arc4random_uniform(remainingCount); int randomIndex = arc4random_uniform(remainingCount);
[result addObject:allNumbers[randomIndex]]; [result addObject:allNumbers[randomIndex]];
@@ -309,27 +402,39 @@
self.nameLabel.text = model.nickname; self.nameLabel.text = model.nickname;
UIImage *sexImage = [UIImage imageNamed:model.sex.intValue==1?@"user_sex_boy":@"user_sex_girl"]; UIImage *sexImage = [UIImage imageNamed:model.sex.intValue==1?@"user_sex_boy":@"user_sex_girl"];
self.sexImageView.image = sexImage; self.sexImageView.image = sexImage;
self.nameBgView.hidden = NO;
} }
-(void)initSubviews{ -(void)initSubviews{
self.headerImageView = [[UIImageView alloc] init]; self.headerImageView = [[UIImageView alloc] init];
self.headerImageView.contentMode = UIViewContentModeScaleAspectFill; self.headerImageView.contentMode = UIViewContentModeScaleAspectFill;
[self.headerImageView addRoundedCornersWithRadius:35]; [self.headerImageView addRoundedCornersWithRadius:self.width/2];
// self.headerImageView.backgroundColor = [UIColor brownColor];;
[self addSubview:self.headerImageView]; [self addSubview:self.headerImageView];
[self.headerImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.headerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.centerX.equalTo(self); make.centerX.equalTo(self);
make.height.width.mas_offset(70); make.top.equalTo(self);
make.height.width.mas_offset(self.width);
}]; }];
self.nameLabel = [[UILabel alloc] init]; self.nameLabel = [[UILabel alloc] init];
self.nameLabel.textColor = RGB16(0x333333); self.nameLabel.textColor = RGB16(0xe5e5e5);
self.nameLabel.font = [UIFont systemFontOfSize:14]; self.nameLabel.font = [UIFont systemFontOfSize:9];
// self.nameLabel.text = @"张三";
[self addSubview:self.nameLabel]; [self addSubview:self.nameLabel];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { [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.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]; self.sexImageView = [[UIImageView alloc] init];
@@ -340,37 +445,20 @@
}]; }];
} }
- (void)startSmoothFloatAnimation { - (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 { - (void)stopFloatAnimation {
[self.layer removeAllAnimations]; [self.layer removeAllAnimations];

View File

@@ -71,6 +71,7 @@
-(void)viewWillAppear:(BOOL)animated{ -(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES]; [self.navigationController setNavigationBarHidden:YES animated:YES];
[self getRechargePermission];
} }
- (void)initSubViews{ - (void)initSubViews{
@@ -140,7 +141,7 @@
// make.width.height.mas_equalTo(ScaleWidth(57)); // make.width.height.mas_equalTo(ScaleWidth(57));
// }]; // }];
[self getBanner]; [self getBanner];
[self getRechargePermission]; // [self getRechargePermission];
self.appStoreView.hidden = YES; self.appStoreView.hidden = YES;
[self.view addSubview:self.appStoreView]; [self.view addSubview:self.appStoreView];
@@ -193,7 +194,7 @@
-(void)getRechargePermission{ -(void)getRechargePermission{
// sky_drop_gift_icon ,new_people_recharge_icon ,first_recharge_icon // sky_drop_gift_icon ,new_people_recharge_icon ,first_recharge_icon
@weakify(self) @weakify(self)
[QXHomePageNetwork getRechargePermissionSuccessBlock:^(QXRechargePermissionModel * _Nonnull model) { [QXHomePageNetwork getRechargePermissionSuccessBlock:^(QXRechargePermissionModel * _Nonnull model, BOOL isAppStore) {
@strongify(self) @strongify(self)
self.permissionModel = model; self.permissionModel = model;
[self.rechargePermissionArray removeAllObjects]; [self.rechargePermissionArray removeAllObjects];
@@ -222,7 +223,11 @@
if (imgs.count==0) { if (imgs.count==0) {
return; return;
} }
self.rechargePermissionView.hidden = NO; if (isAppStore) {
self.rechargePermissionView.hidden = YES;
}else{
self.rechargePermissionView.hidden = NO;
}
self.rechargePermissionView.imageURLStringsGroup = imgs; self.rechargePermissionView.imageURLStringsGroup = imgs;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {

View File

@@ -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; failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/** /**
天降好礼 天降好礼

View File

@@ -131,11 +131,12 @@
failBlock(error,msg); 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) { [[QXRequset shareInstance] getWithUrl:QXAppRechargePermission parameters:@{} needCache:NO success:^(id responseObject) {
if (successBlock) { if (successBlock) {
BOOL api_version = [responseObject[@"api_version"] boolValue];
QXRechargePermissionModel *model = [QXRechargePermissionModel yy_modelWithJSON:responseObject[@"data"]]; QXRechargePermissionModel *model = [QXRechargePermissionModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model); successBlock(model,api_version);
} }
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg); failBlock(error,msg);

View File

@@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic) IBOutlet UIView *displayMaskView; @property (weak, nonatomic) IBOutlet UIView *displayMaskView;
@property (weak, nonatomic) IBOutlet UILabel *IDLabel; @property (weak, nonatomic) IBOutlet UILabel *IDLabel;
@property (weak, nonatomic) IBOutlet MarqueeLabel *nameLabel; @property (weak, nonatomic) IBOutlet MarqueeLabel *nameLabel;
@property (weak, nonatomic) IBOutlet MarqueeLabel *appStoreNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *countLabel; @property (weak, nonatomic) IBOutlet UILabel *countLabel;
@property (weak, nonatomic) IBOutlet UIImageView *roomTypeView; @property (weak, nonatomic) IBOutlet UIImageView *roomTypeView;
@property (weak, nonatomic) IBOutlet UIImageView *animateImageView; @property (weak, nonatomic) IBOutlet UIImageView *animateImageView;

View File

@@ -15,6 +15,7 @@
[self.coverImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover]]; [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover]];
self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_number]; self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_number];
self.nameLabel.text = [NSString stringWithFormat:@"%@",model.room_name]; 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]; self.countLabel.text = [NSString qx_showHotCountNum:model.hot_value.longLongValue];
// if ([model.label_id isEqualToString:@"23"]) { // if ([model.label_id isEqualToString:@"23"]) {
// self.roomTypeView.image = [UIImage imageNamed:@"Group 7153"]; // self.roomTypeView.image = [UIImage imageNamed:@"Group 7153"];
@@ -53,6 +54,17 @@
self.countLabel.text = [NSString qx_showHotCountNum:searchModel.hot_value.longLongValue]; self.countLabel.text = [NSString qx_showHotCountNum:searchModel.hot_value.longLongValue];
[self.roomTypeView sd_setImageWithURL:[NSURL URLWithString:searchModel.label_icon]]; [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{ //-(void)setHotRoomModel:(SRHomeChatRoomListModel *)hotRoomModel{
// _hotRoomModel = hotRoomModel; // _hotRoomModel = hotRoomModel;
// [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:hotRoomModel.cover_picture]]; // [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:hotRoomModel.cover_picture]];

View File

@@ -109,6 +109,17 @@
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</view> </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"> <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"/> <rect key="frame" x="8" y="258" width="65" height="14.333333333333314"/>
<constraints> <constraints>
@@ -130,14 +141,17 @@
<constraint firstItem="V8F-du-Rah" firstAttribute="centerY" secondItem="FdH-8c-jAP" secondAttribute="centerY" id="1Yd-6L-A2k"/> <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="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="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="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="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="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 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="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 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 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="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 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 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"/> <constraint firstAttribute="trailing" secondItem="GYb-S9-FB8" secondAttribute="trailing" id="mDi-oS-hhJ"/>
@@ -150,6 +164,7 @@
<connections> <connections>
<outlet property="IDLabel" destination="074-Lr-sTa" id="e79-2B-vZT"/> <outlet property="IDLabel" destination="074-Lr-sTa" id="e79-2B-vZT"/>
<outlet property="animateImageView" destination="T17-NM-Dxi" id="umd-Lq-85F"/> <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="countLabel" destination="BSc-rv-bf4" id="3DZ-sZ-CCV"/>
<outlet property="coverImageView" destination="nPz-Ym-vpk" id="3tk-L4-05N"/> <outlet property="coverImageView" destination="nPz-Ym-vpk" id="3tk-L4-05N"/>
<outlet property="displayMaskView" destination="raq-XK-qhh" id="gYi-Af-gep"/> <outlet property="displayMaskView" destination="raq-XK-qhh" id="gYi-Af-gep"/>
@@ -160,6 +175,6 @@
</collectionViewCell> </collectionViewCell>
</objects> </objects>
<resources> <resources>
<image name="room_hot_icon" width="16" height="16"/> <image name="room_hot_icon" width="14" height="14"/>
</resources> </resources>
</document> </document>

View File

@@ -23,6 +23,7 @@
@property (nonatomic,strong)UIImageView *logoImageView; @property (nonatomic,strong)UIImageView *logoImageView;
@property (nonatomic,strong)UILabel *welcomeLabel; @property (nonatomic,strong)UILabel *welcomeLabel;
@property (nonatomic,strong)UILabel *subTitleLabel; @property (nonatomic,strong)UILabel *subTitleLabel;
@property (nonatomic,strong)UILabel *loginMessageLabel;
@property (nonatomic,strong)QXLoginTextField *accountTextField; @property (nonatomic,strong)QXLoginTextField *accountTextField;
@property (nonatomic,strong)QXLoginTextField *codeTextField; @property (nonatomic,strong)QXLoginTextField *codeTextField;
@property (nonatomic,strong)QXLoginTextField *passwordTextField; @property (nonatomic,strong)QXLoginTextField *passwordTextField;
@@ -120,6 +121,12 @@
[self.changeTypeBtn addTarget:self action:@selector(changeAction:) forControlEvents:(UIControlEventTouchUpInside)]; [self.changeTypeBtn addTarget:self action:@selector(changeAction:) forControlEvents:(UIControlEventTouchUpInside)];
[self.view addSubview:self.changeTypeBtn]; [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 = [[UIButton alloc] initWithFrame:CGRectMake(38, self.codeTextField.bottom+55, SCREEN_WIDTH-38*2, 42)];
[self.loginBtn setTitle:QXText(@"验证并登录") forState:(UIControlStateNormal)]; [self.loginBtn setTitle:QXText(@"验证并登录") forState:(UIControlStateNormal)];
[self.loginBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)]; [self.loginBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];

View File

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface QXAgoraEngineEx : NSObject @interface QXAgoraEngineEx : NSObject
+ (instancetype)sharedEngine; + (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)muteLocalEXAudioStream:(BOOL)mute fromUserInfo:(QXUserHomeModel *)fromUserInfo;;
- (void)muteRemoteEXAudioStream:(BOOL)mute; - (void)muteRemoteEXAudioStream:(BOOL)mute;

View File

@@ -11,6 +11,7 @@
@property (nonatomic,strong)NSString*channel; @property (nonatomic,strong)NSString*channel;
@property (nonatomic,strong)AgoraRtcConnection *connection; @property (nonatomic,strong)AgoraRtcConnection *connection;
@property (nonatomic,strong)AgoraRtcChannelMediaOptions *option; @property (nonatomic,strong)AgoraRtcChannelMediaOptions *option;
@property (nonatomic,strong)NSString *pkUserId;
@end @end
@implementation QXAgoraEngineEx @implementation QXAgoraEngineEx
@@ -22,18 +23,25 @@
}); });
return instance; 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]; // AgoraRtcChannelMediaOptions *option = [AgoraRtcChannelMediaOptions new];
// option.publishMicrophoneTrack = YES; // option.publishMicrophoneTrack = YES;
// option.publishMediaPlayerAudioTrack = YES; // option.publishMediaPlayerAudioTrack = YES;
// option.enableAudioRecordingOrPlayout = YES; // option.enableAudioRecordingOrPlayout = YES;
_pkUserId = pkUserId;
AgoraRtcConnection *connection = [[AgoraRtcConnection alloc] initWithChannelId:channel localUid:QXGlobal.shareGlobal.loginModel.user_id.longLongValue]; AgoraRtcConnection *connection = [[AgoraRtcConnection alloc] initWithChannelId:channel localUid:QXGlobal.shareGlobal.loginModel.user_id.longLongValue];
_channel = channel; _channel = channel;
_connection = connection; _connection = connection;
MJWeakSelf MJWeakSelf
int result = [[QXAgoraEngine sharedEngine].agoraKit joinChannelExByToken:agora_token connection:connection delegate:self mediaOptions:self.option joinSuccess:^(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed) { 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 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) QXLOG(@"声网加入扩展流result---->%d",result)
} }
@@ -67,8 +75,8 @@
} }
-(void)muteRemoteEXAudioStream:(BOOL)mute{ -(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) QXLOG(@"声网屏蔽远端声音result---->%d",result)
} }

View File

@@ -142,7 +142,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 根据用户userid 插入消息 /// 根据用户userid 插入消息
-(void)didInsertMessge:(QXRoomChatListModel*)message userId:(NSString*)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 排麦 /// 上麦模式发生变化 2 自由麦 | 1 排麦
-(void)aplayPitModeDidChanged:(NSString*)upMicType; -(void)aplayPitModeDidChanged:(NSString*)upMicType;
/// 排麦人数发生变化 /// 排麦人数发生变化
@@ -192,7 +192,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 10秒自动校正在线人数 /// 10秒自动校正在线人数
-(void)roomOnlineNumberDidChangedOnlineNumber:(NSString*)onlineNumber; -(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;

View File

@@ -30,12 +30,6 @@
{ {
self = [super init]; self = [super init];
if (self) { if (self) {
///
#if DEVELOPENT == 1
[TUIChatConfig defaultConfig].msgNeedReadReceipt = NO;
#else
[TUIChatConfig defaultConfig].msgNeedReadReceipt = YES;
#endif
} }
return self; return self;
} }
@@ -172,11 +166,14 @@
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
model.messageType = QXRoomChatMessageTypeSystem; model.messageType = QXRoomChatMessageTypeSystem;
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
[self.delegate didInsertMessge:model]; 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"]]; 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; break;
@@ -185,11 +182,14 @@
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
model.messageType = QXRoomChatMessageTypeSystem; model.messageType = QXRoomChatMessageTypeSystem;
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
[self.delegate didInsertMessge:model]; 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"]]; 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; break;
@@ -599,12 +599,15 @@
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text]; QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
NSInteger fromPitNumber = [msg.Text[@"from_pit_number"] integerValue]; NSInteger fromPitNumber = [msg.Text[@"from_pit_number"] integerValue];
NSInteger toPitNumber = [msg.Text[@"to_pit_number"] integerValue]; NSInteger toPitNumber = [msg.Text[@"to_pit_number"] integerValue];
if (self.delegate && [self.delegate respondsToSelector:@selector(roomSeatExchangedWithFromPitNumber:toPitNumber:userInfo:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(roomSeatExchangedWithFromPitNumber:toPitNumber:userInfo:isPK:)]) {
[self.delegate roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:model.FromUserInfo]; [self.delegate roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:model.FromUserInfo isPK:model.is_pk];
} }
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
model.messageType = QXRoomChatMessageTypeSystem; if (!model.is_pk) {
[self.delegate didInsertMessge:model]; // pk
model.messageType = QXRoomChatMessageTypeSystem;
[self.delegate didInsertMessge:model];
}
} }
} }
break; break;

View File

@@ -11,7 +11,10 @@
#import "TUIChatConfig_Classic.h" #import "TUIChatConfig_Classic.h"
#import "QXUserHomePageViewController.h" #import "QXUserHomePageViewController.h"
#import "QXGuildGroupSettingVC.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; @property (nonatomic,strong)QXChatTitleView *titleView;
@end @end
@@ -35,11 +38,14 @@
// backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading; // backBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeading;
[backBtn addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)]; [backBtn addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn]; 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{ -(BOOL)onUserAvatarClicked:(UIView *)view messageCellData:(TUIMessageCellData *)celldata{
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init]; QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
NSString *userId = [celldata.identifier stringByReplacingOccurrencesOfString:@"u" withString:@""]; NSString *userId = [celldata.identifier stringByReplacingOccurrencesOfString:@"u" withString:@""];
@@ -69,11 +75,32 @@
} }
} }
-(void)moreAction{ -(void)moreAction{
QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init]; if (self.data.groupID.length>0) {
vc.groupId = [self.data.groupID stringByReplacingOccurrencesOfString:@"g" withString:@""]; QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init];
[self.navigationController pushViewController:vc animated:YES]; 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{ - (void)initSubViews{
[TUIChatConfig_Classic sharedConfig].delegate = self; [TUIChatConfig_Classic sharedConfig].delegate = self;
@@ -84,11 +111,7 @@
vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight); vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight);
[self addChildViewController:vc]; [self addChildViewController:vc];
[self.view addSubview:vc.view]; [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{ }else{
TUIC2CChatViewController *vc = [[TUIC2CChatViewController alloc] init]; TUIC2CChatViewController *vc = [[TUIC2CChatViewController alloc] init];
[vc setConversationData:self.data]; [vc setConversationData:self.data];

View File

@@ -49,6 +49,7 @@
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES]; [self.navigationController setNavigationBarHidden:YES animated:YES];
[self getUserInfo]; [self getUserInfo];
[self.tableView reloadData];
} }
- (void)initSubViews{ - (void)initSubViews{
@@ -185,6 +186,7 @@
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView]; QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView];
cell.delegate = self; cell.delegate = self;
[cell cellReload];
return cell; return cell;
} }

View File

@@ -309,6 +309,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *pk_room_id; @property (nonatomic,strong)NSString *pk_room_id;
/// pk发起者 /// pk发起者
@property (nonatomic,strong)NSString *invite_pk_user_id; @property (nonatomic,strong)NSString *invite_pk_user_id;
/// pk接受者
@property (nonatomic,strong)NSString *receive_pk_user_id;
/// pkid /// pkid
@property (nonatomic,strong)NSString *pk_id; @property (nonatomic,strong)NSString *pk_id;
/// 剩余时间 /// 剩余时间

View File

@@ -16,7 +16,16 @@ NS_ASSUME_NONNULL_BEGIN
@end @end
@interface QXMineServiceCell : UITableViewCell @interface QXMineServiceCell : UITableViewCell
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate; @property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
-(void)cellReload;
+(instancetype)cellWithTableView:(UITableView *)tableView; +(instancetype)cellWithTableView:(UITableView *)tableView;
@end
@interface QXMineServiceSubCell : UICollectionViewCell
@property (nonatomic,strong)UIImageView *imageView;
@property (nonatomic,strong)UILabel *titleLabel;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -6,11 +6,13 @@
// //
#import "QXMineServiceCell.h" #import "QXMineServiceCell.h"
@interface QXMineServiceCell() @class QXMineServiceSubCell;
@interface QXMineServiceCell()<UICollectionViewDelegate,UICollectionViewDataSource>
@property (nonatomic,strong)UIView *bgView; @property (nonatomic,strong)UIView *bgView;
@property (nonatomic,strong)UILabel *titleLabel; @property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)NSArray *serviceArray; @property (nonatomic,strong)UICollectionView *collectionView;
@property (nonatomic,strong)NSArray *serviceImageArray; @property (nonatomic,strong)NSMutableArray *serviceArray;
@property (nonatomic,strong)NSMutableArray *serviceImageArray;
@end @end
@implementation QXMineServiceCell @implementation QXMineServiceCell
@@ -51,74 +53,107 @@
make.right.mas_equalTo(-12); make.right.mas_equalTo(-12);
make.height.mas_equalTo(24); make.height.mas_equalTo(24);
}]; }];
NSInteger maxCount = 4; NSInteger maxCount = 4;
CGFloat btnWith = (SCREEN_WIDTH-32)/maxCount; CGFloat btnWith = (int)(SCREEN_WIDTH-32-1)/maxCount;
CGFloat btnHeight = 44; CGFloat btnHeight = 44;
for (int i = 0; i < self.serviceArray.count; i++) { UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
NSInteger col = i / maxCount; layout.itemSize = CGSizeMake(btnWith, btnHeight);
NSInteger line = i % maxCount; layout.minimumLineSpacing = 10;
UIButton *btn = [[UIButton alloc] init]; layout.minimumInteritemSpacing = 0;
[self.bgView addSubview:btn]; layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
[btn setTitle:self.serviceArray[i] forState:(UIControlStateNormal)]; layout.scrollDirection = UICollectionViewScrollDirectionVertical;
[btn setTitleColor:[UIColor clearColor] forState:(UIControlStateNormal)]; self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[btn addTarget:self action:@selector(serviceClick:) forControlEvents:(UIControlEventTouchUpInside)]; [self.collectionView registerClass:[QXMineServiceSubCell class] forCellWithReuseIdentifier:@"QXMineServiceSubCell"];
[btn mas_makeConstraints:^(MASConstraintMaker *make) { self.collectionView.delegate = self;
make.left.mas_equalTo(line*btnWith); self.collectionView.dataSource = self;
make.top.equalTo(self.titleLabel.mas_bottom).offset(13+col*(btnHeight+13)); self.collectionView.showsHorizontalScrollIndicator = NO;
make.height.mas_equalTo(btnHeight); self.collectionView.bounces = NO;
make.width.mas_equalTo(btnWith); self.collectionView.backgroundColor = UIColor.clearColor;
}]; [self.bgView addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:self.serviceImageArray[i]]]; make.left.right.equalTo(self.bgView);
[self.bgView addSubview:imageView]; make.top.equalTo(self.titleLabel.mas_bottom).offset(22);
[imageView mas_makeConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(btnHeight*2+10);
make.top.centerX.equalTo(btn); // make.right.mas_equalTo(-12);
make.height.width.mas_equalTo(18); }];
}];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.textColor = QXConfig.textColor;
titleLabel.text = self.serviceArray[i]; // for (int i = 0; i < self.serviceArray.count; i++) {
titleLabel.font = [UIFont systemFontOfSize:12]; // NSInteger col = i / maxCount;
[self.bgView addSubview:titleLabel]; // NSInteger line = i % maxCount;
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { // UIButton *btn = [[UIButton alloc] init];
make.top.equalTo(imageView.mas_bottom).offset(3); // [self.bgView addSubview:btn];
make.centerX.equalTo(btn); // [btn setTitle:self.serviceArray[i] forState:(UIControlStateNormal)];
make.height.mas_equalTo(17); // [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{ -(void)serviceClick:(UIButton*)sender{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickServiceWithBtn:title:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didClickServiceWithBtn:title:)]) {
[self.delegate didClickServiceWithBtn:sender title:sender.titleLabel.text]; [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) { if (!_serviceArray) {
_serviceArray = @[ _serviceArray = [NSMutableArray arrayWithArray:@[
QXText(@"钱包"), QXText(@"钱包"),
QXText(@"段位"), QXText(@"段位"),
QXText(@"公会中心"), QXText(@"公会中心"),
QXText(@"个性装扮"), QXText(@"个性装扮"),
QXText(@"道具商城"), QXText(@"道具商城"),
QXText(@"我的背包"), QXText(@"我的背包"),
QXText(@"每日任务"), ]];
];
} }
return _serviceArray; return _serviceArray;
} }
-(NSArray *)serviceImageArray{ -(NSMutableArray *)serviceImageArray{
if (!_serviceImageArray) { if (!_serviceImageArray) {
_serviceImageArray = @[ _serviceImageArray = [NSMutableArray arrayWithArray:@[
@"service_wallet", @"service_wallet",
@"service_level", @"service_level",
@"service_guild", @"service_guild",
@"service_dress", @"service_dress",
@"service_shop", @"service_shop",
@"service_bag", @"service_bag",
@"service_task", ]];
];
} }
return _serviceImageArray; return _serviceImageArray;
@@ -135,3 +170,37 @@
} }
@end @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

View File

@@ -38,6 +38,7 @@
self.rightBgView = [[QXWalletHomeTopSubview alloc] init]; self.rightBgView = [[QXWalletHomeTopSubview alloc] init];
self.rightBgView.isCorn = NO; self.rightBgView.isCorn = NO;
self.rightBgView.delegate = self; self.rightBgView.delegate = self;
self.rightBgView.btn.hidden = !QXGlobal.shareGlobal.isOpenRecharge;
[self addSubview:self.rightBgView]; [self addSubview:self.rightBgView];
[self.rightBgView mas_makeConstraints:^(MASConstraintMaker *make) { [self.rightBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-16); make.right.mas_equalTo(-16);

View File

@@ -16,6 +16,7 @@
#import "QXMessageServices.h" #import "QXMessageServices.h"
#import "QXManagerMqtt.h" #import "QXManagerMqtt.h"
#import "OpenUDID.h" #import "OpenUDID.h"
#import "TUIChatConfig.h"
@implementation AppDelegate (Login) @implementation AppDelegate (Login)
-(void)configThirdPartLogin{ -(void)configThirdPartLogin{
@@ -31,6 +32,13 @@
- (void)ATAuthSDK { - (void)ATAuthSDK {
//SDKapp //SDKapp
///
#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) { [[TXCommonHandler sharedInstance] setAuthSDKInfo:AuthSDKKey complete:^(NSDictionary * _Nonnull resultDic) {
if ([PNSCodeSuccess isEqualToString:[resultDic objectForKey:@"resultCode"]]) { if ([PNSCodeSuccess isEqualToString:[resultDic objectForKey:@"resultCode"]]) {
//success //success

View File

@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Group 6931@2x.png", "filename" : "dynamic_copy_link@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Group 6931@3x.png", "filename" : "dynamic_copy_link@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Frame 1321316080@2x.png", "filename" : "dynamic_delete@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Frame 1321316080@3x.png", "filename" : "dynamic_delete@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Group 115@2x.png", "filename" : "dynamic_report@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Group 115@3x.png", "filename" : "dynamic_report@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -76,7 +76,7 @@ NSPhotoLibraryUsageDescription = "访问您的相册,允许可以把视频保存
"此刻想和大家分享点什么" = "此刻想和大家分享点什么"; "此刻想和大家分享点什么" = "此刻想和大家分享点什么";
"选择话题" = "选择话题"; "选择话题" = "选择话题";
"发现" = "发现"; "发现" = "发现";
"扩列" = "扩列"; "新人/扩列" = "新人/扩列";
"扩列交友" = "扩列交友"; "扩列交友" = "扩列交友";
"只看女生" = "只看女生"; "只看女生" = "只看女生";
"只看男生" = "只看男生"; "只看男生" = "只看男生";

View File

@@ -98,11 +98,18 @@ QXRoomUserInfoViewDelegate
[self initRedpacketManager]; [self initRedpacketManager];
[self initGiftDriftManager]; [self initGiftDriftManager];
[self initActivityObeserver]; [self initActivityObeserver];
// [self performSelector:@selector(test) afterDelay:5];
} }
//-(void)test{
// [self roomPKRecieveLoserWantToRunRoadWithUserInfo:nil];
//27b36h
//}
-(void)viewWillAppear:(BOOL)animated{ -(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:YES]; [self.navigationController setNavigationBarHidden:YES animated:YES];
if (QXGlobal.shareGlobal.isOpenRecharge) {
self.dayTaskTagView.hidden = NO;
}
} }
-(void)viewDidAppear:(BOOL)animated{ -(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated]; [super viewDidAppear:animated];
@@ -288,6 +295,8 @@ QXRoomUserInfoViewDelegate
}else{ }else{
MJWeakSelf MJWeakSelf
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId]; [[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
QXGlobal.shareGlobal.roomId = self.roomId;
QXGlobal.shareGlobal.roomVC = self;
[QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) { [QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
weakSelf.roomModel = roomModel; weakSelf.roomModel = roomModel;
[self resetSubviews]; [self resetSubviews];
@@ -585,7 +594,11 @@ QXRoomUserInfoViewDelegate
if (self.seatContentView.myPitNumber == 9) { if (self.seatContentView.myPitNumber == 9) {
[QXMineNetwork updateShengWangTokenWithRoomId:weakSelf.roomModel.pk_info.pk_room_id successBlock:^(NSString * _Nonnull token) { [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) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}]; }];
@@ -615,15 +628,16 @@ QXRoomUserInfoViewDelegate
} }
self.bottomView.roomModel = self.roomModel; self.bottomView.roomModel = self.roomModel;
BOOL hasPK = NO; 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; hasPK = YES;
} }
BOOL hasSong = NO; 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; hasSong = YES;
} }
/// pk /// pk
hasPK = NO; // hasPK = NO;
// /// ktv // /// ktv
// hasSong = NO; // hasSong = NO;
/// ///
@@ -792,8 +806,8 @@ QXRoomUserInfoViewDelegate
} }
} }
/// ///
-(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{
[self.seatContentView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number]; [self.seatContentView didUpDownSeatWithUser:user isUpSeat:isUpSeat pit_number:pit_number isPK:isPK];
if ([user.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { if ([user.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:isUpSeat]; [[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:isUpSeat];
@@ -825,17 +839,17 @@ QXRoomUserInfoViewDelegate
} }
} }
-(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo{ -(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
[self.seatContentView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo]; [self.seatContentView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) { if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
if (toPitNumber == 9) { if (toPitNumber == 9) {
self.soundBtn.hidden = NO; self.soundBtn.hidden = NO;
self.titleView.isCompere = YES; self.titleView.isCompere = YES;
self.seatContentView.myPitNumber = toPitNumber;
}else{ }else{
self.soundBtn.hidden = YES; self.soundBtn.hidden = YES;
self.titleView.isCompere = NO; self.titleView.isCompere = NO;
} }
self.seatContentView.myPitNumber = toPitNumber;
} }
} }
// //
@@ -1092,7 +1106,7 @@ QXRoomUserInfoViewDelegate
MJWeakSelf MJWeakSelf
QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))]; QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
al.type = QXAlertViewTypeAgreeSong; al.type = QXAlertViewTypeAgreeSong;
al.message = [NSString stringWithFormat:@"%@想结束本PK您确定结束吗",fromUserInfo.nickname]; al.message = [NSString stringWithFormat:@"%@想结束本PK您确定结束吗",fromUserInfo.nickname];
al.commitBlock = ^{ al.commitBlock = ^{
[QXMineNetwork roomPkEndWithPk_id:weakSelf.roomModel.pk_info.pk_id type:@"3" user_id:[QXGlobal shareGlobal].loginModel.user_id successBlock:^(NSDictionary * _Nonnull dict) { [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]; // [self getRoomInfo];
MJWeakSelf MJWeakSelf
//
[QXMineNetwork getRoomInfoWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) { [QXMineNetwork getRoomInfoWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
//
//
weakSelf.roomModel = roomModel; weakSelf.roomModel = roomModel;
//
[weakSelf resetSubviews]; [weakSelf resetSubviews];
//
weakSelf.seatContentView.roomModel = roomModel; weakSelf.seatContentView.roomModel = roomModel;
/// roomId roomid pk // roomId roomid pk
// pk
[QXMineNetwork getRoomInfoWithRoomId:room_id successBlock:^(QXRoomModel * _Nonnull roomModel) { [QXMineNetwork getRoomInfoWithRoomId:room_id successBlock:^(QXRoomModel * _Nonnull roomModel) {
// pk
//
weakSelf.seatContentView.pkRoomModel = roomModel; 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) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}]; }];
if (weakSelf.seatContentView.myPitNumber == 9) {
// 9
// token roomidroomid
[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) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}]; }];
@@ -1418,7 +1452,9 @@ QXRoomUserInfoViewDelegate
self.userInfoView.isOwner = NO; self.userInfoView.isOwner = NO;
self.userInfoView.isManager = NO; self.userInfoView.isManager = NO;
self.userInfoView.roomId = pkRoomId; self.userInfoView.roomId = pkRoomId;
self.userInfoView.isPK = YES;
}else{ }else{
self.userInfoView.isPK = NO;
if (self.seatContentView.myPitNumber == 9 || self.roomModel.user_info.is_host.intValue == 1) { if (self.seatContentView.myPitNumber == 9 || self.roomModel.user_info.is_host.intValue == 1) {
self.userInfoView.isCompere = YES; self.userInfoView.isCompere = YES;
}else{ }else{
@@ -2027,6 +2063,7 @@ QXRoomUserInfoViewDelegate
-(QXRoomDayTaskTagView *)dayTaskTagView{ -(QXRoomDayTaskTagView *)dayTaskTagView{
if (!_dayTaskTagView) { if (!_dayTaskTagView) {
_dayTaskTagView = [[QXRoomDayTaskTagView alloc] init]; _dayTaskTagView = [[QXRoomDayTaskTagView alloc] init];
_dayTaskTagView.hidden = YES;
MJWeakSelf MJWeakSelf
_dayTaskTagView.startBlock = ^{ _dayTaskTagView.startBlock = ^{
QXTaskViewController *vc = [[QXTaskViewController alloc] init]; QXTaskViewController *vc = [[QXTaskViewController alloc] init];

View File

@@ -13,7 +13,7 @@
#import "QXHomePageNetwork.h" #import "QXHomePageNetwork.h"
@interface QXAppstoreHomeView()<UICollectionViewDelegate,UICollectionViewDataSource,SDCycleScrollViewDelegate> @interface QXAppstoreHomeView()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,SDCycleScrollViewDelegate>
@property (nonatomic,strong)UIScrollView *scrollView; @property (nonatomic,strong)UIScrollView *scrollView;
@property (nonatomic,strong)UICollectionView *collectionView; @property (nonatomic,strong)UICollectionView *collectionView;
@property (nonatomic,strong)SDCycleScrollView *bannerScrollView; @property (nonatomic,strong)SDCycleScrollView *bannerScrollView;
@@ -197,6 +197,15 @@
return CGSizeMake(ScaleWidth(90), ScaleWidth(90)); 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{ -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
QXRoomListModel *model = self.dataArray[indexPath.row]; QXRoomListModel *model = self.dataArray[indexPath.row];

View File

@@ -123,6 +123,9 @@ typedef NS_ENUM(NSInteger) {
/// 礼物数量 巡乐会 /// 礼物数量 巡乐会
@property (nonatomic,strong)NSString *gift_num; @property (nonatomic,strong)NSString *gift_num;
/// 是否是pk房间的信息
@property (nonatomic,assign)BOOL is_pk;
- (BOOL)isSameGiftFromSameSender:(QXRoomChatListModel *)otherGift; - (BOOL)isSameGiftFromSameSender:(QXRoomChatListModel *)otherGift;
- (instancetype)copy; - (instancetype)copy;

View File

@@ -17,7 +17,7 @@
{ {
self = [super init]; self = [super init];
if (self) { 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]; [self initSubviews];
} }
return self; return self;

View File

@@ -218,7 +218,7 @@
self.followBtn = [[UIButton alloc] init]; self.followBtn = [[UIButton alloc] init];
self.followBtn.hidden = YES; self.followBtn.hidden = YES;
[self.followBtn setImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)]; [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.bgView addSubview:self.followBtn];
[self.followBtn mas_makeConstraints:^(MASConstraintMaker *make) { [self.followBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(22); make.left.mas_equalTo(22);
@@ -451,6 +451,10 @@
[self.relationView showInView:self.viewController.view]; [self.relationView showInView:self.viewController.view];
} }
-(void)followAction{
[[QXGlobal shareGlobal] joinRoomWithRoomId:self.roomId isRejoin:NO navagationController:self.viewController.navigationController];
}
-(void)toHomePage{ -(void)toHomePage{
[self hide]; [self hide];
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init]; QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];

View File

@@ -357,7 +357,7 @@
-(void)setOnlyShowHeader:(BOOL)onlyShowHeader{ -(void)setOnlyShowHeader:(BOOL)onlyShowHeader{
_onlyShowHeader = onlyShowHeader; _onlyShowHeader = onlyShowHeader;
self.charmBgView.hidden = 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{ -(void)setPitModel:(QXRoomPitModel *)pitModel{
@@ -384,7 +384,12 @@
self.nameLabel.hidden = NO; self.nameLabel.hidden = NO;
[self.headerView setHeadIcon:pitModel.avatar dress:pitModel.dress]; [self.headerView setHeadIcon:pitModel.avatar dress:pitModel.dress];
self.nameLabel.text = pitModel.nickname; self.nameLabel.text = pitModel.nickname;
self.charmBgView.hidden = NO; if (self.onlyShowHeader) {
self.charmBgView.hidden = YES;
}else{
self.charmBgView.hidden = NO;
}
self.charmLabel.text = [NSString qx_showHotCountNum:pitModel.charm.longLongValue]; self.charmLabel.text = [NSString qx_showHotCountNum:pitModel.charm.longLongValue];
// if (pitModel.is_mute.intValue == 1) { // if (pitModel.is_mute.intValue == 1) {

View File

@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXRoomModel *roomModel; @property (nonatomic,strong)QXRoomModel *roomModel;
@property (nonatomic,strong)QXRoomModel *pkRoomModel; @property (nonatomic,strong)QXRoomModel *pkRoomModel;
@property (nonatomic,assign)NSInteger myPitNumber; @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; -(void)clearCharm;
/// 清除个人魅力 /// 清除个人魅力
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 设置麦位锁麦状态 /// 设置麦位锁麦状态
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber; -(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开始 /// pk开始
-(void)pkStartWithPkEndTimes:(NSString *)pk_end_times pk_id:(NSString*)pk_id; -(void)pkStartWithPkEndTimes:(NSString *)pk_end_times pk_id:(NSString*)pk_id;

View File

@@ -258,6 +258,21 @@
}else{ }else{
self.muteRemoteBtn.hidden = YES; 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{ -(void)setPkRoomModel:(QXRoomModel *)pkRoomModel{
_pkRoomModel = pkRoomModel; _pkRoomModel = pkRoomModel;
@@ -274,7 +289,7 @@
_myPitNumber = myPitNumber; _myPitNumber = myPitNumber;
self.leftSeatView.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 ([user.user_id isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) {
if (isUpSeat) { if (isUpSeat) {
self.myPitNumber = pit_number; self.myPitNumber = pit_number;
@@ -286,10 +301,18 @@
self.muteRemoteBtn.hidden = YES; 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{ -(void)roomSeatExchangedWithFromPitNumber:(NSInteger)fromPitNumber toPitNumber:(NSInteger)toPitNumber userInfo:(QXUserHomeModel*)userInfo isPK:(BOOL)isPK{
[self.leftSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo]; if (isPK) {
[self.rightSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
}else{
[self.leftSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
}
} }
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user{ -(void)roomUserInfoDidChanged:(QXUserHomeModel *)user{
[self.leftSeatView roomUserInfoDidChanged:user]; [self.leftSeatView roomUserInfoDidChanged:user];
@@ -348,6 +371,11 @@
NSString *jsonStr = [dict jsonStringEncoded]; NSString *jsonStr = [dict jsonStringEncoded];
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:QXRoomMessageTypeMuteRemoteAudio userId:self.pk_userId]; [[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:QXRoomMessageTypeMuteRemoteAudio userId:self.pk_userId];
[[QXAgoraEngineEx sharedEngine] muteRemoteEXAudioStream:sender.selected]; [[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{ -(void)didClickUserHeaderWithPitModel:(QXRoomPitModel *)pitModel userModel:(id)userModel isPkRoom:(BOOL)isPkRoom pkRoomId:(NSString *)pkRoomId isNoTakeOff:(BOOL)isNoTakeOff{

View File

@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXSelectAuctionInfoView *auctionInfoView; @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; -(void)didAuctiontUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat;
/// 开始 /// 开始

View File

@@ -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; QXRoomSeatContentView *contentView;
if (pit_number == 9) { if (pit_number == 9) {
contentView = self.compereView; contentView = self.compereView;

View File

@@ -29,7 +29,7 @@ typedef NS_ENUM(NSInteger) {
@property (nonatomic,weak)id<QXRoomSeatDelegate>delegate; @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 /// 交友房阶段发生变化 step 阶段 1等待 2心动 3牵手 friend_id 场次id
-(void)friendPartDidChangedWithType:(NSString*)step friend_id:(NSString*)friend_id end_time:(NSString*)end_time relationModel:(QXRoomFriendRelationModel*)relationModel; -(void)friendPartDidChangedWithType:(NSString*)step friend_id:(NSString*)friend_id end_time:(NSString*)end_time relationModel:(QXRoomFriendRelationModel*)relationModel;
/// 交友房时间发生延时 end_time 截止时间 /// 交友房时间发生延时 end_time 截止时间
@@ -54,7 +54,7 @@ typedef NS_ENUM(NSInteger) {
/// 用户信息发生改变 /// 用户信息发生改变
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user; -(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)stopHWDMP4;
-(void)playHWDMP4; -(void)playHWDMP4;
/// 销毁视图 /// 销毁视图

View File

@@ -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) { if (pit_number > 10) {
return; return;
} }
@@ -859,7 +859,7 @@
contentView.pitModel = model; contentView.pitModel = model;
[self configGameOptionBtn]; [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) { if (fromPitNumber == 0 || toPitNumber == 0) {
return; return;
} }

View File

@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign)NSInteger myPitNumber; @property (nonatomic,assign)NSInteger myPitNumber;
@property (nonatomic,strong)QXRoomSeatContentView* mySeatView; @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; -(void)clearCharm;
/// 清除个人魅力 /// 清除个人魅力
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
-(void)roomUserInfoDidChanged:(QXUserHomeModel *)user; -(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)stopHWDMP4;
-(void)playHWDMP4; -(void)playHWDMP4;

View File

@@ -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) { if (pit_number > 10) {
return; return;
} }
@@ -274,6 +274,7 @@ static NSInteger maxSeat = 8;
-(void)setIsPKOtherRoom:(BOOL)isPKOtherRoom{ -(void)setIsPKOtherRoom:(BOOL)isPKOtherRoom{
_isPKOtherRoom = isPKOtherRoom; _isPKOtherRoom = isPKOtherRoom;
self.compereView.isPK = YES; self.compereView.isPK = YES;
self.compereView.onlyShowHeader = YES;
[self.compereView mas_remakeConstraints:^(MASConstraintMaker *make) { [self.compereView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self).offset(0); make.top.equalTo(self).offset(0);
make.width.mas_equalTo(ScaleWidth(60)); make.width.mas_equalTo(ScaleWidth(60));
@@ -298,6 +299,7 @@ static NSInteger maxSeat = 8;
if (i < 8) { if (i < 8) {
QXRoomSeatContentView *contentView = self.seatArray[i]; QXRoomSeatContentView *contentView = self.seatArray[i];
contentView.isPK = YES; contentView.isPK = YES;
contentView.onlyShowHeader = YES;
[contentView mas_remakeConstraints:^(MASConstraintMaker *make) { [contentView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.guestView.mas_bottom).offset(topSpace+(seatHeight+topSpace)*(i/4)); make.top.equalTo(self.guestView.mas_bottom).offset(topSpace+(seatHeight+topSpace)*(i/4));
make.left.equalTo(self).offset(leftMargin+(seatWidth+itemSpace)*(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) { for (QXRoomSeatContentView *seatView in self.seatArray) {
QXRoomPitModel *model = seatView.pitModel; QXRoomPitModel *model = seatView.pitModel;
model.charm = @"0"; model.charm = @"0";
seatView.pitModel = model; // seatView.pitModel = model;
[seatView updateUserCharm:model.charm];
// if (self.isPKMyRoom || self.isPKOtherRoom) { // if (self.isPKMyRoom || self.isPKOtherRoom) {
// [seatView hideCharm]; // [seatView hideCharm];
// } // }
@@ -335,7 +338,8 @@ static NSInteger maxSeat = 8;
QXRoomPitModel *model = seatView.pitModel; QXRoomPitModel *model = seatView.pitModel;
if ([model.user_id isEqualToString:userId]) { if ([model.user_id isEqualToString:userId]) {
model.charm = @"0"; model.charm = @"0";
seatView.pitModel = model; // seatView.pitModel = model;
[seatView updateUserCharm:model.charm];
break; break;
} }
// if (self.isPKMyRoom || self.isPKOtherRoom) { // 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) { if (fromPitNumber == 0 || toPitNumber == 0) {
return; return;
} }
@@ -377,7 +381,9 @@ static NSInteger maxSeat = 8;
fromPitModel.pit_number = totModel.pit_number; fromPitModel.pit_number = totModel.pit_number;
totModel.pit_number = tmpPitNum; totModel.pit_number = tmpPitNum;
NSMutableArray*arr = [NSMutableArray arrayWithArray:self.roomModel.room_info.pit_list]; NSMutableArray*arr = [NSMutableArray arrayWithArray:self.roomModel.room_info.pit_list];
[arr exchangeObjectAtIndex:fromPitNumber-1 withObjectAtIndex:toPitNumber-1]; if (toPitNumber <= arr.count) {
[arr exchangeObjectAtIndex:fromPitNumber-1 withObjectAtIndex:toPitNumber-1];
}
self.roomModel.room_info.pit_list = arr; self.roomModel.room_info.pit_list = arr;
toSeatView.pitModel = fromPitModel; toSeatView.pitModel = fromPitModel;
fromSeatView.pitModel = totModel; fromSeatView.pitModel = totModel;

View File

@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 设置多人魅力 /// 设置多人魅力
-(void)setSeatCharmWithUsers:(NSArray<QXUserHomeModel*>*)users; -(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; -(void)songRoomCharmRankListDidChanged:(NSArray<QXRoomPitModel *>*)list;
/// 房间内用户信息发生变化 /// 房间内用户信息发生变化

View File

@@ -267,7 +267,7 @@ QXRoomSeatDelegate
[self.delegate previewRoomUserCharmListWithUserId:userId]; [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) { // if (pit_number==9999) {
// for (<#type *object#> in <#collection#>) { // for (<#type *object#> in <#collection#>) {
// <#statements#> // <#statements#>

View File

@@ -61,11 +61,11 @@ typedef NS_ENUM(NSInteger) {
/// 设置麦位锁麦状态 /// 设置麦位锁麦状态
-(void)setSeatIsLock:(NSString*)isLock pitNumber:(NSString*)pitNumber; -(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)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;

View File

@@ -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) { if (self.roomModel == nil) {
return; return;
} }
switch (self.type) { switch (self.type) {
case QXRoomSeatViewTypeNormal: case QXRoomSeatViewTypeNormal:
[self.normalSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo]; [self.normalSeatView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
break; break;
case QXRoomSeatViewTypeSing: case QXRoomSeatViewTypeSing:
// [self.songView clearCharm]; // [self.songView clearCharm];
@@ -934,10 +934,10 @@
case QXRoomSeatViewTypeCabin: case QXRoomSeatViewTypeCabin:
break; break;
case QXRoomSeatViewTypePK: case QXRoomSeatViewTypePK:
[self.roomPkView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo]; [self.roomPkView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
break; break;
case QXRoomSeatViewTypeFriend: case QXRoomSeatViewTypeFriend:
[self.roomFriendView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo]; [self.roomFriendView roomSeatExchangedWithFromPitNumber:fromPitNumber toPitNumber:toPitNumber userInfo:userInfo isPK:isPK];
break; break;
default: default:
break; break;
@@ -1189,28 +1189,28 @@
-(void)didHugSeatWithPitNumber:(NSString *)pitNumber{ -(void)didHugSeatWithPitNumber:(NSString *)pitNumber{
[self showOnlineListWithPitNumber: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) { if (self.roomModel == nil) {
return; return;
} }
switch (self.type) { switch (self.type) {
case QXRoomSeatViewTypeNormal: 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; break;
case QXRoomSeatViewTypeSing: 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; break;
case QXRoomSeatViewTypeAuction: 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; break;
case QXRoomSeatViewTypeCabin: case QXRoomSeatViewTypeCabin:
// self.cabinView.roomModel = roomModel; // self.cabinView.roomModel = roomModel;
break; break;
case QXRoomSeatViewTypePK: 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; break;
case QXRoomSeatViewTypeFriend: 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; break;
default: default:
break; break;

View File

@@ -99,17 +99,18 @@
break; break;
case QXAlertViewTypeAgreeSong: case QXAlertViewTypeAgreeSong:
case QXAlertViewTypeAgreePK:{ case QXAlertViewTypeAgreePK:{
MJWeakSelf @weakify(self)
[self.cancelBtn setTitle:QXText(@"拒绝") forState:(UIControlStateNormal)]; [self.cancelBtn setTitle:QXText(@"拒绝") forState:(UIControlStateNormal)];
[self.commitBtn setTitle:QXText(@"同意") forState:(UIControlStateNormal)]; [self.commitBtn setTitle:QXText(@"同意") forState:(UIControlStateNormal)];
__block int timeCount = 10; __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--; timeCount--;
if (timeCount<=0) { if (timeCount<=0) {
[self->_timer invalidate]; [self.timer invalidate];
[weakSelf cancelAction]; [self cancelAction];
}else{ }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; self.titleLabel.text = title;
} }
-(void)cancelAction{ -(void)cancelAction{
if (_timer) { if (self.timer) {
[self->_timer invalidate]; [self.timer invalidate];
_timer = nil; self.timer = nil;
} }
MJWeakSelf @weakify(self)
[[QXGlobal shareGlobal] hideViewBlock:^{ [[QXGlobal shareGlobal] hideViewBlock:^{
if (weakSelf.cancelBlock) { @strongify(self)
weakSelf.cancelBlock(); if (self.cancelBlock) {
self.cancelBlock();
} }
}]; }];
} }
-(void)commitAction{ -(void)commitAction{
if (_timer) { if (self.timer) {
[self->_timer invalidate]; [self.timer invalidate];
_timer = nil; self.timer = nil;
} }
MJWeakSelf @weakify(self)
[[QXGlobal shareGlobal] hideViewBlock:^{ [[QXGlobal shareGlobal] hideViewBlock:^{
if (weakSelf.commitBlock) { @strongify(self)
weakSelf.commitBlock(); if (self.commitBlock) {
self.commitBlock();
} }
}]; }];
} }

View File

@@ -38,6 +38,7 @@
self.topImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"app_update_top_bg"]]; self.topImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"app_update_top_bg"]];
self.topImageView.frame = CGRectMake(0, 0, self.bgView.width, ScaleWidth(170)); self.topImageView.frame = CGRectMake(0, 0, self.bgView.width, ScaleWidth(170));
self.topImageView.contentMode = UIViewContentModeScaleToFill;
[self.bgView addSubview:self.topImageView]; [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))]; self.bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, self.topImageView.bottom-ScaleWidth(12), self.bgView.width, self.bgView.height-self.topImageView.height+ScaleWidth(12))];

View File

@@ -37,6 +37,7 @@
-(void)initSubViews{ -(void)initSubViews{
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_chirld_mode"]]; self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_chirld_mode"]];
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
[self addSubview:self.bgImageView]; [self addSubview:self.bgImageView];
self.titleLabel = [[UILabel alloc] init]; self.titleLabel = [[UILabel alloc] init];

View File

@@ -40,6 +40,7 @@
}]; }];
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_first_recharge_bg"]]; self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_first_recharge_bg"]];
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
[self addSubview:self.bgImageView]; [self addSubview:self.bgImageView];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.equalTo(self); make.centerX.centerY.equalTo(self);

View File

@@ -54,6 +54,7 @@
}]; }];
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_new_user_recharge"]]; self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_new_user_recharge"]];
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
[self addSubview:self.bgImageView]; [self addSubview:self.bgImageView];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.equalTo(self); make.centerX.centerY.equalTo(self);

View File

@@ -43,6 +43,7 @@
}]; }];
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_nice_gift"]]; self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_nice_gift"]];
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
[self addSubview:self.bgImageView]; [self addSubview:self.bgImageView];
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.equalTo(self); make.centerX.centerY.equalTo(self);

View File

@@ -28,6 +28,7 @@
-(void)initSubViews{ -(void)initSubViews{
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_realname"]]; self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"a_pop_realname"]];
self.bgImageView.contentMode = UIViewContentModeScaleToFill;
[self addSubview:self.bgImageView]; [self addSubview:self.bgImageView];
self.titleLabel = [[UILabel alloc] init]; self.titleLabel = [[UILabel alloc] init];

View File

@@ -260,6 +260,8 @@
-(void)setDynamicModel:(QXDynamicModel *)dynamicModel{ -(void)setDynamicModel:(QXDynamicModel *)dynamicModel{
_dynamicModel = dynamicModel; _dynamicModel = dynamicModel;
if (![dynamicModel.user_id isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) { if (![dynamicModel.user_id isEqualToString:[QXGlobal shareGlobal].loginModel.user_id]) {
[self.eventArray removeObjectAtIndex:2];
}else{
[self.eventArray removeLastObject]; [self.eventArray removeLastObject];
} }
MJWeakSelf MJWeakSelf
@@ -321,7 +323,12 @@
model3.icon = @"dynamic_delete"; model3.icon = @"dynamic_delete";
model3.name = QXText(@"删除"); model3.name = QXText(@"删除");
model3.Id = @"2"; 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; return _eventArray;
} }

View File

@@ -20,7 +20,7 @@
{ {
self = [super init]; self = [super init];
if (self) { 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]; [self initSubviews];
} }
return self; return self;

View File

@@ -199,6 +199,8 @@ typedef NS_OPTIONS(NSInteger, TUIChatInputBarMoreMenuItem) {
*/ */
@property (nonatomic, weak) id<TUIChatShortcutViewDataSource> shortcutViewDataSource; @property (nonatomic, weak) id<TUIChatShortcutViewDataSource> shortcutViewDataSource;
@property (nonatomic, assign)BOOL isAppStore;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -399,9 +399,12 @@
#pragma mark-- UITextViewDelegate #pragma mark-- UITextViewDelegate
- (void)textViewDidBeginEditing:(UITextView *)textView { - (void)textViewDidBeginEditing:(UITextView *)textView {
NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"]; NSInteger isCanChat = [[NSUserDefaults standardUserDefaults] integerForKey:@"kIsCanChat"];
#if DEBUG //#if DEBUG
isCanChat = 1; // isCanChat = 1;
#endif //#endif
if (TUIChatConfig.defaultConfig.isAppStore) {
isCanChat = 1;
}
if (isCanChat != 1) { if (isCanChat != 1) {
[self.inputTextView resignFirstResponder]; [self.inputTextView resignFirstResponder];
[self alertChat]; [self alertChat];