From aa356202e23277db2c833a01089d3276dd10f68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AF=E6=98=9F?= Date: Thu, 30 Oct 2025 00:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QXLive.xcodeproj/project.pbxproj | 4 +- QXLive/Base/QXAppStartViewController.m | 3 + QXLive/Base/QXGlobal.h | 2 +- QXLive/Base/QXGlobal.m | 2 +- .../Controller/QXDynamicViewController.m | 24 +- .../Controller/QXExpansionViewController.m | 14 +- QXLive/Dynamic(语圈)/View/QXDynamicListCell.m | 8 + .../View/QXExpansionAppStoreView.h | 1 + .../View/QXExpansionAppStoreView.m | 320 +++++++++++------- .../Controlller/QXHomeViewController.m | 11 +- .../Services/QXHomePageNetwork.h | 2 +- .../Services/QXHomePageNetwork.m | 5 +- .../HomePage(声播)/View/首页/QXHomeRoomCell.h | 1 + .../HomePage(声播)/View/首页/QXHomeRoomCell.m | 12 + .../View/首页/QXHomeRoomCell.xib | 17 +- .../Controlller/QXLoginViewController.m | 7 + QXLive/Manager/QXAgoraEngineEx.h | 2 +- QXLive/Manager/QXAgoraEngineEx.m | 16 +- QXLive/Manager/QXRoomMessageManager.h | 4 +- QXLive/Manager/QXRoomMessageManager.m | 35 +- .../Controller/QXChatViewController.m | 51 ++- .../Controller/QXMineViewController.m | 2 + QXLive/Mine(音域)/Model/QXRoomModel.h | 2 + QXLive/Mine(音域)/View/QXMineServiceCell.h | 9 + QXLive/Mine(音域)/View/QXMineServiceCell.m | 161 ++++++--- .../View/钱包/QXWalletHomeTopView.m | 1 + QXLive/Other/AppDelegate+Login.m | 8 + .../dynamic_copy_link.imageset/Contents.json | 4 +- .../Group 6931@2x.png | Bin 3204 -> 0 bytes .../Group 6931@3x.png | Bin 6176 -> 0 bytes .../dynamic_copy_link@2x.png | Bin 0 -> 3588 bytes .../dynamic_copy_link@3x.png | Bin 0 -> 6725 bytes .../dynamic_delete.imageset/Contents.json | 4 +- .../Frame 1321316080@2x.png | Bin 2756 -> 0 bytes .../Frame 1321316080@3x.png | Bin 5236 -> 0 bytes .../dynamic_delete@2x.png | Bin 0 -> 2989 bytes .../dynamic_delete@3x.png | Bin 0 -> 5443 bytes .../dynamic_report.imageset/Contents.json | 4 +- .../dynamic_report.imageset/Group 115@2x.png | Bin 2978 -> 0 bytes .../dynamic_report.imageset/Group 115@3x.png | Bin 6027 -> 0 bytes .../dynamic_report@2x.png | Bin 0 -> 3298 bytes .../dynamic_report@3x.png | Bin 0 -> 6375 bytes .../dynamic_user_black.imageset/Contents.json | 22 ++ .../dynamic_user_black@2x.png | Bin 0 -> 3911 bytes .../dynamic_user_black@3x.png | Bin 0 -> 7503 bytes .../dynamic/expansion/Contents.json | 6 + .../exbpansion_bg.imageset/Contents.json | 21 ++ .../exbpansion_bg@2x.png | Bin 0 -> 1755827 bytes .../Contents.json | 22 ++ .../exbpansion_bottom_bg@2x.png | Bin 0 -> 477327 bytes .../exbpansion_bottom_bg@3x.png | Bin 0 -> 996006 bytes .../Contents.json | 22 ++ .../exbpansion_bottom_leg@2x.png | Bin 0 -> 61283 bytes .../exbpansion_bottom_leg@3x.png | Bin 0 -> 133012 bytes .../Contents.json | 22 ++ .../exbpansion_center_bg@2x.png | Bin 0 -> 149255 bytes .../exbpansion_center_bg@3x.png | Bin 0 -> 305065 bytes .../Contents.json | 22 ++ .../exbpansion_center_icon_bg@2x.png | Bin 0 -> 17912 bytes .../exbpansion_center_icon_bg@3x.png | Bin 0 -> 37846 bytes .../exbpansion_moon.imageset/Contents.json | 22 ++ .../exbpansion_moon@2x.png | Bin 0 -> 11547 bytes .../exbpansion_moon@3x.png | Bin 0 -> 23623 bytes .../exbpansion_word.imageset/Contents.json | 22 ++ .../exbpansion_word@2x.png | Bin 0 -> 38530 bytes .../exbpansion_word@3x.png | Bin 0 -> 75224 bytes .../Other/zh-Hans.lproj/Localizable.strings | 2 +- .../Controller/QXRoomViewController.m | 69 +++- QXLive/Room(房间)/View/QXAppstoreHomeView.m | 11 +- QXLive/Room(房间)/View/QXRoomChatListView.h | 3 + .../View/每日任务/QXRoomDayTaskTagView.m | 2 +- .../View/用户信息/QXRoomUserInfoView.m | 6 +- .../View/麦位视图/QXRoomSeatContentView.m | 9 +- .../View/麦位视图/QXRoomSeatPKView.h | 4 +- .../View/麦位视图/QXRoomSeatPKView.m | 36 +- .../View/麦位视图/QXRoomSeatTypeAuctionView.h | 2 +- .../View/麦位视图/QXRoomSeatTypeAuctionView.m | 2 +- .../View/麦位视图/QXRoomSeatTypeFrientView.h | 4 +- .../View/麦位视图/QXRoomSeatTypeFrientView.m | 4 +- .../View/麦位视图/QXRoomSeatTypeNormalView.h | 4 +- .../View/麦位视图/QXRoomSeatTypeNormalView.m | 16 +- .../View/麦位视图/QXRoomSeatTypeSongView.h | 2 +- .../View/麦位视图/QXRoomSeatTypeSongView.m | 2 +- .../Room(房间)/View/麦位视图/QXRoomSeatView.h | 4 +- .../Room(房间)/View/麦位视图/QXRoomSeatView.m | 20 +- QXLive/Tabbar/弹窗/QXAlertView.m | 37 +- QXLive/Tabbar/弹窗/QXAppVersionView.m | 1 + QXLive/Tabbar/弹窗/QXChirldPopView.m | 1 + QXLive/Tabbar/弹窗/QXFirstRechargeView.m | 1 + QXLive/Tabbar/弹窗/QXNewPeoplePopView.m | 1 + QXLive/Tabbar/弹窗/QXNiceGiftPopView.m | 1 + QXLive/Tabbar/弹窗/QXRealNamePopView.m | 1 + QXLive/Tabbar/弹窗/QXShareView.m | 9 +- QXLive/活动/巡乐会/QXActivityTagView.m | 2 +- TUIKit/TUIChat/CommonModel/TUIChatConfig.h | 2 + TUIKit/TUIChat/UI_Classic/Input/TUIInputBar.m | 9 +- 96 files changed, 881 insertions(+), 303 deletions(-) delete mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_copy_link.imageset/Group 6931@2x.png delete mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_copy_link.imageset/Group 6931@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_copy_link.imageset/dynamic_copy_link@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_copy_link.imageset/dynamic_copy_link@3x.png delete mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_delete.imageset/Frame 1321316080@2x.png delete mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_delete.imageset/Frame 1321316080@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_delete.imageset/dynamic_delete@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_delete.imageset/dynamic_delete@3x.png delete mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_report.imageset/Group 115@2x.png delete mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_report.imageset/Group 115@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_report.imageset/dynamic_report@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_report.imageset/dynamic_report@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_user_black.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_user_black.imageset/dynamic_user_black@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/dynamic_user_black.imageset/dynamic_user_black@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bg.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bg.imageset/exbpansion_bg@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_bg.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_bg.imageset/exbpansion_bottom_bg@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_bg.imageset/exbpansion_bottom_bg@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_leg.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_leg.imageset/exbpansion_bottom_leg@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_bottom_leg.imageset/exbpansion_bottom_leg@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_bg.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_bg.imageset/exbpansion_center_bg@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_bg.imageset/exbpansion_center_bg@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_icon_bg.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_icon_bg.imageset/exbpansion_center_icon_bg@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_center_icon_bg.imageset/exbpansion_center_icon_bg@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_moon.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_moon.imageset/exbpansion_moon@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_moon.imageset/exbpansion_moon@3x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_word.imageset/Contents.json create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_word.imageset/exbpansion_word@2x.png create mode 100644 QXLive/Other/Assets.xcassets/dynamic/expansion/exbpansion_word.imageset/exbpansion_word@3x.png diff --git a/QXLive.xcodeproj/project.pbxproj b/QXLive.xcodeproj/project.pbxproj index bdf9c02..8cc4927 100644 --- a/QXLive.xcodeproj/project.pbxproj +++ b/QXLive.xcodeproj/project.pbxproj @@ -1207,7 +1207,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.0.0; + MARKETING_VERSION = 1.1.0; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -1271,7 +1271,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.0.0; + MARKETING_VERSION = 1.1.0; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/QXLive/Base/QXAppStartViewController.m b/QXLive/Base/QXAppStartViewController.m index f693073..67a93f6 100644 --- a/QXLive/Base/QXAppStartViewController.m +++ b/QXLive/Base/QXAppStartViewController.m @@ -7,6 +7,7 @@ #import "QXAppStartViewController.h" #import "AppDelegate.h" +#import "TUIChatConfig.h" @interface QXAppStartViewController () @property (nonatomic,strong)UIImageView *bgImaegView; @end @@ -77,6 +78,8 @@ QXConfig.shared.tabbarArray = @[tabbarIndex1,tabbarIndex2,tabbarIndex3,tabbarIndex4]; AppDelegate *delegate = (AppDelegate*)[UIApplication sharedApplication].delegate; [delegate changeRootViewControllerIsTabbar]; + BOOL api_version = [responseObject[@"api_version"] boolValue]; + TUIChatConfig.defaultConfig.isAppStore = api_version; NSLog(@"请求成功"); } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { NSLog(@"请求失败"); diff --git a/QXLive/Base/QXGlobal.h b/QXLive/Base/QXGlobal.h index 71d9193..f3546c8 100644 --- a/QXLive/Base/QXGlobal.h +++ b/QXLive/Base/QXGlobal.h @@ -23,7 +23,7 @@ typedef void (^showFinishBlock)(void); @property (nonatomic,readonly,assign)BOOL isLogin; @property (nonatomic,assign)BOOL isShowLoginVC; /// 房间id -@property (nonatomic,strong,readonly)NSString *roomId; +@property (nonatomic,strong)NSString *roomId; // 是否实名 @property (nonatomic,assign)BOOL isRealName; diff --git a/QXLive/Base/QXGlobal.m b/QXLive/Base/QXGlobal.m index 54b81a6..79cb752 100644 --- a/QXLive/Base/QXGlobal.m +++ b/QXLive/Base/QXGlobal.m @@ -25,7 +25,7 @@ @interface QXGlobal() @property (nonatomic,assign)BOOL isLogin; -@property (nonatomic,strong)NSString *roomId; + @property (nonatomic,assign)BOOL isClickJoinRoom; diff --git a/QXLive/Dynamic(语圈)/Controller/QXDynamicViewController.m b/QXLive/Dynamic(语圈)/Controller/QXDynamicViewController.m index 39b6873..3447654 100644 --- a/QXLive/Dynamic(语圈)/Controller/QXDynamicViewController.m +++ b/QXLive/Dynamic(语圈)/Controller/QXDynamicViewController.m @@ -37,15 +37,15 @@ // make.left.mas_equalTo(16); // make.top.mas_equalTo(kSafeAreaTop +10); // }]; - self.categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(14, kSafeAreaTop, 100, 44)]; + self.categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(14, kSafeAreaTop, 300, 44)]; self.categoryView.delegate = self; // self.categoryView.titles = @[QXText(@"发现"),QXText(@"扩列")]; - self.categoryView.titles = @[QXText(@"扩列"),QXText(@"发现")]; - self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"]; + self.categoryView.titles = @[QXText(@"新人/扩列"),QXText(@"发现")]; + self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"]; self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"]; - self.categoryView.cellWidth = 50; - self.categoryView.contentEdgeInsetLeft = 0; - self.categoryView.cellSpacing = 0; + self.categoryView.cellWidth = JXCategoryViewAutomaticDimension; + self.categoryView.contentEdgeInsetLeft = 10; + self.categoryView.cellSpacing = 25; // self.categoryView.titleLabelZoomScale = 1.1; self.categoryView.titleLabelZoomEnabled = YES; self.categoryView.titleFont = [UIFont boldSystemFontOfSize:16]; @@ -62,7 +62,7 @@ [self.view addSubview:self.categoryView]; [self.view addSubview:self.containerView]; self.categoryView.listContainer = self.containerView; - + [self categoryView:self.categoryView didSelectedItemAtIndex:0]; [self.view addSubview:self.publishBtn]; } @@ -90,6 +90,16 @@ } -(void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{ self.publishBtn.hidden = !(index==1); + [self updateBgImage:index==0?@"exbpansion_bg":@"app_bg"]; + if (index == 0) { + self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"]; + self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"]; + }else{ + self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"]; + self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"]; + } + + } #pragma mark - action -(void)pulishAction{ diff --git a/QXLive/Dynamic(语圈)/Controller/QXExpansionViewController.m b/QXLive/Dynamic(语圈)/Controller/QXExpansionViewController.m index 94c8a31..1d99ae1 100644 --- a/QXLive/Dynamic(语圈)/Controller/QXExpansionViewController.m +++ b/QXLive/Dynamic(语圈)/Controller/QXExpansionViewController.m @@ -35,12 +35,12 @@ self.bgImageHidden = YES; self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, 100, 24)]; self.titleLabel.font = [UIFont systemFontOfSize:16]; - self.titleLabel.textColor = QXConfig.textColor; + self.titleLabel.textColor = RGB16(0xffffff); self.titleLabel.text = QXText(@"扩列交友"); [self.view addSubview:self.titleLabel]; self.sortBtn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-75-13, 0, 75, 48)]; - [self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:QXConfig.textColor] forState:(UIControlStateNormal)]; + [self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:RGB16(0xffffff)] forState:(UIControlStateNormal)]; if ([QXGlobal shareGlobal].loginModel.sex.integerValue == 1) { [self.sortBtn setTitle:QXText(@"只看女生") forState:(UIControlStateNormal)]; self.type = @"2"; @@ -48,7 +48,7 @@ [self.sortBtn setTitle:QXText(@"只看男生") forState:(UIControlStateNormal)]; self.type = @"1"; } - [self.sortBtn setTitleColor:QXConfig.textColor forState:(UIControlStateNormal)]; + [self.sortBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)]; self.sortBtn.titleLabel.font = [UIFont systemFontOfSize:12]; [self.sortBtn qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyleRight) imageTitleSpace:3]; [self.sortBtn addTarget:self action:@selector(sortAction) forControlEvents:(UIControlEventTouchUpInside)]; @@ -81,11 +81,19 @@ } if (isAppStore) { self.appStoreView.hidden = NO; + [self.sortBtn setTitleColor:RGB16(0xFFEB9D) forState:(UIControlStateNormal)]; + [self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:RGB16(0xFFEB9D)] forState:(UIControlStateNormal)]; + self.sortBtn.top = ScaleWidth(71); self.tableView.hidden = YES; self.appStoreView.users = list; + self.titleLabel.hidden = YES; }else{ + [self.sortBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)]; + [self.sortBtn setImage:[[UIImage imageNamed:@"arrow_bottom"] imageByTintColor:RGB16(0xffffff)] forState:(UIControlStateNormal)]; + self.sortBtn.top = 0; self.tableView.hidden = NO; self.appStoreView.hidden = YES; + self.titleLabel.hidden = NO; } [weakSelf.dataArray addObjectsFromArray:list]; [weakSelf.tableView.mj_header endRefreshing]; diff --git a/QXLive/Dynamic(语圈)/View/QXDynamicListCell.m b/QXLive/Dynamic(语圈)/View/QXDynamicListCell.m index 0c6a656..5713048 100755 --- a/QXLive/Dynamic(语圈)/View/QXDynamicListCell.m +++ b/QXLive/Dynamic(语圈)/View/QXDynamicListCell.m @@ -18,6 +18,7 @@ #import "QXUserHomePageViewController.h" #import "QXDynamicLikeListView.h" #import "QXReportViewController.h" +#import "QXMineNetwork.h" @interface QXDynamicListCell () @@ -346,6 +347,13 @@ reportVC.reportType = @"3"; reportVC.fromId = self.model.id; [self.navigationController pushViewController:reportVC animated:YES]; + }else if ([model.name isEqualToString:QXText(@"拉黑")]) { + + [QXMineNetwork addOrRemoveBlackListIsAdd:YES userId:self.model.user_id successBlock:^(NSDictionary * _Nonnull dict) { + showToast(@"操作成功"); + } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { + showToast(msg); + }]; } } diff --git a/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.h b/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.h index 4e6a412..3ba0d96 100644 --- a/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.h +++ b/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.h @@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @interface QXExpansionAppStoreSubView : UIView @property(nonatomic,strong)UIImageView *headerImageView; +@property(nonatomic,strong)UIView *nameBgView; @property(nonatomic,strong)UILabel *nameLabel; @property(nonatomic,strong)UIImageView *sexImageView; @property(nonatomic,strong)QXUserHomeModel *model; diff --git a/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m b/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m index cc57bc9..d9a115a 100644 --- a/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m +++ b/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m @@ -8,8 +8,14 @@ #import "QXExpansionAppStoreView.h" #import "CKShimmerLabel.h" @interface QXExpansionAppStoreView() -@property (nonatomic,strong)CKShimmerLabel *titleLabel; +@property (nonatomic,strong)UIImageView *topCenterImageView; +@property (nonatomic,strong)UIImageView *moonImageView; +@property (nonatomic,strong)UIImageView *bottomImageView; +@property (nonatomic,strong)UIImageView *legImageView; + +@property (nonatomic,strong)UIView *centerBgView; @property (nonatomic,strong)UIImageView *bgImageView; + @property (nonatomic,strong)UIImageView *fengcheImageView; @property (nonatomic,strong)UIButton *changeBtn; @property (nonatomic,strong)NSMutableArray *randomArray; @@ -18,6 +24,10 @@ @property (nonatomic,strong)QXExpansionAppStoreSubView *userView2; @property (nonatomic,strong)QXExpansionAppStoreSubView *userView3; @property (nonatomic,strong)QXExpansionAppStoreSubView *userView4; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userView5; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userView6; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userView7; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userView8; @property (nonatomic,strong)NSMutableArray *userViews; @end @@ -44,54 +54,61 @@ } -(void)initSubviews{ + self.topCenterImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_word"]]; + self.topCenterImageView.frame = CGRectMake((SCREEN_WIDTH-ScaleWidth(275))/2, 17, ScaleWidth(275), ScaleWidth(40)); + self.topCenterImageView.contentMode = UIViewContentModeScaleToFill; + [self addSubview:self.topCenterImageView]; - self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"expansion_bg"]]; - self.bgImageView.frame = CGRectMake((self.width-375)/2, (self.height-375)/2-20, 375, 375); - [self addSubview:self.bgImageView]; + self.moonImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_moon"]]; + self.moonImageView.contentMode = UIViewContentModeScaleToFill; + self.moonImageView.frame = CGRectMake(self.topCenterImageView.right, 5, ScaleWidth(44), ScaleWidth(52)); + [self addSubview:self.moonImageView]; + + self.bottomImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_bottom_bg"]]; + self.bottomImageView.frame = CGRectMake(0, self.height-ScaleWidth(180), SCREEN_WIDTH, ScaleWidth(180)); + self.bottomImageView.contentMode = UIViewContentModeScaleToFill; + [self addSubview:self.bottomImageView]; + + self.legImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_bottom_leg"]]; + self.legImageView.contentMode = UIViewContentModeScaleToFill; + self.legImageView.frame = CGRectMake((SCREEN_WIDTH-ScaleWidth(175))/2, self.bottomImageView.top-ScaleWidth(240-56), ScaleWidth(175), ScaleWidth(240)); + [self insertSubview:self.legImageView belowSubview:self.bottomImageView]; + + + self.centerBgView = [[UIView alloc] initWithFrame:CGRectMake(0, self.legImageView.top-SCREEN_WIDTH/2, SCREEN_WIDTH, SCREEN_WIDTH)]; + [self addSubview:self.centerBgView]; + + self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"exbpansion_center_bg"]]; + self.bgImageView.frame = CGRectMake((SCREEN_WIDTH-ScaleWidth(300))/2, (SCREEN_WIDTH-ScaleWidth(300))/2,ScaleWidth(300), ScaleWidth(300)); + [self.centerBgView addSubview:self.bgImageView]; // [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { // make.height.width.mas_equalTo(375); // make.centerX.centerY.equalTo(self); // }]; - self.titleLabel = [[CKShimmerLabel alloc] init]; - self.titleLabel.shimmerWidth = 20; - self.titleLabel.shimmerRadius = 20; - self.titleLabel.shimmerColor = QXConfig.themeColor; - self.titleLabel.shimmerType = ST_LeftToRight; - self.titleLabel.repeat = YES; - self.titleLabel.textColor = RGB16(0x333333); - self.titleLabel.font = [UIFont fontWithName:@"YouSheBiaoTiHei" size:30]; - self.titleLabel.text = @"风车转转转,找寻新玩伴"; - self.titleLabel.top = 80; - [self.titleLabel.contentLabel sizeToFit]; - self.titleLabel.width = self.titleLabel.contentLabel.width; - self.titleLabel.centerX = self.centerX; - - [self.titleLabel startShimmer]; - [self addSubview:self.titleLabel]; + self.fengcheImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fengche"]]; self.fengcheImageView.hidden = YES; - self.fengcheImageView.frame = CGRectMake((self.width-70)/2, (self.height-70)/2-20, 70, 70); - [self.fengcheImageView addRoundedCornersWithRadius:35]; + self.fengcheImageView.frame = CGRectMake((self.centerBgView.width-ScaleWidth(60))/2, (self.centerBgView.top-ScaleWidth(60))/2, ScaleWidth(60), ScaleWidth(60)); + [self.fengcheImageView addRoundedCornersWithRadius:ScaleWidth(30)]; self.fengcheImageView.layer.borderWidth = 5; self.fengcheImageView.layer.borderColor = UIColor.whiteColor.CGColor; + self.fengcheImageView.centerX = self.centerBgView.centerX; + self.fengcheImageView.centerY = self.centerBgView.centerY; [self addSubview:self.fengcheImageView]; -// [self.fengcheImageView mas_makeConstraints:^(MASConstraintMaker *make) { -// make.centerY.centerX.equalTo(self.bgImageView); -// make.height.width.mas_offset(70); -// }]; + self.changeBtn = [[UIButton alloc] init]; self.changeBtn.frame = self.fengcheImageView.frame; self.changeBtn.backgroundColor = QXConfig.themeColor; - [self.changeBtn addRoundedCornersWithRadius:35]; - [self.changeBtn setTitle:@"换一批" forState:(UIControlStateNormal)]; + [self.changeBtn addRoundedCornersWithRadius:ScaleWidth(30)]; + [self.changeBtn setTitle:@"换" forState:(UIControlStateNormal)]; self.changeBtn.layer.borderWidth = 5; self.changeBtn.layer.borderColor = UIColor.whiteColor.CGColor; self.changeBtn.titleLabel.font = [UIFont systemFontOfSize:15]; - [self.changeBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)]; + [self.changeBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)]; [self.changeBtn addTarget:self action:@selector(changeAction:) forControlEvents:(UIControlEventTouchUpInside)]; [self addSubview:self.changeBtn]; // [self.changeBtn mas_makeConstraints:^(MASConstraintMaker *make) { @@ -99,45 +116,52 @@ // make.height.width.mas_offset(70); // }]; - self.userView1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.left+40, self.bgImageView.top+28, 100, 100)]; - [self addSubview:self.userView1]; -// [self.userView1 mas_makeConstraints:^(MASConstraintMaker *make) { -// make.left.equalTo(self.bgImageView).offset(40); -// make.top.equalTo(self.bgImageView).offset(32); -// make.width.mas_equalTo(100); -// make.height.mas_equalTo(100); -// }]; + self.userView1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView1]; + - self.userView2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.bgImageView.right-40-100, self.bgImageView.top+28, 100, 100)]; - [self addSubview:self.userView2]; -// [self.userView2 mas_makeConstraints:^(MASConstraintMaker *make) { -// make.right.equalTo(self.bgImageView).offset(-40); -// make.top.equalTo(self.bgImageView).offset(32); -// make.width.mas_equalTo(100); -// make.height.mas_equalTo(100); -// }]; + self.userView2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView2]; + + + self.userView3 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-ScaleWidth(66), (self.centerBgView.height-ScaleWidth(71))/2, ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView3]; + + self.userView4 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView2.left, self.userView3.bottom+ScaleWidth(32), ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView4]; + + self.userView5 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView1.left, self.centerBgView.height-ScaleWidth(71), ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView5]; + + + + self.userView7 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(ScaleWidth(10), self.userView3.top, ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView7]; + + self.userView8 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(ScaleWidth(48), self.userView2.top, ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView8]; + + self.userView6 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView8.left, self.userView4.top, ScaleWidth(56), ScaleWidth(71))]; + [self.centerBgView addSubview:self.userView6]; - self.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.userView2]; [self.userViews addObject:self.userView3]; [self.userViews addObject:self.userView4]; + [self.userViews addObject:self.userView5]; + [self.userViews addObject:self.userView6]; + [self.userViews addObject:self.userView7]; + [self.userViews addObject:self.userView8]; + self.userView1.alpha = 0; + self.userView2.alpha = 0; + self.userView3.alpha = 0; + self.userView4.alpha = 0; + + self.userView5.alpha = 0; + self.userView6.alpha = 0; + self.userView7.alpha = 0; + self.userView8.alpha = 0; MJWeakSelf [self.userView1 addTapBlock:^(id _Nonnull obj) { if (weakSelf.userBlock) { @@ -162,13 +186,63 @@ weakSelf.userBlock(weakSelf.userView4.model); } }]; + [self.userView5 addTapBlock:^(id _Nonnull obj) { + if (weakSelf.userBlock) { + weakSelf.userBlock(weakSelf.userView5.model); + } + }]; + + [self.userView6 addTapBlock:^(id _Nonnull obj) { + if (weakSelf.userBlock) { + weakSelf.userBlock(weakSelf.userView6.model); + } + }]; + + [self.userView7 addTapBlock:^(id _Nonnull obj) { + if (weakSelf.userBlock) { + weakSelf.userBlock(weakSelf.userView7.model); + } + }]; + + [self.userView8 addTapBlock:^(id _Nonnull obj) { + if (weakSelf.userBlock) { + weakSelf.userBlock(weakSelf.userView8.model); + } + }]; + [self startAnimate]; + [self.userView1 startSmoothFloatAnimation]; + [self.userView2 startSmoothFloatAnimation]; + [self.userView3 startSmoothFloatAnimation]; + [self.userView4 startSmoothFloatAnimation]; + [self.userView5 startSmoothFloatAnimation]; + [self.userView6 startSmoothFloatAnimation]; + [self.userView7 startSmoothFloatAnimation]; + [self.userView8 startSmoothFloatAnimation]; } +-(void)startAnimate{ + CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; + //旋转角度 + rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI]; + //每次旋转的时间(单位秒) + rotationAnimation.duration = 15; + rotationAnimation.cumulative = YES; + rotationAnimation.removedOnCompletion = NO; + //重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT + rotationAnimation.repeatCount = MAXFLOAT; + [self.centerBgView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; +} + + -(void)changeAction:(UIButton*)sender{ - [self.userView1 stopFloatAnimation]; - [self.userView2 stopFloatAnimation]; - [self.userView3 stopFloatAnimation]; - [self.userView4 stopFloatAnimation]; +// [self.userView1 stopFloatAnimation]; +// [self.userView2 stopFloatAnimation]; +// [self.userView3 stopFloatAnimation]; +// [self.userView4 stopFloatAnimation]; +// [self.userView5 stopFloatAnimation]; +// [self.userView6 stopFloatAnimation]; +// [self.userView7 stopFloatAnimation]; +// [self.userView8 stopFloatAnimation]; self.fengcheImageView.alpha = 0; self.fengcheImageView.hidden = NO; @@ -185,13 +259,24 @@ self.userView4.centerX = self.bgImageView.centerX; self.userView4.centerY = self.bgImageView.centerY; + self.userView5.centerX = self.bgImageView.centerX; + self.userView5.centerY = self.bgImageView.centerY; + self.userView6.centerX = self.bgImageView.centerX; + self.userView6.centerY = self.bgImageView.centerY; + self.userView7.centerX = self.bgImageView.centerX; + self.userView7.centerY = self.bgImageView.centerY; + self.userView8.centerX = self.bgImageView.centerX; + self.userView8.centerY = self.bgImageView.centerY; self.userView1.alpha = 0; self.userView2.alpha = 0; self.userView3.alpha = 0; self.userView4.alpha = 0; - + self.userView5.alpha = 0; + self.userView6.alpha = 0; + self.userView7.alpha = 0; + self.userView8.alpha = 0; } completion:^(BOOL finished) { self.changeBtn.hidden = YES; @@ -218,24 +303,32 @@ self.changeBtn.alpha = 0; self.changeBtn.hidden = NO; self.fengcheImageView.hidden = YES; - [self configData]; + dispatch_async(dispatch_get_main_queue(), ^{ + [self configData]; + }); + [UIView animateWithDuration:0.3 animations:^{ self.changeBtn.alpha = 1; - self.userView1.frame = CGRectMake(self.bgImageView.left+40, self.bgImageView.top+28, 100, 100); - self.userView2.frame = CGRectMake(self.bgImageView.right-40-100, self.bgImageView.top+28, 100, 100); - self.userView3.frame = CGRectMake(self.bgImageView.left+40, self.bgImageView.bottom-55-100, 100, 100); - self.userView4.frame = CGRectMake(self.bgImageView.right-40-100, self.bgImageView.bottom-55-100, 100, 100); + + self.userView1.frame = CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71)); + self.userView2.frame = CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71)); + self.userView3.frame = CGRectMake(SCREEN_WIDTH-ScaleWidth(66), (self.centerBgView.height-ScaleWidth(71))/2, ScaleWidth(56), ScaleWidth(71)); + self.userView4.frame = CGRectMake(self.userView2.left, self.userView3.bottom+ScaleWidth(32), ScaleWidth(56), ScaleWidth(71)); + self.userView5.frame = CGRectMake(self.userView1.left, self.centerBgView.height-ScaleWidth(71), ScaleWidth(56), ScaleWidth(71)); + self.userView7.frame = CGRectMake(ScaleWidth(10), self.userView3.top, ScaleWidth(56), ScaleWidth(71)); + self.userView8.frame = CGRectMake(ScaleWidth(48), self.userView2.top, ScaleWidth(56), ScaleWidth(71)); + self.userView6.frame = CGRectMake(self.userView8.left, self.userView4.top, ScaleWidth(56), ScaleWidth(71)); self.userView1.alpha = 1; self.userView2.alpha = 1; self.userView3.alpha = 1; self.userView4.alpha = 1; - + self.userView5.alpha = 1; + self.userView6.alpha = 1; + self.userView7.alpha = 1; + self.userView8.alpha = 1; } completion:^(BOOL finished) { - [self.userView1 startSmoothFloatAnimation]; - [self.userView2 startSmoothFloatAnimation]; - [self.userView3 startSmoothFloatAnimation]; - [self.userView4 startSmoothFloatAnimation]; + }]; } -(void)setUsers:(NSArray *)users{ @@ -245,7 +338,7 @@ -(void)configData{ [self.randomArray removeAllObjects]; - if (_users.count <= 4) { + if (_users.count <= 8) { [self.randomArray addObjectsFromArray:self.users]; }else{ NSArray *rArr = [self optimizedRandomFourNumbers]; @@ -267,8 +360,8 @@ [allNumbers addObject:@(i)]; } - NSMutableArray *result = [NSMutableArray arrayWithCapacity:4]; - for (int i = 0; i < 4; i++) { + NSMutableArray *result = [NSMutableArray arrayWithCapacity:8]; + for (int i = 0; i < 8; i++) { int remainingCount = (int)allNumbers.count; int randomIndex = arc4random_uniform(remainingCount); [result addObject:allNumbers[randomIndex]]; @@ -309,27 +402,39 @@ self.nameLabel.text = model.nickname; UIImage *sexImage = [UIImage imageNamed:model.sex.intValue==1?@"user_sex_boy":@"user_sex_girl"]; self.sexImageView.image = sexImage; + self.nameBgView.hidden = NO; } -(void)initSubviews{ self.headerImageView = [[UIImageView alloc] init]; self.headerImageView.contentMode = UIViewContentModeScaleAspectFill; - [self.headerImageView addRoundedCornersWithRadius:35]; -// self.headerImageView.backgroundColor = [UIColor brownColor];; + [self.headerImageView addRoundedCornersWithRadius:self.width/2]; [self addSubview:self.headerImageView]; [self.headerImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerY.centerX.equalTo(self); - make.height.width.mas_offset(70); + make.centerX.equalTo(self); + make.top.equalTo(self); + make.height.width.mas_offset(self.width); }]; + self.nameLabel = [[UILabel alloc] init]; - self.nameLabel.textColor = RGB16(0x333333); - self.nameLabel.font = [UIFont systemFontOfSize:14]; -// self.nameLabel.text = @"张三"; + self.nameLabel.textColor = RGB16(0xe5e5e5); + self.nameLabel.font = [UIFont systemFontOfSize:9]; [self addSubview:self.nameLabel]; [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.equalTo(self.headerImageView.mas_bottom).offset(8); + make.top.equalTo(self.headerImageView.mas_bottom).offset(2); make.centerX.equalTo(self); - make.height.mas_equalTo(20); + make.height.mas_equalTo(ScaleWidth(15)); + }]; + + self.nameBgView = [[UIView alloc] init]; + self.nameBgView.hidden = YES; + self.nameBgView.backgroundColor = RGB16A(0x000000, 0.58); + [self.nameBgView addRoundedCornersWithRadius:ScaleWidth(15)/2]; + [self insertSubview:self.nameBgView belowSubview:self.nameLabel]; + [self.nameBgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.bottom.equalTo(self.nameLabel); + make.left.mas_equalTo(-8); + make.right.mas_equalTo(8); }]; self.sexImageView = [[UIImageView alloc] init]; @@ -340,37 +445,20 @@ }]; } - (void)startSmoothFloatAnimation { - [self animateFloatUp]; +// [self animateFloatUp]; + CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; + //旋转角度 + rotationAnimation.toValue = [NSNumber numberWithFloat: -M_PI]; + //每次旋转的时间(单位秒) + rotationAnimation.duration = 15; + rotationAnimation.cumulative = YES; + rotationAnimation.removedOnCompletion = NO; + //重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT + rotationAnimation.repeatCount = MAXFLOAT; + [self.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; } -- (void)animateFloatUp { - CGFloat floatDistance = 10.0f; - CGFloat duration = 2.0f; - - [UIView animateWithDuration:duration - delay:0 - options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction - animations:^{ - self.transform = CGAffineTransformMakeTranslation(0, -floatDistance); - } - completion:^(BOOL finished) { - [self animateFloatDown]; - }]; -} -- (void)animateFloatDown { - CGFloat duration = 2.0f; - - [UIView animateWithDuration:duration - delay:0 - options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction - animations:^{ - self.transform = CGAffineTransformIdentity; - } - completion:^(BOOL finished) { - [self animateFloatUp]; - }]; -} - (void)stopFloatAnimation { [self.layer removeAllAnimations]; diff --git a/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m b/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m index 8f5b463..2314e30 100644 --- a/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m +++ b/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m @@ -71,6 +71,7 @@ -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:YES animated:YES]; + [self getRechargePermission]; } - (void)initSubViews{ @@ -140,7 +141,7 @@ // make.width.height.mas_equalTo(ScaleWidth(57)); // }]; [self getBanner]; - [self getRechargePermission]; +// [self getRechargePermission]; self.appStoreView.hidden = YES; [self.view addSubview:self.appStoreView]; @@ -193,7 +194,7 @@ -(void)getRechargePermission{ // sky_drop_gift_icon ,new_people_recharge_icon ,first_recharge_icon @weakify(self) - [QXHomePageNetwork getRechargePermissionSuccessBlock:^(QXRechargePermissionModel * _Nonnull model) { + [QXHomePageNetwork getRechargePermissionSuccessBlock:^(QXRechargePermissionModel * _Nonnull model, BOOL isAppStore) { @strongify(self) self.permissionModel = model; [self.rechargePermissionArray removeAllObjects]; @@ -222,7 +223,11 @@ if (imgs.count==0) { return; } - self.rechargePermissionView.hidden = NO; + if (isAppStore) { + self.rechargePermissionView.hidden = YES; + }else{ + self.rechargePermissionView.hidden = NO; + } self.rechargePermissionView.imageURLStringsGroup = imgs; } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { diff --git a/QXLive/HomePage(声播)/Services/QXHomePageNetwork.h b/QXLive/HomePage(声播)/Services/QXHomePageNetwork.h index a26218a..0ef97c0 100644 --- a/QXLive/HomePage(声播)/Services/QXHomePageNetwork.h +++ b/QXLive/HomePage(声播)/Services/QXHomePageNetwork.h @@ -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; /** 天降好礼 diff --git a/QXLive/HomePage(声播)/Services/QXHomePageNetwork.m b/QXLive/HomePage(声播)/Services/QXHomePageNetwork.m index 27ec4e1..082514f 100644 --- a/QXLive/HomePage(声播)/Services/QXHomePageNetwork.m +++ b/QXLive/HomePage(声播)/Services/QXHomePageNetwork.m @@ -131,11 +131,12 @@ failBlock(error,msg); }]; } -+(void)getRechargePermissionSuccessBlock:(void (^)(QXRechargePermissionModel * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{ ++(void)getRechargePermissionSuccessBlock:(void (^)(QXRechargePermissionModel * _Nonnull, BOOL))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{ [[QXRequset shareInstance] getWithUrl:QXAppRechargePermission parameters:@{} needCache:NO success:^(id responseObject) { if (successBlock) { + BOOL api_version = [responseObject[@"api_version"] boolValue]; QXRechargePermissionModel *model = [QXRechargePermissionModel yy_modelWithJSON:responseObject[@"data"]]; - successBlock(model); + successBlock(model,api_version); } } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { failBlock(error,msg); diff --git a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.h b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.h index 0cb549e..59cf099 100644 --- a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.h +++ b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.h @@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN @property (weak, nonatomic) IBOutlet UIView *displayMaskView; @property (weak, nonatomic) IBOutlet UILabel *IDLabel; @property (weak, nonatomic) IBOutlet MarqueeLabel *nameLabel; +@property (weak, nonatomic) IBOutlet MarqueeLabel *appStoreNameLabel; @property (weak, nonatomic) IBOutlet UILabel *countLabel; @property (weak, nonatomic) IBOutlet UIImageView *roomTypeView; @property (weak, nonatomic) IBOutlet UIImageView *animateImageView; diff --git a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m index a16eda9..5c8841c 100644 --- a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m +++ b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.m @@ -15,6 +15,7 @@ [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover]]; self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_number]; self.nameLabel.text = [NSString stringWithFormat:@"%@",model.room_name]; + self.appStoreNameLabel.text = [NSString stringWithFormat:@"%@",model.room_name]; self.countLabel.text = [NSString qx_showHotCountNum:model.hot_value.longLongValue]; // if ([model.label_id isEqualToString:@"23"]) { // self.roomTypeView.image = [UIImage imageNamed:@"Group 7153"]; @@ -53,6 +54,17 @@ self.countLabel.text = [NSString qx_showHotCountNum:searchModel.hot_value.longLongValue]; [self.roomTypeView sd_setImageWithURL:[NSURL URLWithString:searchModel.label_icon]]; } +-(void)setIsAppStore:(BOOL)isAppStore{ + _isAppStore = isAppStore; + if (isAppStore) { + self.appStoreNameLabel.hidden = NO; + self.nameLabel.hidden = YES; + }else{ + self.appStoreNameLabel.hidden = YES; + self.nameLabel.hidden = NO; + } + +} //-(void)setHotRoomModel:(SRHomeChatRoomListModel *)hotRoomModel{ // _hotRoomModel = hotRoomModel; // [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:hotRoomModel.cover_picture]]; diff --git a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib index 8d0dec2..2296453 100644 --- a/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib +++ b/QXLive/HomePage(声播)/View/首页/QXHomeRoomCell.xib @@ -109,6 +109,17 @@ +