diff --git a/QXLive.xcodeproj/project.pbxproj b/QXLive.xcodeproj/project.pbxproj
index a4b47b1..1bec526 100644
--- a/QXLive.xcodeproj/project.pbxproj
+++ b/QXLive.xcodeproj/project.pbxproj
@@ -780,12 +780,12 @@
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.2;
+ MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.xscm.midi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -842,12 +842,12 @@
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.2;
+ MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.xscm.midi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index ebc1369..76ce427 100644
--- a/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/QXLive.xcworkspace/xcuserdata/qixing.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -240,21 +240,5 @@
landmarkType = "7">
-
-
-
-
diff --git a/QXLive/Config/QXManagerMqtt.h b/QXLive/Config/QXManagerMqtt.h
index 5b2258d..577782f 100755
--- a/QXLive/Config/QXManagerMqtt.h
+++ b/QXLive/Config/QXManagerMqtt.h
@@ -11,6 +11,8 @@
#import
static NSString * _Nonnull qx_room_topic = @"qx_room_topic";
static NSString * _Nonnull qx_ac_topic = @"qx_xunlehui";
+static NSString * _Nonnull qx_hour_ranking = @"qx_hour_ranking";
+
NS_ASSUME_NONNULL_BEGIN
@protocol MQTTClientModelDelegate
@optional
diff --git a/QXLive/Config/QXManagerMqtt.m b/QXLive/Config/QXManagerMqtt.m
index 10ce811..728f2cb 100755
--- a/QXLive/Config/QXManagerMqtt.m
+++ b/QXLive/Config/QXManagerMqtt.m
@@ -80,6 +80,7 @@
QXLOG(@"eventCode -- 连接成功");
[self subscribeTopic:qx_room_topic];
[self subscribeTopic:qx_ac_topic];
+ [self subscribeTopic:qx_hour_ranking];
[self reConnectForStateError];
break;
diff --git a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m
index 993d6a7..bc62a91 100644
--- a/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m
+++ b/QXLive/HomePage(声播)/Controlller/房间/QXRoomViewController.m
@@ -423,6 +423,11 @@ QXRoomUserInfoViewDelegate
[self.acTagView stopTimer];
[self.acTagView removeFromSuperview];
}
+ if (self.roomModel.hour_ranking_open == 1) {
+ self.hourRankIconView.hidden = NO;
+ }else{
+ self.hourRankIconView.hidden = YES;
+ }
}
@@ -1927,6 +1932,7 @@ QXRoomUserInfoViewDelegate
_hourRankIconView.startBlock = ^{
[weakSelf.hourRankView showInView:weakSelf.view];
};
+ _hourRankIconView.hidden = YES;
}
return _hourRankIconView;
}
diff --git a/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.m b/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.m
index 112d8cc..02bdc2b 100644
--- a/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.m
+++ b/QXLive/HomePage(声播)/View/房间/QXAllRoomHourRankView.m
@@ -90,12 +90,13 @@
self.helpBtn = [[UIButton alloc] init];
[self.helpBtn setImage:[UIImage imageNamed:@"room_hour_rank_help"] forState:(UIControlStateNormal)];
+ [self.helpBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.bgView addSubview:self.helpBtn];
[self.helpBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.bgView);
- make.top.mas_equalTo(ScaleWidth(40));
- make.height.mas_equalTo(ScaleWidth(24));
- make.width.mas_equalTo(ScaleWidth(24));
+ make.top.mas_equalTo(ScaleWidth(50));
+ make.height.mas_equalTo(ScaleWidth(40));
+ make.width.mas_equalTo(ScaleWidth(40));
}];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
@@ -130,7 +131,7 @@
-(void)getRankList{
MJWeakSelf
[QXMineNetwork roomHourRankWithPage:self.page successBlock:^(QXRoomHourRankModel * _Nonnull model) {
- if (weakSelf.page == 0) {
+ if (weakSelf.page == 1) {
[weakSelf.dataArray removeAllObjects];
}
weakSelf.timeLabel.text = [NSString stringWithFormat:@"榜单时间 %@",model.time_range];
@@ -163,6 +164,7 @@
}
-(void)showInView:(UIView *)view{
+ self.page = 1;
[self getRankList];
self.bgView.x = SCREEN_WIDTH;
[view addSubview:self];
@@ -177,6 +179,13 @@
[self removeFromSuperview];
}];
}
+
+-(void)helpAction{
+ QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
+ NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"24"];
+ vc.urlStr = urlString;
+ [self.viewController.navigationController pushViewController:vc animated:YES];
+}
-(NSMutableArray *)dataArray{
if (!_dataArray) {
_dataArray = [NSMutableArray array];
@@ -198,6 +207,7 @@
}
-(void)initSubviews{
+ self.contentView.backgroundColor = RGB16(0x420B93);
self.rankNumberImageView = [[UIImageView alloc] init];
[self.contentView addSubview:self.rankNumberImageView];
[self.rankNumberImageView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -240,9 +250,11 @@
[self.contentView addSubview:self.activityBgView];
[self.activityBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.right.mas_equalTo(-5);
- make.top.mas_equalTo(8);
- make.width.mas_equalTo(44);
- make.height.mas_equalTo(48);
+ make.centerY.equalTo(self.contentView);
+
+// make.top.mas_equalTo(8);
+ make.width.mas_equalTo(63);
+ make.height.mas_equalTo(67);
}];
self.activityStatusBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"activity_status_ing"]];
@@ -254,7 +266,7 @@
}];
self.statusLabel = [[UILabel alloc] init];
- self.statusLabel.font = [UIFont systemFontOfSize:10];
+ self.statusLabel.font = [UIFont systemFontOfSize:12];
self.statusLabel.textColor = RGB16(0xffffff);
self.statusLabel.textAlignment = NSTextAlignmentCenter;
[self.activityBgView addSubview:self.statusLabel];
@@ -268,7 +280,7 @@
[self.activityImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.activityBgView);
make.centerX.equalTo(self.activityBgView);
- make.width.height.mas_equalTo(36);
+ make.width.height.mas_equalTo(55);
}];
self.nameLabel = [[UILabel alloc] init];
diff --git a/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m b/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m
index 2fbecc0..208a8df 100644
--- a/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m
+++ b/QXLive/HomePage(声播)/View/房间/设置/QXRoomSettingView.m
@@ -16,6 +16,7 @@
#import "QXAlertView.h"
#import "QXGiftDriftView.h"
#import "QXMeetActivityDriftView.h"
+#import "QXDrifRoomHourRankView.h"
@interface QXRoomSettingView()
@property (nonatomic,strong)UIView *bgView;
@@ -673,6 +674,7 @@
[[NSUserDefaults standardUserDefaults] setBool:model.isSelected forKey:kIsCloseDrifPop];
[[QXGiftDriftView shareView] drifPopIsClose:model.isSelected];
[[QXMeetActivityDriftView shareView] drifPopIsClose:model.isSelected];
+ [[QXDrifRoomHourRankView shareView] drifPopIsClose:model.isSelected];
return;
}
if (model.type == QXRoomSettingTypeRoomOrderMic) {
diff --git a/QXLive/Mine(音域)/Controller/钱包/QXWithDrawRecordVC.m b/QXLive/Mine(音域)/Controller/钱包/QXWithDrawRecordVC.m
index 5181312..a44c112 100644
--- a/QXLive/Mine(音域)/Controller/钱包/QXWithDrawRecordVC.m
+++ b/QXLive/Mine(音域)/Controller/钱包/QXWithDrawRecordVC.m
@@ -94,7 +94,7 @@
_tableView.backgroundColor = [UIColor clearColor];
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
- _tableView.rowHeight = 66;
+ _tableView.rowHeight = 180;
MJWeakSelf
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.page = 1;
diff --git a/QXLive/Mine(音域)/Controller/钱包/QXWithDrawViewController.m b/QXLive/Mine(音域)/Controller/钱包/QXWithDrawViewController.m
index aa267c3..5dae108 100644
--- a/QXLive/Mine(音域)/Controller/钱包/QXWithDrawViewController.m
+++ b/QXLive/Mine(音域)/Controller/钱包/QXWithDrawViewController.m
@@ -155,13 +155,14 @@
[QXMineNetwork walletPayTypeWithUserId:QXGlobal.shareGlobal.loginModel.user_id successBlock:^(QXPayTypeStatusModel * _Nonnull model) {
[weakSelf.dataArray removeAllObjects];
+ weakSelf.selectedPayTypeModel = nil;
if (model.wx.is_with_draw_open.intValue == 1 && model.wx.is_bind.intValue == 1) {
[weakSelf.dataArray addObject:model.wx];
}
- if (model.ali.is_pay_open.intValue == 1 && model.ali.is_bind.intValue == 1) {
+ if (model.ali.is_with_draw_open.intValue == 1 && model.ali.is_bind.intValue == 1) {
[weakSelf.dataArray addObject:model.ali];
}
- if (model.bank.is_pay_open.intValue == 1 && model.bank.is_bind.intValue == 1) {
+ if (model.bank.is_with_draw_open.intValue == 1 && model.bank.is_bind.intValue == 1) {
[weakSelf.dataArray addObject:model.bank];
}
[weakSelf.tableView reloadData];
@@ -181,6 +182,10 @@
showToast(@"请输入提现金额");
return;
}
+ if (self.selectedPayTypeModel == nil) {
+ showToast(@"请选择提现方式");
+ return;
+ }
MJWeakSelf
QXReVerificationPopView *popView = [[QXReVerificationPopView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(200))];
popView.commitBlock = ^(NSString * _Nonnull code) {
diff --git a/QXLive/Mine(音域)/Model/QXCoinDetailModel.h b/QXLive/Mine(音域)/Model/QXCoinDetailModel.h
index c59a4c0..f90fafb 100644
--- a/QXLive/Mine(音域)/Model/QXCoinDetailModel.h
+++ b/QXLive/Mine(音域)/Model/QXCoinDetailModel.h
@@ -30,12 +30,20 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *name;
/// 变动类型
@property (nonatomic,strong)NSString *money;
-/// 1待处理2已通过3已拒绝 4打款中[云账户]5打款失败[云账户]6已打款[云账户]
+/// 状态:1待处理2已通过3已拒绝 4打款中[云账户]5打款失败[云账户]6已打款[云账户]
@property (nonatomic,strong)NSString *status;
-/// 变动金额
+/// 状态说明
@property (nonatomic,strong)NSString *status_str;
-/// 时间
+/// 提现时间
@property (nonatomic,strong)NSString *createtime;
+/// 手续费/服务费
+@property (nonatomic,strong)NSString *withdraw_fee;
+/// 税率
+@property (nonatomic,strong)NSString *personal_tax_rate;
+/// 税款(个人所得税)
+@property (nonatomic,strong)NSString *received_tax_amount;
+/// 实际到账金额
+@property (nonatomic,strong)NSString *surplus_money;
@end
NS_ASSUME_NONNULL_END
diff --git a/QXLive/Mine(音域)/Model/QXRoomModel.h b/QXLive/Mine(音域)/Model/QXRoomModel.h
index d61d0ec..04ce629 100644
--- a/QXLive/Mine(音域)/Model/QXRoomModel.h
+++ b/QXLive/Mine(音域)/Model/QXRoomModel.h
@@ -34,6 +34,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSArray< QXRoomPitModel*> *song_pit_list;
/// 活动
@property (nonatomic,strong)QXRoomActivityModel *gift_cycle;
+
+@property (nonatomic,assign)NSInteger hour_ranking_open;
@end
diff --git a/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.h b/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.h
index 7ca48d0..0b9fa15 100644
--- a/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.h
+++ b/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.h
@@ -10,10 +10,14 @@
NS_ASSUME_NONNULL_BEGIN
@interface QXWithDrawRecordCell : UITableViewCell
-@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;
+@property (weak, nonatomic) IBOutlet UILabel *realTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
-@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
+@property (weak, nonatomic) IBOutlet UILabel *withDrawPriceLabel;
+@property (weak, nonatomic) IBOutlet UILabel *realPriceLabel;
+@property (weak, nonatomic) IBOutlet UILabel *feeLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;
+@property (weak, nonatomic) IBOutlet UILabel *personalFeeLabel;
+@property (weak, nonatomic) IBOutlet UIImageView *leftImageView;
@property (nonatomic,strong)QXWithDrawRecordModel *model;
+(instancetype)cellWithTableView:(UITableView *)tableView;
diff --git a/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.m b/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.m
index 40593ca..5887735 100644
--- a/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.m
+++ b/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.m
@@ -14,15 +14,69 @@
if (!cell) {
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
cell.backgroundColor = [UIColor clearColor];
+ cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
return cell;
}
-(void)setModel:(QXWithDrawRecordModel *)model{
_model = model;
- self.reasonLabel.text = model.name;
+ self.withDrawPriceLabel.text = [NSString stringWithFormat:@"%.2f",model.money.doubleValue];
+ self.feeLabel.text = [NSString stringWithFormat:@"%.2f",model.withdraw_fee.doubleValue];
+ self.personalFeeLabel.text = [NSString stringWithFormat:@"%.2f",model.received_tax_amount.doubleValue];
+ self.realPriceLabel.text = [NSString stringWithFormat:@"%.2f",model.surplus_money.doubleValue];;
self.timeLabel.text = model.createtime;
- self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.money.doubleValue];
self.statusLabel.text = model.status_str;
+ if (model.status.intValue == 1) {
+// self.statusLabel.text = @"待处理";
+ self.realTitleLabel.text = @"提现金额(个税扣除前)";
+ self.statusLabel.textColor = RGB16(0x0DFFB9);
+ self.realPriceLabel.textColor = RGB16(0x333333);
+ self.leftImageView.image =[UIImage imageNamed:@"wallet_record_green"];
+ return;
+ }
+ if (model.status.intValue == 2) {
+// self.statusLabel.text = @"已通过";
+ self.realTitleLabel.text = @"提现金额(个税扣除前)";
+ self.statusLabel.textColor = RGB16(0x999999);
+ self.realPriceLabel.textColor = RGB16(0x333333);
+ self.leftImageView.image =[UIImage imageNamed:@"wallet_record_gray"];
+ return;
+ }
+ if (model.status.intValue == 3) {
+ self.realTitleLabel.text = @"退款金额";
+// self.statusLabel.text = @"已拒绝";
+ self.statusLabel.textColor = RGB16(0xFF8ACC);
+ self.realPriceLabel.textColor = RGB16(0x333333);
+ self.leftImageView.image =[UIImage imageNamed:@"wallet_record_pink"];
+ return;
+ }
+ if (model.status.intValue == 4) {
+// self.statusLabel.text = @"打款中";
+ self.realTitleLabel.text = @"提现金额(个税扣除前)";
+ self.realPriceLabel.textColor = RGB16(0x333333);
+ self.statusLabel.textColor = RGB16(0x68A5FF);
+ self.leftImageView.image =[UIImage imageNamed:@"wallet_record_blue"];
+ return;
+ }
+ if (model.status.intValue == 5) {
+// self.statusLabel.text = @"打款失败";
+ self.realTitleLabel.text = @"退款金额";
+ self.realPriceLabel.textColor = RGB16(0x333333);
+ self.statusLabel.textColor = RGB16(0xFF8ACC);
+ self.leftImageView.image =[UIImage imageNamed:@"wallet_record_pink"];
+ return;
+ }
+ if (model.status.intValue == 6) {
+// self.statusLabel.text = @"已到账";
+ self.realTitleLabel.text = @"实际到账";
+ self.realPriceLabel.textColor = RGB16(0x2ADB88);
+ self.statusLabel.textColor = RGB16(0x999999);
+ self.leftImageView.image =[UIImage imageNamed:@"wallet_record_gray"];
+ return;
+ }
+// self.reasonLabel.text = model.name;
+// self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.money.doubleValue];
+// self.statusLabel.text = model.status_str;
}
- (void)awakeFromNib {
diff --git a/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.xib b/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.xib
index dcb5adb..a836670 100644
--- a/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.xib
+++ b/QXLive/Mine(音域)/View/钱包/QXWithDrawRecordCell.xib
@@ -10,67 +10,158 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
-
+
diff --git a/QXLive/Other/Assets.xcassets/drif/Contents.json b/QXLive/Other/Assets.xcassets/drif/Contents.json
new file mode 100644
index 0000000..73c0059
--- /dev/null
+++ b/QXLive/Other/Assets.xcassets/drif/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/QXLive/Other/Assets.xcassets/mine/User, People.imageset/Contents.json b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_first.imageset/Contents.json
similarity index 76%
rename from QXLive/Other/Assets.xcassets/mine/User, People.imageset/Contents.json
rename to QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_first.imageset/Contents.json
index 3a72449..96ca95d 100644
--- a/QXLive/Other/Assets.xcassets/mine/User, People.imageset/Contents.json
+++ b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_first.imageset/Contents.json
@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
- "filename" : "User, People@2x.png",
+ "filename" : "room_hour_rank_drif_first@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "User, People@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_first.imageset/room_hour_rank_drif_first@2x.png b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_first.imageset/room_hour_rank_drif_first@2x.png
new file mode 100644
index 0000000..06af02e
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_first.imageset/room_hour_rank_drif_first@2x.png differ
diff --git a/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/Contents.json b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_second.imageset/Contents.json
similarity index 75%
rename from QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/Contents.json
rename to QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_second.imageset/Contents.json
index b53528e..39fbfaf 100644
--- a/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/Contents.json
+++ b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_second.imageset/Contents.json
@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
- "filename" : "User, People@2x(1).png",
+ "filename" : "room_hour_rank_drif_second@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "User, People@3x(1).png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_second.imageset/room_hour_rank_drif_second@2x.png b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_second.imageset/room_hour_rank_drif_second@2x.png
new file mode 100644
index 0000000..fb49716
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_second.imageset/room_hour_rank_drif_second@2x.png differ
diff --git a/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/Contents.json b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_third.imageset/Contents.json
similarity index 62%
rename from QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/Contents.json
rename to QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_third.imageset/Contents.json
index 7f4247f..a2e5e12 100644
--- a/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/Contents.json
+++ b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_third.imageset/Contents.json
@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
- "filename" : "花瓣素材_图标系列3D人物客服_193718966 1@2x.png",
+ "filename" : "room_hour_rank_drif_third@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "花瓣素材_图标系列3D人物客服_193718966 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
diff --git a/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_third.imageset/room_hour_rank_drif_third@2x.png b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_third.imageset/room_hour_rank_drif_third@2x.png
new file mode 100644
index 0000000..0737a4b
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/drif/room_hour_rank_drif_third.imageset/room_hour_rank_drif_third@2x.png differ
diff --git a/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/User, People@2x(1).png b/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/User, People@2x(1).png
deleted file mode 100644
index 41a278e..0000000
Binary files a/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/User, People@2x(1).png and /dev/null differ
diff --git a/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/User, People@3x(1).png b/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/User, People@3x(1).png
deleted file mode 100644
index fc72b90..0000000
Binary files a/QXLive/Other/Assets.xcassets/mine/User, People(1).imageset/User, People@3x(1).png and /dev/null differ
diff --git a/QXLive/Other/Assets.xcassets/mine/User, People.imageset/User, People@2x.png b/QXLive/Other/Assets.xcassets/mine/User, People.imageset/User, People@2x.png
deleted file mode 100644
index f74e7eb..0000000
Binary files a/QXLive/Other/Assets.xcassets/mine/User, People.imageset/User, People@2x.png and /dev/null differ
diff --git a/QXLive/Other/Assets.xcassets/mine/User, People.imageset/User, People@3x.png b/QXLive/Other/Assets.xcassets/mine/User, People.imageset/User, People@3x.png
deleted file mode 100644
index 0f63e17..0000000
Binary files a/QXLive/Other/Assets.xcassets/mine/User, People.imageset/User, People@3x.png and /dev/null differ
diff --git a/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/花瓣素材_图标系列3D人物客服_193718966 1@2x.png b/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/花瓣素材_图标系列3D人物客服_193718966 1@2x.png
deleted file mode 100644
index e1fe5f3..0000000
Binary files a/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/花瓣素材_图标系列3D人物客服_193718966 1@2x.png and /dev/null differ
diff --git a/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/花瓣素材_图标系列3D人物客服_193718966 1@3x.png b/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/花瓣素材_图标系列3D人物客服_193718966 1@3x.png
deleted file mode 100644
index e15145b..0000000
Binary files a/QXLive/Other/Assets.xcassets/mine/花瓣素材_图标系列3D人物客服_193718966 1.imageset/花瓣素材_图标系列3D人物客服_193718966 1@3x.png and /dev/null differ
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_blue.imageset/Contents.json b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_blue.imageset/Contents.json
new file mode 100644
index 0000000..94c0a11
--- /dev/null
+++ b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_blue.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "wallet_record_blue@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_blue.imageset/wallet_record_blue@2x.png b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_blue.imageset/wallet_record_blue@2x.png
new file mode 100644
index 0000000..2f06940
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_blue.imageset/wallet_record_blue@2x.png differ
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_gray.imageset/Contents.json b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_gray.imageset/Contents.json
new file mode 100644
index 0000000..3793557
--- /dev/null
+++ b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_gray.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "wallet_record_gray@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_gray.imageset/wallet_record_gray@2x.png b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_gray.imageset/wallet_record_gray@2x.png
new file mode 100644
index 0000000..d08dd7a
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_gray.imageset/wallet_record_gray@2x.png differ
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_green.imageset/Contents.json b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_green.imageset/Contents.json
new file mode 100644
index 0000000..4c1b1e4
--- /dev/null
+++ b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_green.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "wallet_record_green@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_green.imageset/wallet_record_green@2x.png b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_green.imageset/wallet_record_green@2x.png
new file mode 100644
index 0000000..2d8f1c7
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_green.imageset/wallet_record_green@2x.png differ
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_pink.imageset/Contents.json b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_pink.imageset/Contents.json
new file mode 100644
index 0000000..6769cbf
--- /dev/null
+++ b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_pink.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "wallet_record_pink@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_pink.imageset/wallet_record_pink@2x.png b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_pink.imageset/wallet_record_pink@2x.png
new file mode 100644
index 0000000..ecadc85
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/mine/钱包/wallet_record_pink.imageset/wallet_record_pink@2x.png differ
diff --git a/QXLive/Other/Assets.xcassets/update/Contents.json b/QXLive/Other/Assets.xcassets/update/Contents.json
new file mode 100644
index 0000000..73c0059
--- /dev/null
+++ b/QXLive/Other/Assets.xcassets/update/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/QXLive/Other/Assets.xcassets/update/app_update_top_bg.imageset/Contents.json b/QXLive/Other/Assets.xcassets/update/app_update_top_bg.imageset/Contents.json
new file mode 100644
index 0000000..696c7fc
--- /dev/null
+++ b/QXLive/Other/Assets.xcassets/update/app_update_top_bg.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "app_update_top_bg@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/QXLive/Other/Assets.xcassets/update/app_update_top_bg.imageset/app_update_top_bg@2x.png b/QXLive/Other/Assets.xcassets/update/app_update_top_bg.imageset/app_update_top_bg@2x.png
new file mode 100644
index 0000000..c00e774
Binary files /dev/null and b/QXLive/Other/Assets.xcassets/update/app_update_top_bg.imageset/app_update_top_bg@2x.png differ
diff --git a/QXLive/Tabbar/QXTabbarController.m b/QXLive/Tabbar/QXTabbarController.m
index 04f8204..63058d4 100644
--- a/QXLive/Tabbar/QXTabbarController.m
+++ b/QXLive/Tabbar/QXTabbarController.m
@@ -33,6 +33,7 @@
#import "QXChirldModeViewController.h"
#import "QXAppVersionView.h"
#import "QXLoginNetwork.h"
+#import "QXDrifRoomHourRankView.h"
@interface QXTabbarController ()
@property(nonatomic,strong) QXTabBar *customTabBar;
@@ -313,6 +314,9 @@
}else if([topic isEqualToString:qx_ac_topic]){
QXMeetActivityDriftModel *model = [QXMeetActivityDriftModel yy_modelWithJSON:message[@"msg"]];
[[QXMeetActivityDriftView shareView] addActivityModel:model];
+ }else if ([topic isEqualToString:qx_hour_ranking]){
+ NSArray *arr = [NSArray yy_modelArrayWithClass:[QXRoomHourDriftModel class] json:message[@"msg"]];
+ [[QXDrifRoomHourRankView shareView] addActivityModelList:arr];
}
}
diff --git a/QXLive/Tabbar/弹窗/QXAppVersionView.m b/QXLive/Tabbar/弹窗/QXAppVersionView.m
index e6ddcc0..22451b1 100644
--- a/QXLive/Tabbar/弹窗/QXAppVersionView.m
+++ b/QXLive/Tabbar/弹窗/QXAppVersionView.m
@@ -10,7 +10,9 @@
@interface QXAppVersionView()
@property (nonatomic,strong)UIView *bgView;
-@property (nonatomic,strong)UILabel *titleLabel;
+@property (nonatomic,strong)UIImageView *topImageView;
+@property (nonatomic,strong)UIView *bottomView;
+@property (nonatomic,strong)UIScrollView *scrollView;
@property (nonatomic,strong)UILabel *messageLabel;
@property (nonatomic,strong)UIButton *cancelBtn;
@property (nonatomic,strong)UIButton *commitBtn;
@@ -29,88 +31,64 @@
}
-(void)createViews{
self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.5];
- self.bgView = [[UIView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-ScaleWidth(275))/2.0, -self.height, ScaleWidth(275), ScaleWidth(400))];
- self.bgView.backgroundColor = [UIColor whiteColor];
+ self.bgView = [[UIView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-ScaleWidth(275))/2.0, -self.height, ScaleWidth(275), ScaleWidth(362))];
+// self.bgView.backgroundColor = [UIColor whiteColor];
[self.bgView addRoundedCornersWithRadius:16];
[self addSubview:self.bgView];
+ self.topImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"app_update_top_bg"]];
+ self.topImageView.frame = CGRectMake(0, 0, self.bgView.width, ScaleWidth(170));
+ [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.backgroundColor = RGB16(0xffffff);
+ [self.bottomView addRoundedCornersWithRadius:16 byRoundingCorners:(UIRectCornerBottomLeft|UIRectCornerBottomRight)];
+ [self.bgView addSubview:self.bottomView];
- self.titleLabel = [[UILabel alloc] init];
- self.titleLabel.font = [UIFont boldSystemFontOfSize:16];
- self.titleLabel.text = QXText(@"发现新版本");
- self.titleLabel.textColor = RGB16(0x333333);
- [self.bgView addSubview:self.titleLabel];
- [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.equalTo(self.bgView);
- make.top.equalTo(self.bgView).offset(16);
- make.height.mas_equalTo(24);
- }];
-
- self.commitBtn = [[UIButton alloc] init];
+ self.commitBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.bgView.width-ScaleWidth(110)-20, self.bottomView.height-42-12, ScaleWidth(110), 42)];
[self.commitBtn addRoundedCornersWithRadius:21];
self.commitBtn.backgroundColor = QXConfig.themeColor;
- [self.commitBtn setTitle:QXText(@"确认") forState:(UIControlStateNormal)];
+ [self.commitBtn setTitle:QXText(@"立即升级") forState:(UIControlStateNormal)];
[self.commitBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
self.commitBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[self.commitBtn addTarget:self action:@selector(commitAction) forControlEvents:(UIControlEventTouchUpInside)];
- [self.bgView addSubview:self.commitBtn];
- [self.commitBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.bottom.equalTo(self.bgView).offset(-12);
- make.height.mas_equalTo(42);
- make.width.mas_equalTo(ScaleWidth(110));
- make.right.mas_equalTo(-20);
- }];
+ [self.bottomView addSubview:self.commitBtn];
+
-
- self.cancelBtn = [[UIButton alloc] init];
+ self.cancelBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, self.bottomView.height-42-12, ScaleWidth(110), 42)];
[self.cancelBtn addRoundedCornersWithRadius:21];
self.cancelBtn.backgroundColor = RGB16(0xF3F3F3);
[self.cancelBtn setTitle:QXText(@"取消") forState:(UIControlStateNormal)];
[self.cancelBtn setTitleColor:RGB16(0x999999) forState:(UIControlStateNormal)];
self.cancelBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[self.cancelBtn addTarget:self action:@selector(cancelAction) forControlEvents:(UIControlEventTouchUpInside)];
- [self.bgView addSubview:self.cancelBtn];
- [self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.bottom.equalTo(self.bgView).offset(-12);
- make.height.mas_equalTo(42);
- make.width.mas_equalTo(ScaleWidth(110));
- make.left.mas_equalTo(20);
- }];
+ [self.bottomView addSubview:self.cancelBtn];
+
- self.messageLabel = [[UILabel alloc] init];
- self.messageLabel.font = [UIFont boldSystemFontOfSize:16];
+
+ self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(13, 0, self.bgView.width-26, self.commitBtn.top-13)];
+ [self.bottomView addSubview:self.scrollView];
+
+
+ self.messageLabel = [[UILabel alloc] initWithFrame:self.scrollView.bounds];
+ self.messageLabel.font = [UIFont boldSystemFontOfSize:14];
self.messageLabel.textColor = RGB16(0x000000);
self.messageLabel.textAlignment = NSTextAlignmentCenter;
self.messageLabel.numberOfLines = 0;
- [self.bgView addSubview:self.messageLabel];
- [self.messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(self.titleLabel.mas_bottom).offset(10);
- make.left.equalTo(self.bgView).offset(16);
- make.right.equalTo(self.bgView).offset(-16);
- make.bottom.equalTo(self.commitBtn.mas_top).offset(-10);
- }];
-
+ [self.scrollView addSubview:self.messageLabel];
}
-(void)setModel:(QXAppVersionModel *)model{
_model = model;
self.messageLabel.text = model.content;
+// self.messageLabel.text = @"动环监控撒谎大健康撒谎科技打撒好看到货时间阿克汉登记卡撒大花洒科技活动极客飒户djsakljdk电视剧啊快回家读书卡多撒u一还有第四u啊个ID撒个hi打撒低功耗设计啊开工大吉萨嘎合计打撒好多个健身卡刚回到家撒合计扩大活动时间卡号大健康撒谎登记卡到货时间啊客户端健身卡核打静待花开撒会尽快的撒回到家凯撒会尽快的撒回到家凯撒会尽快的撒大花洒客户端手机卡击凯撒籍卡打撒";
+ [self.messageLabel sizeToFit];
+ self.scrollView.contentSize = CGSizeMake(self.bgView.width-26, self.messageLabel.height);
if (model.is_force.intValue == 1) {
self.cancelBtn.hidden = YES;
- [self.commitBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
- make.bottom.equalTo(self.bgView).offset(-12);
- make.height.mas_equalTo(42);
- make.width.mas_equalTo(ScaleWidth(110));
- make.centerX.equalTo(self.bgView);
- }];
+ self.commitBtn.frame = CGRectMake((self.bgView.width-ScaleWidth(110))/2, self.bottomView.height-42-12, ScaleWidth(110), 42);
}else{
self.cancelBtn.hidden = NO;
- [self.commitBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
- make.bottom.equalTo(self.bgView).offset(-12);
- make.height.mas_equalTo(42);
- make.width.mas_equalTo(ScaleWidth(110));
- make.right.mas_equalTo(-20);
- }];
+ self.commitBtn.frame = CGRectMake(self.bgView.width-ScaleWidth(110)-20, self.bottomView.height-42-12, ScaleWidth(110), 42);
}
}
-(void)cancelAction{
@@ -125,7 +103,7 @@
-(void)showInView:(UIView *)view{
[view addSubview:self];
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
- self.bgView.y = (SCREEN_HEIGHT-ScaleWidth(300))/2.0;
+ self.bgView.y = (SCREEN_HEIGHT-ScaleWidth(362))/2.0;
} completion:^(BOOL finished) {
}];
diff --git a/QXLive/Tabbar/弹窗/QXDrifRoomHourRankView.h b/QXLive/Tabbar/弹窗/QXDrifRoomHourRankView.h
new file mode 100644
index 0000000..27d8954
--- /dev/null
+++ b/QXLive/Tabbar/弹窗/QXDrifRoomHourRankView.h
@@ -0,0 +1,38 @@
+//
+// QXDrifRoomHourRankView.h
+// QXLive
+//
+// Created by 启星 on 2025/9/29.
+//
+
+#import
+typedef NS_ENUM(NSInteger) {
+ /// 第一名
+ QXDrifRoomHourRankTypeFirst = 1,
+ /// 第二名
+ QXDrifRoomHourRankTypeSecond = 2,
+ /// 第三名
+ QXDrifRoomHourRankTypeThird = 3,
+}QXDrifRoomHourRankType;
+NS_ASSUME_NONNULL_BEGIN
+@class QXRoomHourDriftModel;
+@interface QXDrifRoomHourRankView : UIView
+@property (nonatomic,strong)UIImageView *bgImageView;
+@property (nonatomic,strong)UILabel *titleLabel;
+@property (nonatomic,strong)NSMutableArray *dataArray;
+@property (nonatomic,strong)QXRoomHourDriftModel *model;
+-(void)addActivityModel:(QXRoomHourDriftModel*)model;
+-(void)addActivityModelList:(NSArray*)list;
+-(void)drifPopIsClose:(BOOL)isClose;
++(instancetype)shareView;
+@end
+
+
+@interface QXRoomHourDriftModel : NSObject
+
+@property (nonatomic,strong)NSString *room_id;
+@property (nonatomic,strong)NSString *room_name;
+@property (nonatomic,strong)NSString *text;
+@property (nonatomic,assign)NSInteger rank_number;
+@end
+NS_ASSUME_NONNULL_END
diff --git a/QXLive/Tabbar/弹窗/QXDrifRoomHourRankView.m b/QXLive/Tabbar/弹窗/QXDrifRoomHourRankView.m
new file mode 100644
index 0000000..6a5b978
--- /dev/null
+++ b/QXLive/Tabbar/弹窗/QXDrifRoomHourRankView.m
@@ -0,0 +1,174 @@
+//
+// QXDrifRoomHourRankView.m
+// QXLive
+//
+// Created by 启星 on 2025/8/29.
+//
+
+#import "QXDrifRoomHourRankView.h"
+@interface QXDrifRoomHourRankView()
+@property (nonatomic,assign)BOOL isPlaying;
+@property (nonatomic,assign)BOOL isClose;
+@end
+
+@implementation QXDrifRoomHourRankView
+
+- (instancetype)init
+{
+ self = [super init];
+ if (self) {
+ self.frame = CGRectMake(SCREEN_WIDTH, ScaleWidth(200), SCREEN_WIDTH, ScaleWidth(90));
+ BOOL isClose = [[NSUserDefaults standardUserDefaults] boolForKey:kIsCloseDrifPop];
+ self.isClose = isClose;
+ [self initSubviews];
+ }
+ return self;
+}
++(instancetype)shareView{
+ static QXDrifRoomHourRankView *manager = nil;
+ static dispatch_once_t predicate;
+ dispatch_once(&predicate, ^{
+ manager = [[QXDrifRoomHourRankView alloc] init];
+ });
+ return manager;
+}
+
+-(void)initSubviews{
+ self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ac_meet_start_pop_bg"]];
+ self.bgImageView.contentMode = UIViewContentModeScaleToFill;
+ [self addSubview:self.bgImageView];
+ [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.width.mas_equalTo(SCREEN_WIDTH);
+ make.height.mas_equalTo(ScaleWidth(90));
+ make.centerX.equalTo(self);
+ make.top.equalTo(self);
+ }];
+
+ self.titleLabel = [[UILabel alloc] init];
+ self.titleLabel.font = [UIFont systemFontOfSize:12];
+ self.titleLabel.textColor = RGB16(0xFFFFFF);
+ [self addSubview:self.titleLabel];;
+ [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+ make.left.equalTo(self.bgImageView).offset(ScaleWidth(53));
+ make.centerY.equalTo(self.bgImageView);
+ }];
+ self.userInteractionEnabled = YES;
+ MJWeakSelf
+ [self addTapBlock:^(id _Nonnull obj) {
+ if ([weakSelf.model.room_id isExist]) {
+ [[QXGlobal shareGlobal] joinRoomWithRoomId:weakSelf.model.room_id isRejoin:NO navagationController:weakSelf.viewController.navigationController];
+ }
+ }];
+}
+-(void)addActivityModel:(QXRoomHourDriftModel *)model{
+ if (self.isClose) {
+ return;
+ }
+ [self.dataArray addObject:model];
+ [self giftAction];
+}
+-(void)addActivityModelList:(NSArray *)list{
+ if (self.isClose) {
+ return;
+ }
+ [self.dataArray addObjectsFromArray:list];
+ [self giftAction];
+}
+
+-(void)giftAction{
+ if (self.isPlaying) {
+ return;
+ }
+ MJWeakSelf
+ [QXDrifRoomHourRankView shareView].isPlaying = YES;
+ [QXDrifRoomHourRankView shareView].model = [QXDrifRoomHourRankView shareView].dataArray.firstObject;
+ [KEYWINDOW addSubview:[QXDrifRoomHourRankView shareView]];
+ [UIView animateWithDuration:1.5 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
+ [QXDrifRoomHourRankView shareView].x = 0;
+ } completion:^(BOOL finished) {
+ NSInteger dalayTime = 5;
+ if (weakSelf.model.rank_number == 1) {
+ dalayTime = 5;
+ }else if (weakSelf.model.rank_number == 2){
+ dalayTime = 4;
+ }else if (weakSelf.model.rank_number == 2){
+ dalayTime = 3;
+ }
+ [weakSelf performSelector:@selector(dissmissAnimate) afterDelay:dalayTime];
+ }];
+}
+-(void)dissmissAnimate{
+ [UIView animateWithDuration:2 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
+ [QXDrifRoomHourRankView shareView].x = -SCREEN_WIDTH;
+ } completion:^(BOOL finished) {
+ [QXDrifRoomHourRankView shareView].x = SCREEN_WIDTH;
+ [[QXDrifRoomHourRankView shareView] removeFromSuperview];
+ [[QXDrifRoomHourRankView shareView].dataArray removeFirstObject];
+ [QXDrifRoomHourRankView shareView].isPlaying = NO;
+ if ([QXDrifRoomHourRankView shareView].dataArray.count>0) {
+ [[QXDrifRoomHourRankView shareView] giftAction];
+ }
+ }];
+}
+
+-(void)setModel:(QXRoomHourDriftModel *)model{
+ _model = model;
+ NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:model.text];
+ switch (model.rank_number) {
+ case QXDrifRoomHourRankTypeFirst:{
+ self.bgImageView.image = [UIImage imageNamed:@"room_hour_rank_drif_first"];
+ if ([model.room_name isExist]) {
+ [attr yy_setColor:RGB16(0xFFFA63) range:[model.text rangeOfString:model.room_name]];
+ }
+ }
+ break;
+ case QXDrifRoomHourRankTypeSecond:{
+ self.bgImageView.image = [UIImage imageNamed:@"room_hour_rank_drif_second"];
+ if ([model.room_name isExist]) {
+ [attr yy_setColor:RGB16(0xFEFE20) range:[model.text rangeOfString:model.room_name]];
+ }
+ }
+ break;
+ case QXDrifRoomHourRankTypeThird:{
+ self.bgImageView.image = [UIImage imageNamed:@"room_hour_rank_drif_third"];
+ if ([model.room_name isExist]) {
+ [attr yy_setColor:RGB16(0x1FFFE5) range:[model.text rangeOfString:model.room_name]];
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ self.titleLabel.attributedText = attr;
+}
+-(void)drifPopIsClose:(BOOL)isClose{
+ _isClose = isClose;
+ self.hidden = self.isClose;
+ [[NSUserDefaults standardUserDefaults] setBool:isClose forKey:kIsCloseDrifPop];
+ [[NSUserDefaults standardUserDefaults] synchronize];
+ if (isClose) {
+ [QXDrifRoomHourRankView shareView].x = SCREEN_WIDTH;
+ [[QXDrifRoomHourRankView shareView] removeFromSuperview];
+ [[QXDrifRoomHourRankView shareView].dataArray removeAllObjects];
+ [QXDrifRoomHourRankView shareView].isPlaying = NO;
+ }
+}
+
+-(NSMutableArray *)dataArray{
+ if (!_dataArray) {
+ _dataArray = [NSMutableArray array];
+ }
+ return _dataArray;
+}
+
+
+@end
+
+
+
+
+@implementation QXRoomHourDriftModel
+
+
+
+@end