7 Commits
master ... dev

Author SHA1 Message Date
启星
57975eafc1 修改提交 2025-12-04 23:35:49 +08:00
启星
1c5a908dda 提交 2025-12-04 14:11:00 +08:00
启星
2d37ab6844 房间完成 2025-12-01 18:42:49 +08:00
启星
7eb4f8d3b8 提交 2025-11-28 22:43:06 +08:00
启星
8913ea6f48 提交 2025-11-21 16:17:05 +08:00
启星
7ac937ddbf 爵位完成 2025-11-11 17:19:21 +08:00
启星
406c481ba4 我的 2025-11-06 13:04:04 +08:00
670 changed files with 21700 additions and 1747 deletions

View File

@@ -787,7 +787,7 @@
"$(inherited)", "$(inherited)",
"$(SDKROOT)/usr/lib/swift", "$(SDKROOT)/usr/lib/swift",
); );
MARKETING_VERSION = 1.1.2; MARKETING_VERSION = 1.1.3;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@@ -853,7 +853,7 @@
"$(inherited)", "$(inherited)",
"$(SDKROOT)/usr/lib/swift", "$(SDKROOT)/usr/lib/swift",
); );
MARKETING_VERSION = 1.1.2; MARKETING_VERSION = 1.1.3;
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -13,6 +13,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSMutableArray *dataArray; @property (nonatomic,strong)NSMutableArray *dataArray;
@property (nonatomic,assign)NSInteger page; @property (nonatomic,assign)NSInteger page;
@property (nonatomic,assign)BOOL bgImageHidden; @property (nonatomic,assign)BOOL bgImageHidden;
/// 是否不参与换肤
@property (nonatomic,assign)BOOL isNoChangeBgImage;
@property (nonatomic,strong)UIColor *navigationTintColor;
//交给子类来实现 //交给子类来实现
-(void)setNavgationItems; -(void)setNavgationItems;
-(void)initSubViews; -(void)initSubViews;
@@ -21,6 +24,8 @@ NS_ASSUME_NONNULL_BEGIN
imageurl :图片名称或链接 imageurl :图片名称或链接
*/ */
-(void)updateBgImage:(NSString*)imageUrl; -(void)updateBgImage:(NSString*)imageUrl;
-(void)updateBackImage:(UIImage *)image;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -19,9 +19,13 @@
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[self.view insertSubview:self.bgImageView atIndex:0]; [self.view insertSubview:self.bgImageView atIndex:0];
[self updateBgImage:QXConfig.backgroundImage]; if (self.isNoChangeBgImage) {
[self initSubViews]; ///
}else{
[self updateBgImage:QXConfig.backgroundImage];
}
[self setNavgationItems]; [self setNavgationItems];
[self initSubViews];
[self getData]; [self getData];
self.page = 1; self.page = 1;
} }
@@ -41,6 +45,11 @@
- (void)getData{ - (void)getData{
} }
-(void)setNavigationTintColor:(UIColor *)navigationTintColor{
_navigationTintColor = navigationTintColor;
[self.backBtn setImage:[[UIImage imageNamed:@"back"] imageByTintColor:navigationTintColor] forState:(UIControlStateNormal)];
}
-(void)setNavgationItems{ -(void)setNavgationItems{
UIButton*backBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)]; UIButton*backBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[backBtn setImage:[UIImage imageNamed:@"back"] forState:(UIControlStateNormal)]; [backBtn setImage:[UIImage imageNamed:@"back"] forState:(UIControlStateNormal)];
@@ -73,6 +82,10 @@
self.bgImageView.image = [UIImage imageNamed:imageUrl]; self.bgImageView.image = [UIImage imageNamed:imageUrl];
} }
} }
-(void)updateBackImage:(UIImage *)image{
[self.backBtn setImage:image forState:(UIControlStateNormal)];
}
-(UIImageView *)bgImageView{ -(UIImageView *)bgImageView{
if (!_bgImageView) { if (!_bgImageView) {
_bgImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; _bgImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];

16
QXLive/Base/QXButton.h Normal file
View File

@@ -0,0 +1,16 @@
//
// QXButton.h
// QXLive
//
// Created by 启星 on 2025/11/20.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXButton : UIButton
@property (nonatomic,strong)id object;
@end
NS_ASSUME_NONNULL_END

20
QXLive/Base/QXButton.m Normal file
View File

@@ -0,0 +1,20 @@
//
// QXButton.m
// QXLive
//
// Created by on 2025/11/20.
//
#import "QXButton.h"
@implementation QXButton
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end

View File

@@ -85,13 +85,21 @@ typedef void (^showFinishBlock)(void);
avatar:(NSString*)avatar avatar:(NSString*)avatar
navagationController:(UINavigationController*)navagationController; navagationController:(UINavigationController*)navagationController;
/** /**
去群聊 公会群聊
*/ */
-(void)chatWithGroupId:(NSString*)groupId -(void)chatWithGroupId:(NSString*)groupId
cover:(NSString*)cover cover:(NSString*)cover
name:(NSString*)name name:(NSString*)name
navagationController:(UINavigationController*)navagationController; navagationController:(UINavigationController*)navagationController;
/**
去家族群聊
*/
-(void)chatWithFamilyGroupId:(NSString*)groupId
cover:(NSString*)cover
name:(NSString*)name
navagationController:(UINavigationController*)navagationController;
/** /**
加入房间 加入房间
*/ */
@@ -103,11 +111,15 @@ typedef void (^showFinishBlock)(void);
/** /**
退出房间 退出房间
*/ */
-(void)quitRoomWithRoomId:(NSString*)roomId; -(void)quitRoomWithRoomId:(NSString*)roomId removeListener:(BOOL)removeListener;
/// 去完成任务 /// 去完成任务
-(void)finishTask; -(void)finishTask;
-(void)vibrationFeedback; -(void)vibrationFeedback;
/// 进入房间后开始保活
-(void)startKeepAlive;
-(void)dirfViewDidToBackground;
-(void)dirfViewBecomeToFront;
@end @end

View File

@@ -23,6 +23,12 @@
#import "QXRedPacketManager.h" #import "QXRedPacketManager.h"
#import "QXGiftDisplayManager.h" #import "QXGiftDisplayManager.h"
#import "QXDrifNobilityJoinRoomView.h"
#import "QXDrifRoomHourRankView.h"
#import "QXGiftDriftView.h"
#import "QXMeetActivityDriftView.h"
#import "QXRedPacketDriftView.h"
@interface QXGlobal() @interface QXGlobal()
@property (nonatomic,assign)BOOL isLogin; @property (nonatomic,assign)BOOL isLogin;
@@ -30,6 +36,8 @@
@property (nonatomic,assign)BOOL isClickJoinRoom; @property (nonatomic,assign)BOOL isClickJoinRoom;
@property (nonatomic,strong)QXTimer *timer; @property (nonatomic,strong)QXTimer *timer;
@property (nonatomic,strong)NSTimer *keepTimer;
@property (nonatomic,assign)NSInteger taskTime; @property (nonatomic,assign)NSInteger taskTime;
@end @end
@implementation QXGlobal @implementation QXGlobal
@@ -192,6 +200,20 @@
[navagationController pushViewController:vc animated:YES]; [navagationController pushViewController:vc animated:YES];
} }
-(void)chatWithFamilyGroupId:(NSString *)groupId cover:(NSString *)cover name:(NSString *)name navagationController:(UINavigationController *)navagationController{
QXChatViewController *vc = [[QXChatViewController alloc] init];
TUIChatConversationModel *data = [[TUIChatConversationModel alloc] init];
if ([groupId containsString:@"f"]) {
data.groupID = groupId;
}else{
data.groupID = [NSString stringWithFormat:@"f%@",groupId];
}
data.faceUrl = cover;
data.title = name;
vc.data = data;
[navagationController pushViewController:vc animated:YES];
}
-(void)joinRoomWithRoomId:(NSString *)roomId isRejoin:(BOOL)isRejoin navagationController:(UINavigationController *)navagationController{ -(void)joinRoomWithRoomId:(NSString *)roomId isRejoin:(BOOL)isRejoin navagationController:(UINavigationController *)navagationController{
if (!QXGlobal.shareGlobal.isLogin) { if (!QXGlobal.shareGlobal.isLogin) {
[[QXGlobal shareGlobal] logOut]; [[QXGlobal shareGlobal] logOut];
@@ -220,6 +242,9 @@
} }
if ([roomId isEqualToString:self.roomId]) { if ([roomId isEqualToString:self.roomId]) {
if ([navagationController.viewControllers containsObject:self.roomVC]) { if ([navagationController.viewControllers containsObject:self.roomVC]) {
if (![navagationController.visibleViewController isEqual:self.roomVC]) {
[navagationController popToViewController:self.roomVC animated:YES];
}
return; return;
}else{ }else{
[UIApplication sharedApplication].idleTimerDisabled = YES; [UIApplication sharedApplication].idleTimerDisabled = YES;
@@ -229,9 +254,7 @@
} }
return; return;
} }
if (self.roomId && ![self.roomId isEqualToString:roomId]) {
[self quitRoomWithRoomId:self.roomId];
}
[UIApplication sharedApplication].idleTimerDisabled = YES; [UIApplication sharedApplication].idleTimerDisabled = YES;
MJWeakSelf MJWeakSelf
if (isRejoin) { if (isRejoin) {
@@ -256,6 +279,8 @@
weakSelf.roomVC.hidesBottomBarWhenPushed = YES; weakSelf.roomVC.hidesBottomBarWhenPushed = YES;
[navagationController pushViewController:weakSelf.roomVC animated:YES]; [navagationController pushViewController:weakSelf.roomVC animated:YES];
weakSelf.roomId = roomId; weakSelf.roomId = roomId;
} roomErrorBlock:^(NSString * _Nonnull roomId, NSString * _Nonnull msg) {
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg); showToast(msg);
weakSelf.isClickJoinRoom = NO; weakSelf.isClickJoinRoom = NO;
@@ -273,6 +298,9 @@
weakSelf.isClickJoinRoom = YES; weakSelf.isClickJoinRoom = YES;
[[QXRoomMessageManager shared] joinGroupWithRoomId:roomId]; [[QXRoomMessageManager shared] joinGroupWithRoomId:roomId];
[QXMineNetwork joinRoomWithRoomId:roomId successBlock:^(QXRoomModel * _Nonnull roomModel) { [QXMineNetwork joinRoomWithRoomId:roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
if (weakSelf.roomId && ![weakSelf.roomId isEqualToString:roomId]) {
[weakSelf quitRoomWithRoomId:weakSelf.roomId removeListener:NO];
}
// hideLoadingInView(KEYWINDOW) // hideLoadingInView(KEYWINDOW)
// roomModel.room_info.pk_room_id = @"33"; // roomModel.room_info.pk_room_id = @"33";
[UIApplication sharedApplication].idleTimerDisabled = YES; [UIApplication sharedApplication].idleTimerDisabled = YES;
@@ -285,6 +313,9 @@
weakSelf.roomVC.hidesBottomBarWhenPushed = YES; weakSelf.roomVC.hidesBottomBarWhenPushed = YES;
[navagationController pushViewController:weakSelf.roomVC animated:YES]; [navagationController pushViewController:weakSelf.roomVC animated:YES];
weakSelf.roomId = roomId; weakSelf.roomId = roomId;
} roomErrorBlock:^(NSString * _Nonnull roomId, NSString * _Nonnull msg) {
weakSelf.isClickJoinRoom = NO;
[weakSelf showAlertWithMessage:msg roomId:roomId];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
weakSelf.isClickJoinRoom = NO; weakSelf.isClickJoinRoom = NO;
showToast(msg); showToast(msg);
@@ -294,6 +325,46 @@
} }
} }
-(void)startKeepAlive{
[self stopKeepTimer];
self.keepTimer = [NSTimer scheduledTimerWithTimeInterval:60
target:self
selector:@selector(checkAndUpdateRedPackets)
userInfo:nil
repeats:YES];
}
-(void)checkAndUpdateRedPackets{
if ([self.roomId isExist]) {
[QXMineNetwork appKeepAliveWithRoomId:self.roomId];
}
}
-(void)stopKeepTimer{
if (self.keepTimer) {
[self.keepTimer invalidate];
self.keepTimer = nil;
}
}
-(void)showAlertWithMessage:(NSString*)message roomId:(NSString*)roomId{
UIAlertController *al = [UIAlertController alertControllerWithTitle:@"温馨提示" message:message preferredStyle:(UIAlertControllerStyleAlert)];
if ([roomId isExist] && self.roomId==nil) {
[al addAction:[UIAlertAction actionWithTitle:@"再想想" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
}]];
[al addAction:[UIAlertAction actionWithTitle:@"去房间" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
[self joinRoomWithRoomId:roomId isRejoin:NO navagationController:KEYWINDOW.rootViewController.navigationController];
}]];
}else{
[al addAction:[UIAlertAction actionWithTitle:@"我知道了" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
}]];
}
[KEYWINDOW.rootViewController presentViewController:al animated:YES completion:nil];
}
-(void)popToRoomViewController{ -(void)popToRoomViewController{
QXRoomNavigationController *navagationController = (QXRoomNavigationController*)KEYWINDOW.rootViewController; QXRoomNavigationController *navagationController = (QXRoomNavigationController*)KEYWINDOW.rootViewController;
for (UIViewController *vc in navagationController.viewControllers) { for (UIViewController *vc in navagationController.viewControllers) {
@@ -303,12 +374,15 @@
} }
} }
} }
-(void)quitRoomWithRoomId:(NSString *)roomId{ -(void)quitRoomWithRoomId:(NSString *)roomId removeListener:(BOOL)removeListener{
[self stopKeepTimer];
[UIApplication sharedApplication].idleTimerDisabled = NO; [UIApplication sharedApplication].idleTimerDisabled = NO;
/// ///
[[QXRedPacketManager sharedManager] destoryRedpacketInfo]; [[QXRedPacketManager sharedManager] destoryRedpacketInfo];
/// ///
[[QXGiftDisplayManager sharedManager] clearAll]; [[QXGiftDisplayManager sharedManager] clearAll];
///
[[QXDrifNobilityJoinRoomView shareView] dirfViewDidToBackground];
/// ///
[[QXGiftPlayerManager shareManager] destroyEffectSvga]; [[QXGiftPlayerManager shareManager] destroyEffectSvga];
/// 退 /// 退
@@ -318,7 +392,7 @@
/// ///
[[QXAgoraEngine sharedEngine] destroyEngine]; [[QXAgoraEngine sharedEngine] destroyEngine];
/// 退 /// 退
[[QXRoomMessageManager shared] quitGroupWithRoomId:roomId]; [[QXRoomMessageManager shared] quitGroupWithRoomId:roomId removeListener:removeListener];
[[QXGlobal shareGlobal].offLineDict removeAllObjects]; [[QXGlobal shareGlobal].offLineDict removeAllObjects];
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
if (_roomVC) { if (_roomVC) {
@@ -364,4 +438,15 @@
} }
return _offLineDict; return _offLineDict;
} }
-(void)dirfViewDidToBackground{
[[QXDrifNobilityJoinRoomView shareView] dirfViewDidToBackground];
[[QXDrifRoomHourRankView shareView] dirfViewDidToBackground];
[[QXGiftDriftView shareView] dirfViewDidToBackground];
[[QXMeetActivityDriftView shareView] dirfViewDidToBackground];
[[QXRedPacketDriftView shareView] dirfViewDidToBackground];
}
-(void)dirfViewBecomeToFront{
[[QXDrifNobilityJoinRoomView shareView] dirfViewBecomeToFront];
}
@end @end

View File

@@ -145,6 +145,15 @@
cell.model = model; cell.model = model;
return cell; return cell;
} }
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
QXExpansionCell *eCell = (QXExpansionCell *)cell;
[eCell nameStartAnimate];
}
-(void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
QXExpansionCell *eCell = (QXExpansionCell *)cell;
[eCell nameStopAnimate];
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
QXUserHomeModel *model = self.dataArray[indexPath.row]; QXUserHomeModel *model = self.dataArray[indexPath.row];
NSArray *imgArr; NSArray *imgArr;
@@ -154,12 +163,12 @@
// NSArray * // NSArray *
CGFloat itemH = 94; CGFloat itemH = 94;
if (imgArr.count == 1) { if (imgArr.count == 1) {
itemH = (SCREEN_WIDTH-15-15-15)/2 + 94; itemH = (SCREEN_WIDTH-15-15-15)/2 + 94+10;
}else if(imgArr.count > 1){ }else if(imgArr.count > 1){
if (imgArr.count > 3) { if (imgArr.count > 3) {
itemH = (SCREEN_WIDTH-16*2-12*2-10*2)/3*2+10+94; itemH = (SCREEN_WIDTH-16*2-12*2-10*2)/3*2+10+94+ScaleWidth(10);
}else{ }else{
itemH = (SCREEN_WIDTH-16*2-12*2-10*2)/3+94; itemH = (SCREEN_WIDTH-16*2-12*2-10*2)/3+94+ScaleWidth(10);
} }
}else{ }else{
itemH = 94; itemH = 94;

View File

@@ -8,20 +8,22 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "QXUserModel.h" #import "QXUserModel.h"
#import "QXSeatHeaderView.h" #import "QXSeatHeaderView.h"
#import "CKShimmerLabel.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface QXExpansionCell : UITableViewCell @interface QXExpansionCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIView *bgView; @property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet QXSeatHeaderView *avatarImgV; @property (weak, nonatomic) IBOutlet QXSeatHeaderView *avatarImgV;
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab; @property (weak, nonatomic) IBOutlet CKShimmerLabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *levelImgV;
@property (weak, nonatomic) IBOutlet UILabel *ageLabel; @property (weak, nonatomic) IBOutlet UILabel *ageLabel;
@property (weak, nonatomic) IBOutlet UIButton *followBtn; @property (weak, nonatomic) IBOutlet UIButton *followBtn;
@property (weak, nonatomic) IBOutlet UIView *imgsBgView; @property (weak, nonatomic) IBOutlet UIView *imgsBgView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgsBgViewHeightCon; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgsBgViewHeightCon;
@property (weak, nonatomic) IBOutlet UIImageView *sexImageView; @property (weak, nonatomic) IBOutlet UIImageView *sexImageView;
@property (nonatomic, strong) QXUserHomeModel *model; @property (nonatomic, strong) QXUserHomeModel *model;
-(void)nameStartAnimate;
-(void)nameStopAnimate;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -37,6 +37,12 @@
make.size.mas_equalTo(CGSizeMake(imgWidth, imgWidth)); make.size.mas_equalTo(CGSizeMake(imgWidth, imgWidth));
}]; }];
} }
self.nameLabel.textColor = RGB16(0x212121);
self.nameLabel.shimmerWidth = 20;
self.nameLabel.shimmerRadius = 20;
self.nameLabel.durationTime = 1;;
self.nameLabel.font = [UIFont boldSystemFontOfSize:15];
[self.nameLabel stopShimmer];
} }
- (IBAction)chatAction:(id)sender { - (IBAction)chatAction:(id)sender {
if (self.model.room_id.intValue > 0) { if (self.model.room_id.intValue > 0) {
@@ -49,7 +55,19 @@
-(void)setModel:(QXUserHomeModel *)model{ -(void)setModel:(QXUserHomeModel *)model{
_model = model; _model = model;
[self.avatarImgV setHeadIcon:model.avatar dress:@""]; [self.avatarImgV setHeadIcon:model.avatar dress:@""];
self.nicknameLab.text = model.nickname; if ([model.nobility_image isExist]) {
[self.avatarImgV.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.nobility_image]];
}else{
self.avatarImgV.nobilityImageView.image = nil;
}
if ([model.nickname_color isExist]) {
self.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color];
// [self.nameLabel startShimmer];
}else{
self.nameLabel.shimmerColor = [UIColor clearColor];
// [self.nameLabel stopShimmer];
}
self.nameLabel.text = model.nickname;
self.ageLabel.text = [NSString stringWithFormat:@"%ld岁 ip属地: %@",[model.birthday ageWithDateOfBirth],model.loginip]; self.ageLabel.text = [NSString stringWithFormat:@"%ld岁 ip属地: %@",[model.birthday ageWithDateOfBirth],model.loginip];
CGFloat imgWidth = (SCREEN_WIDTH-16*2-12*2-10*2)/3; CGFloat imgWidth = (SCREEN_WIDTH-16*2-12*2-10*2)/3;
UIImageView *firstImgV = self.imgViewsArray.firstObject; UIImageView *firstImgV = self.imgViewsArray.firstObject;
@@ -102,6 +120,23 @@
self.followBtn.selected = NO; self.followBtn.selected = NO;
} }
} }
-(void)nameStartAnimate{
if ([self.model.nickname_color isExist]) {
[self.nameLabel stopShimmer];
[self.nameLabel layoutSubviews];
self.nameLabel.shimmerWidth = 20;
self.nameLabel.shimmerRadius = 20;
self.nameLabel.durationTime = 1;
self.nameLabel.shimmerColor = [UIColor colorWithHexString:self.model.nickname_color];
[self.nameLabel startShimmer];
}
}
-(void)nameStopAnimate{
if ([self.model.nickname_color isExist]) {
self.nameLabel.shimmerColor = [UIColor colorWithHexString:self.model.nickname_color];
[self.nameLabel stopShimmer];
}
}
-(void)previewPhotoWithCurrentIndex:(NSInteger)currentIndex{ -(void)previewPhotoWithCurrentIndex:(NSInteger)currentIndex{
NSArray *images = [self.model.home_bgimages componentsSeparatedByString:@","]; NSArray *images = [self.model.home_bgimages componentsSeparatedByString:@","];

View File

@@ -10,19 +10,19 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="184" id="BqF-kO-8SX" customClass="QXExpansionCell"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="184" id="BqF-kO-8SX" customClass="QXExpansionCell">
<rect key="frame" x="0.0" y="0.0" width="371" height="95"/> <rect key="frame" x="0.0" y="0.0" width="375" height="95"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="BqF-kO-8SX" id="ktB-xa-Y8j"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="BqF-kO-8SX" id="ktB-xa-Y8j">
<rect key="frame" x="0.0" y="0.0" width="371" height="95"/> <rect key="frame" x="0.0" y="0.0" width="375" height="95"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d7u-yz-ciJ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d7u-yz-ciJ">
<rect key="frame" x="16" y="6" width="339" height="83"/> <rect key="frame" x="16" y="6" width="343" height="83"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ij8-0l-yjh"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ij8-0l-yjh">
<rect key="frame" x="12" y="12" width="50" height="50"/> <rect key="frame" x="12" y="12" width="50" height="60"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="Aa4-FN-u4i"/> <constraint firstAttribute="width" secondItem="ij8-0l-yjh" secondAttribute="height" multiplier="50:60" id="6E5-lr-xCi"/>
<constraint firstAttribute="width" constant="50" id="b1V-LD-cvU"/> <constraint firstAttribute="width" constant="50" id="b1V-LD-cvU"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
@@ -33,39 +33,20 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</imageView> </imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SRz-S8-eVY" customClass="QXSeatHeaderView"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SRz-S8-eVY" customClass="QXSeatHeaderView">
<rect key="frame" x="12" y="12" width="50" height="50"/> <rect key="frame" x="12" y="12" width="50" height="60"/>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8cq-E3-DvJ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DJ0-UX-5S2" customClass="CKShimmerLabel">
<rect key="frame" x="72" y="19" width="40" height="18"/> <rect key="frame" x="93" y="20" width="155" height="18"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="18" id="qwD-PD-2sr"/> <constraint firstAttribute="height" constant="18" id="YBf-fM-mcV"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/> </view>
<color key="textColor" red="0.12941176469999999" green="0.12941176469999999" blue="0.12941176469999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="gIi-P2-Y9S">
<rect key="frame" x="118" y="20" width="42" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="42" id="Pa0-JD-WZI"/>
<constraint firstAttribute="height" constant="16" id="nev-GJ-TTd"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SfJ-0f-fTV">
<rect key="frame" x="72" y="45" width="31.666666666666671" height="14.666666666666664"/>
<constraints>
<constraint firstAttribute="height" constant="14.67" id="ZBE-6b-COh"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="01B-he-W7N"> <button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="01B-he-W7N">
<rect key="frame" x="12" y="12" width="100" height="50"/> <rect key="frame" x="12" y="12" width="100" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</button> </button>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WzX-5h-Rjx"> <button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WzX-5h-Rjx">
<rect key="frame" x="254" y="24" width="73" height="26"/> <rect key="frame" x="258" y="29" width="73" height="26"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="73" id="xrz-si-tcM"/> <constraint firstAttribute="width" constant="73" id="xrz-si-tcM"/>
<constraint firstAttribute="height" constant="26" id="zly-Ov-2fX"/> <constraint firstAttribute="height" constant="26" id="zly-Ov-2fX"/>
@@ -83,41 +64,49 @@
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aff-rQ-ltL"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aff-rQ-ltL">
<rect key="frame" x="12" y="71" width="315" height="0.0"/> <rect key="frame" x="12" y="81" width="319" height="0.0"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="height" id="HM6-cc-JXk"/> <constraint firstAttribute="height" id="HM6-cc-JXk"/>
</constraints> </constraints>
</view> </view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rE2-Ub-cG3"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rE2-Ub-cG3">
<rect key="frame" x="46" y="46" width="16" height="16"/> <rect key="frame" x="72" y="21" width="16" height="16"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="16" id="hDn-pN-Z1j"/> <constraint firstAttribute="width" constant="16" id="hDn-pN-Z1j"/>
<constraint firstAttribute="height" constant="16" id="txd-O6-q3p"/> <constraint firstAttribute="height" constant="16" id="txd-O6-q3p"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SfJ-0f-fTV">
<rect key="frame" x="72" y="46" width="31.666666666666671" height="14.666666666666664"/>
<constraints>
<constraint firstAttribute="height" constant="14.67" id="ZBE-6b-COh"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="DJ0-UX-5S2" firstAttribute="leading" secondItem="rE2-Ub-cG3" secondAttribute="trailing" constant="5" id="21A-eM-Lns"/>
<constraint firstItem="SRz-S8-eVY" firstAttribute="top" secondItem="ij8-0l-yjh" secondAttribute="top" id="5SH-Nr-W30"/> <constraint firstItem="SRz-S8-eVY" firstAttribute="top" secondItem="ij8-0l-yjh" secondAttribute="top" id="5SH-Nr-W30"/>
<constraint firstItem="SRz-S8-eVY" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="leading" id="5xK-a1-AgP"/> <constraint firstItem="SRz-S8-eVY" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="leading" id="5xK-a1-AgP"/>
<constraint firstItem="aff-rQ-ltL" firstAttribute="leading" secondItem="d7u-yz-ciJ" secondAttribute="leading" constant="12" id="7W3-i0-a7h"/> <constraint firstItem="aff-rQ-ltL" firstAttribute="leading" secondItem="d7u-yz-ciJ" secondAttribute="leading" constant="12" id="7W3-i0-a7h"/>
<constraint firstItem="ij8-0l-yjh" firstAttribute="top" secondItem="d7u-yz-ciJ" secondAttribute="top" constant="12" id="7rj-T2-7ef"/> <constraint firstItem="ij8-0l-yjh" firstAttribute="top" secondItem="d7u-yz-ciJ" secondAttribute="top" constant="12" id="7rj-T2-7ef"/>
<constraint firstItem="gIi-P2-Y9S" firstAttribute="leading" secondItem="8cq-E3-DvJ" secondAttribute="trailing" constant="6" id="9a3-JM-DNn"/>
<constraint firstItem="SfJ-0f-fTV" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="trailing" constant="10" id="LpR-OW-ApF"/> <constraint firstItem="SfJ-0f-fTV" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="trailing" constant="10" id="LpR-OW-ApF"/>
<constraint firstItem="SRz-S8-eVY" firstAttribute="bottom" secondItem="ij8-0l-yjh" secondAttribute="bottom" id="PL9-sW-Etp"/> <constraint firstItem="SRz-S8-eVY" firstAttribute="bottom" secondItem="ij8-0l-yjh" secondAttribute="bottom" id="PL9-sW-Etp"/>
<constraint firstItem="8cq-E3-DvJ" firstAttribute="top" secondItem="d7u-yz-ciJ" secondAttribute="top" constant="19" id="QB4-FR-hQC"/>
<constraint firstAttribute="trailing" secondItem="aff-rQ-ltL" secondAttribute="trailing" constant="12" id="UJy-KH-Me6"/> <constraint firstAttribute="trailing" secondItem="aff-rQ-ltL" secondAttribute="trailing" constant="12" id="UJy-KH-Me6"/>
<constraint firstItem="rE2-Ub-cG3" firstAttribute="trailing" secondItem="SRz-S8-eVY" secondAttribute="trailing" id="Us7-e2-feo"/>
<constraint firstItem="ij8-0l-yjh" firstAttribute="leading" secondItem="d7u-yz-ciJ" secondAttribute="leading" constant="12" id="VNZ-KS-lUT"/> <constraint firstItem="ij8-0l-yjh" firstAttribute="leading" secondItem="d7u-yz-ciJ" secondAttribute="leading" constant="12" id="VNZ-KS-lUT"/>
<constraint firstItem="rE2-Ub-cG3" firstAttribute="bottom" secondItem="SRz-S8-eVY" secondAttribute="bottom" id="Wkl-qB-guz"/> <constraint firstItem="rE2-Ub-cG3" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="trailing" constant="10" id="Vpj-sb-ZIl"/>
<constraint firstItem="aff-rQ-ltL" firstAttribute="top" secondItem="ij8-0l-yjh" secondAttribute="bottom" constant="9" id="gpK-ex-dHB"/> <constraint firstItem="aff-rQ-ltL" firstAttribute="top" secondItem="ij8-0l-yjh" secondAttribute="bottom" constant="9" id="gpK-ex-dHB"/>
<constraint firstItem="WzX-5h-Rjx" firstAttribute="centerY" secondItem="ij8-0l-yjh" secondAttribute="centerY" id="lzk-gK-Xr5"/> <constraint firstItem="WzX-5h-Rjx" firstAttribute="centerY" secondItem="ij8-0l-yjh" secondAttribute="centerY" id="lzk-gK-Xr5"/>
<constraint firstItem="SfJ-0f-fTV" firstAttribute="top" secondItem="8cq-E3-DvJ" secondAttribute="bottom" constant="8" symbolic="YES" id="pb7-FA-QT6"/>
<constraint firstItem="gIi-P2-Y9S" firstAttribute="centerY" secondItem="8cq-E3-DvJ" secondAttribute="centerY" id="qez-UP-KMH"/>
<constraint firstItem="SRz-S8-eVY" firstAttribute="trailing" secondItem="ij8-0l-yjh" secondAttribute="trailing" id="sL4-bA-4lX"/> <constraint firstItem="SRz-S8-eVY" firstAttribute="trailing" secondItem="ij8-0l-yjh" secondAttribute="trailing" id="sL4-bA-4lX"/>
<constraint firstItem="8cq-E3-DvJ" firstAttribute="leading" secondItem="ij8-0l-yjh" secondAttribute="trailing" constant="10" id="xsB-a1-v4y"/> <constraint firstItem="DJ0-UX-5S2" firstAttribute="centerY" secondItem="rE2-Ub-cG3" secondAttribute="centerY" id="sZI-KB-uHW"/>
<constraint firstItem="SfJ-0f-fTV" firstAttribute="top" secondItem="rE2-Ub-cG3" secondAttribute="bottom" constant="9" id="t10-Md-7eL"/>
<constraint firstItem="WzX-5h-Rjx" firstAttribute="leading" secondItem="DJ0-UX-5S2" secondAttribute="trailing" constant="10" id="vCf-Pq-QOS"/>
<constraint firstAttribute="trailing" secondItem="WzX-5h-Rjx" secondAttribute="trailing" constant="12" id="yE0-Ql-MBm"/> <constraint firstAttribute="trailing" secondItem="WzX-5h-Rjx" secondAttribute="trailing" constant="12" id="yE0-Ql-MBm"/>
<constraint firstItem="ij8-0l-yjh" firstAttribute="top" secondItem="rE2-Ub-cG3" secondAttribute="bottom" constant="-25" id="yi3-el-D4c"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/> <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
@@ -142,8 +131,7 @@
<outlet property="followBtn" destination="WzX-5h-Rjx" id="c7X-9W-ZDG"/> <outlet property="followBtn" destination="WzX-5h-Rjx" id="c7X-9W-ZDG"/>
<outlet property="imgsBgView" destination="aff-rQ-ltL" id="iQp-mS-jyp"/> <outlet property="imgsBgView" destination="aff-rQ-ltL" id="iQp-mS-jyp"/>
<outlet property="imgsBgViewHeightCon" destination="HM6-cc-JXk" id="rZb-Ea-rwx"/> <outlet property="imgsBgViewHeightCon" destination="HM6-cc-JXk" id="rZb-Ea-rwx"/>
<outlet property="levelImgV" destination="gIi-P2-Y9S" id="74c-sq-nRX"/> <outlet property="nameLabel" destination="DJ0-UX-5S2" id="f5N-Fb-M5y"/>
<outlet property="nicknameLab" destination="8cq-E3-DvJ" id="sfo-Gt-g93"/>
<outlet property="sexImageView" destination="rE2-Ub-cG3" id="zbU-Lq-BLy"/> <outlet property="sexImageView" destination="rE2-Ub-cG3" id="zbU-Lq-BLy"/>
</connections> </connections>
<point key="canvasLocation" x="216.03053435114504" y="132.04225352112678"/> <point key="canvasLocation" x="216.03053435114504" y="132.04225352112678"/>

View File

@@ -511,7 +511,18 @@
self.giftModel = nil; self.giftModel = nil;
self.pitUserListView.isSingle = NO; self.pitUserListView.isSingle = NO;
[self.pitUserListView.selectedArray removeAllObjects]; [self.pitUserListView.selectedArray removeAllObjects];
self.pitUserListView.users = pitUsers; NSMutableArray *arr = [NSMutableArray array];
for (QXRoomPitModel *md in pitUsers) {
QXRoomPitModel *model = [QXRoomPitModel new];
model.user_id = md.user_id;
model.nickname = md.nickname;
model.pit_number = md.pit_number;
model.sex = md.sex;
model.avatar = md.avatar;
model.user_code = md.user_code;
[arr addObject:model];
}
self.pitUserListView.users = arr;
[self getMyWallet]; [self getMyWallet];
} }
-(void)setUserModel:(QXRoomPitModel *)userModel{ -(void)setUserModel:(QXRoomPitModel *)userModel{
@@ -821,6 +832,10 @@
} }
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
QXGiftModel *model = self.dataArray[indexPath.row]; QXGiftModel *model = self.dataArray[indexPath.row];
if (model.is_lock.intValue == 1) {
showToast(@"请先开通爵位");
return;
}
if ([model.activities_id isEqualToString:@"5"]) { if ([model.activities_id isEqualToString:@"5"]) {
/// ///
if (self.selectetGiftBlock) { if (self.selectetGiftBlock) {

View File

@@ -53,7 +53,7 @@
@property (nonatomic,strong)UIButton *skyDownBtn; @property (nonatomic,strong)UIButton *skyDownBtn;
@property (nonatomic,strong)QXNewPeoplePopView *nPeopleRechargeView; @property (nonatomic,strong)QXNewPeoplePopView *nPeopleRechargeView;
@property (nonatomic,strong)QXAppstoreHomeView *appStoreView; //@property (nonatomic,strong)QXAppstoreHomeView *appStoreView;
@property (nonatomic,strong)SDCycleScrollView *rechargePermissionView; @property (nonatomic,strong)SDCycleScrollView *rechargePermissionView;
@property (nonatomic,strong)NSMutableArray *rechargePermissionArray; @property (nonatomic,strong)NSMutableArray *rechargePermissionArray;
@@ -63,6 +63,7 @@
@implementation QXHomeViewController @implementation QXHomeViewController
- (void)viewDidLoad { - (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginSuccess) name:noticeUserLogin object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginSuccess) name:noticeUserLogin object:nil];
@@ -75,11 +76,7 @@
} }
- (void)initSubViews{ - (void)initSubViews{
if ([QXConfig.backgroundImage hasPrefix:@"http"] || [QXConfig.backgroundImage hasPrefix:@"https"]) { [self updateBgImage:@"app_home_bg"];
[self updateBgImage:QXConfig.backgroundImage];
}else{
[self updateBgImage:@"app_home_bg"];
}
UIImageView *logoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"yusheng"]]; UIImageView *logoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"yusheng"]];
[self.view addSubview:logoImageView]; [self.view addSubview:logoImageView];
[logoImageView mas_makeConstraints:^(MASConstraintMaker *make) { [logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -142,8 +139,8 @@
// }]; // }];
[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];
self.rechargePermissionView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(SCREEN_WIDTH-80-17, SCREEN_HEIGHT-(TabbarContentHeight+90+80), 80, 80) delegate:self placeholderImage:nil]; self.rechargePermissionView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(SCREEN_WIDTH-80-17, SCREEN_HEIGHT-(TabbarContentHeight+90+80), 80, 80) delegate:self placeholderImage:nil];
self.rechargePermissionView.pageControlBottomOffset = -15; self.rechargePermissionView.pageControlBottomOffset = -15;
@@ -405,11 +402,11 @@
@strongify(self) @strongify(self)
[self.dataArray removeAllObjects]; [self.dataArray removeAllObjects];
[self.dataArray addObjectsFromArray:list]; [self.dataArray addObjectsFromArray:list];
if (isAppStore) { // if (isAppStore) {
self.appStoreView.hidden = NO; // self.appStoreView.hidden = NO;
}else{ // }else{
self.appStoreView.hidden = YES; // self.appStoreView.hidden = YES;
} // }
// weakSelf.appStoreView.dataArray = list; // weakSelf.appStoreView.dataArray = list;
self.topView.dataArray = list; self.topView.dataArray = list;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -419,7 +416,7 @@
} }
-(void)getBanner{ -(void)getBanner{
@weakify(self) @weakify(self)
[QXHomePageNetwork homeBannerSuccessBlock:^(NSArray<QXBanner *> * _Nonnull list) { [QXHomePageNetwork homeBannerWithType:@"3" successBlock:^(NSArray<QXBanner *> * _Nonnull list) {
@strongify(self) @strongify(self)
NSMutableArray *arr = [NSMutableArray array]; NSMutableArray *arr = [NSMutableArray array];
for (QXBanner *banner in list) { for (QXBanner *banner in list) {
@@ -427,7 +424,7 @@
} }
[self.bannerArry removeAllObjects]; [self.bannerArry removeAllObjects];
[self.bannerArry addObjectsFromArray:list]; [self.bannerArry addObjectsFromArray:list];
self.appStoreView.bannerArray = list; // self.appStoreView.bannerArray = list;
self.bannerScrollView.imageURLStringsGroup = arr; self.bannerScrollView.imageURLStringsGroup = arr;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
@@ -674,12 +671,12 @@
return _rechargePermissionArray; return _rechargePermissionArray;
} }
-(QXAppstoreHomeView *)appStoreView{ //-(QXAppstoreHomeView *)appStoreView{
if (!_appStoreView) { // if (!_appStoreView) {
_appStoreView = [[QXAppstoreHomeView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight-TabbarContentHeight)]; // _appStoreView = [[QXAppstoreHomeView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight-TabbarContentHeight)];
} // }
return _appStoreView; // return _appStoreView;
} //}
-(void)dealloc{ -(void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
} }

View File

@@ -0,0 +1,26 @@
//
// QXRoomBestFriendModel.h
// QXLive
//
// Created by 启星 on 2025/11/20.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class QXRoomBestFriendListModel,QXRoomBestFriendListSubModel;
@interface QXRoomBestFriendModel : NSObject
@property (nonatomic,strong)QXUserCpInfoModel *cp;
@property (nonatomic,strong)NSArray<QXRoomBestFriendListModel*> *no_cp;
@end
@interface QXRoomBestFriendListModel : NSObject
@property (nonatomic,strong)NSString *relation_name;
@property (nonatomic,strong)NSArray <QXRelationshipListModel*>*relation_list;
@end
@interface QXHeartBeatSpaceListModel : NSObject
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,29 @@
//
// QXRoomBestFriendModel.m
// QXLive
//
// Created by on 2025/11/20.
//
#import "QXRoomBestFriendModel.h"
@implementation QXRoomBestFriendModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"no_cp": @"QXRoomBestFriendListModel",
@"cp": @"QXUserCpInfoModel",
};
}
@end
@implementation QXRoomBestFriendListModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"relation_list": @"QXRelationshipListModel",
};
}
@end
@implementation QXHeartBeatSpaceListModel
@end

View File

@@ -23,6 +23,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *room_id; @property (nonatomic,strong)NSString *room_id;
@property (nonatomic,strong)NSString *relation_name; @property (nonatomic,strong)NSString *relation_name;
@property (nonatomic,strong)NSString *end_time;
@property (nonatomic,strong)NSString *sex2;
@property (nonatomic,strong)NSString *sex1;
@property (nonatomic,strong)NSString *delete_me_coin;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -34,8 +34,9 @@ NS_ASSUME_NONNULL_BEGIN
/** /**
首页banner 首页banner
*/ */
+(void)homeBannerSuccessBlock:(void (^)(NSArray<QXBanner*>* list))successBlock +(void)homeBannerWithType:(NSString*)type
failBlock:(void (^)(NSError * error, NSString * msg))failBlock; successBlock:(void (^)(NSArray<QXBanner*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/** /**
魅力/财富榜 魅力/财富榜

View File

@@ -35,9 +35,10 @@
failBlock(error,msg); failBlock(error,msg);
}]; }];
} }
+(void)homeBannerSuccessBlock:(void (^)(NSArray<QXBanner*>* list))successBlock +(void)homeBannerWithType:(NSString*)type
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{ successBlock:(void (^)(NSArray<QXBanner*>* list))successBlock
[[QXRequset shareInstance] getWithUrl:QXHomeBanner parameters:@{@"type":@"3"} needCache:NO success:^(id responseObject) { failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
[[QXRequset shareInstance] getWithUrl:QXHomeBanner parameters:@{@"type":type?:@"3"} needCache:NO success:^(id responseObject) {
if (successBlock) { if (successBlock) {
NSArray *list = [NSArray yy_modelArrayWithClass:[QXBanner class] json:responseObject[@"data"]]; NSArray *list = [NSArray yy_modelArrayWithClass:[QXBanner class] json:responseObject[@"data"]];
successBlock(list); successBlock(list);

View File

@@ -253,7 +253,7 @@
model.navIsHidden = YES; model.navIsHidden = YES;
model.preferredStatusBarStyle = UIStatusBarStyleDarkContent; model.preferredStatusBarStyle = UIStatusBarStyleDarkContent;
model.logoImage = [UIImage imageNamed:@"login_logo"]; model.logoImage = [UIImage imageNamed:@"app_one_login_icon"];
model.logoFrameBlock = ^CGRect(CGSize screenSize, CGSize superViewSize, CGRect frame) { model.logoFrameBlock = ^CGRect(CGSize screenSize, CGSize superViewSize, CGRect frame) {
frame.origin = CGPointMake((SCREEN_WIDTH - 88) * .5, 150+ kSafeAreaTop); frame.origin = CGPointMake((SCREEN_WIDTH - 88) * .5, 150+ kSafeAreaTop);
frame.size = CGSizeMake(88, 88); frame.size = CGSizeMake(88, 88);
@@ -530,11 +530,12 @@
showToast(QXText(@"请输入正确的手机号码")); showToast(QXText(@"请输入正确的手机号码"));
return; return;
} }
sender.userInteractionEnabled = NO;
MJWeakSelf MJWeakSelf
[QXLoginNetwork getSmscodeWithMobile:self.accountTextField.textField.text type:GetSmscodeTypeLogin successBlock:^(id _Nonnull responseObject) { [QXLoginNetwork getSmscodeWithMobile:self.accountTextField.textField.text type:GetSmscodeTypeLogin successBlock:^(id _Nonnull responseObject) {
[weakSelf.codeTextField startTimeDown]; [weakSelf.codeTextField startTimeDown];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
sender.userInteractionEnabled = YES;
}]; }];
} }

View File

@@ -36,6 +36,16 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *dress; @property (nonatomic,strong)NSString *dress;
/// 聊天气泡 /// 聊天气泡
@property (nonatomic,strong)NSString *chat_bubble; @property (nonatomic,strong)NSString *chat_bubble;
/// 爵位图片
@property (nonatomic,strong)NSString *nobility_image;
/// 昵称颜色
@property (nonatomic,strong)NSString *nickname_color;
/// 是否可以设置隐身进入的状态0-不行1-可以
@property (nonatomic,strong)NSString *is_hide;
/// 当前状态0-取消隐身1-隐身进入
@property (nonatomic,strong)NSString *hide_status;
/// 当前状态:-1 未认证歌手, 0待审核 1已认证 2被拒绝
@property (nonatomic,strong)NSString *singer_status;
/// 各种卡片 /// 各种卡片
@property (nonatomic,strong)NSArray *icon; @property (nonatomic,strong)NSArray *icon;
/// 1 能聊天 0不能聊天 /// 1 能聊天 0不能聊天

View File

@@ -260,6 +260,9 @@
__block int timeCount = 60; __block int timeCount = 60;
_timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{ _timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{
timeCount--; timeCount--;
if (self == nil) {
return;
}
if (timeCount<=0) { if (timeCount<=0) {
[self->_timer invalidate]; [self->_timer invalidate];
self->_codeBtn.userInteractionEnabled = YES; self->_codeBtn.userInteractionEnabled = YES;
@@ -269,4 +272,10 @@
} }
}]; }];
} }
-(void)dealloc{
if (_timer) {
[_timer invalidate];
_timer = nil;
}
}
@end @end

View File

@@ -10,6 +10,7 @@
#import "QXRoomModel.h" #import "QXRoomModel.h"
#import "QXRoomFriendRelationModel.h" #import "QXRoomFriendRelationModel.h"
#import "QXRedPacketModel.h" #import "QXRedPacketModel.h"
#import "QXUserSongListModel.h"
typedef NS_ENUM(NSInteger) { typedef NS_ENUM(NSInteger) {
/// 清空消息 /// 清空消息
@@ -20,6 +21,11 @@ typedef NS_ENUM(NSInteger) {
QXRoomMessageTypeMuteRemoteAudio = 125, QXRoomMessageTypeMuteRemoteAudio = 125,
/// 关闭自己声音 /// 关闭自己声音
QXRoomMessageTypeMuteLocalAudio = 126, QXRoomMessageTypeMuteLocalAudio = 126,
/// 发送|接收到心动信号
QXRoomMessageTypeSendAndRecieveCpHeartSignal = 130,
/// cp双向奔赴
QXRoomMessageTypeCpHeartFinished = 131,
/// 基础文本消息类型 /// 基础文本消息类型
QXRoomMessageTypeText = 1, QXRoomMessageTypeText = 1,
/// 基础表情类型 /// 基础表情类型
@@ -132,6 +138,26 @@ typedef NS_ENUM(NSInteger) {
QXRoomMessageTypeSendRedpacket = 1060, QXRoomMessageTypeSendRedpacket = 1060,
/// 红包已被抢完 /// 红包已被抢完
QXRoomMessageTypeRedpacketFinished = 1061, QXRoomMessageTypeRedpacketFinished = 1061,
/// 点歌房当前歌曲发生变化
QXRoomMessageTypeSingerRoomCurrentSongDidChanged = 1070,
/// 点歌房下一首歌曲发生变化
QXRoomMessageTypeSingerRoomNextSongDidChanged = 1071,
/// 歌曲数量发生变化
QXRoomMessageTypeSingerRoomSongCountDidChanged = 1072,
/// CP 特效
QXRoomMessageTypeCpJoinRoom = 1080,
/// 开始签约
QXRoomMessageTypeStartSign = 1090,
/// 结束签约
QXRoomMessageTypeEndSign = 1092,
/// 签约延时
QXRoomMessageTypeDelaySignTime = 1093,
/// 身价发生变化
QXRoomMessageTypeSignBodyPriceDidChanged = 1091,
}QXRoomMessageType; }QXRoomMessageType;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@protocol QXRoomMessageManagerDelegate <NSObject> @protocol QXRoomMessageManagerDelegate <NSObject>
@@ -268,22 +294,45 @@ NS_ASSUME_NONNULL_BEGIN
/// 房间用户在线状态发生变化 /// 房间用户在线状态发生变化
//-(void)roomUserOnlineStatusDidChanged:(BOOL)isOnline userId:(NSString*)userId; //-(void)roomUserOnlineStatusDidChanged:(BOOL)isOnline userId:(NSString*)userId;
/// 点唱房当前歌曲信息发生变化
-(void)singerSongCurrentSongInfoDidChanged:(QXUserSongListModel*)model;
/// 点唱房下一首歌信息发生变化
-(void)singerSongNextSongInfoDidChanged:(QXUserSongListModel*)model;
/// 已点歌曲数量发生变化
-(void)singerSongCountDidChanged:(NSString*)count;
/// 签约开始
-(void)signDidStartWithEndTime:(NSString *)endTime signId:(NSString *)signId signDay:(NSString*)signDay signValue:(NSString*)signValue;
/// 签约结束
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value;
/// 签约身价变化
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId sign_coin_list:(NSArray*)sign_coin_list;
/// 签约身价变化
-(void)signTimeDelayWithEndTime:(NSString*)endTime;
@end @end
@interface QXRoomMessageManager : NSObject @interface QXRoomMessageManager : NSObject
@property (nonatomic,weak)id<QXRoomMessageManagerDelegate>delegate; @property (nonatomic,weak)id<QXRoomMessageManagerDelegate>delegate;
+(instancetype)shared; +(instancetype)shared;
-(void)addC2CObserver;
/// 加入房间群组 /// 加入房间群组
-(void)joinGroupWithRoomId:(NSString*)roomId; -(void)joinGroupWithRoomId:(NSString*)roomId;
/// 退出房间群组 /// 退出房间群组
-(void)quitGroupWithRoomId:(NSString*)roomId; -(void)quitGroupWithRoomId:(NSString*)roomId removeListener:(BOOL)removeListener;
-(void)sendChatMessage:(NSString *)message messageType:(QXRoomMessageType)messageType needInsertMessage:(BOOL)needInsertMessage; -(void)sendChatMessage:(NSString *)message messageType:(QXRoomMessageType)messageType needInsertMessage:(BOOL)needInsertMessage;
/// 发送表情 /// 发送表情
-(void)sendChatEmoji:(QXEmojiModel *)emoji; -(void)sendChatEmoji:(QXEmojiModel *)emoji;
-(void)sendC2CMessage:(NSString *)message messageType:(QXRoomMessageType)messageType userId:(NSString*)userId; -(void)sendC2CMessage:(NSString *)message messageType:(QXRoomMessageType)messageType userId:(NSString*)userId;
-(void)showCpFinishedAlertViewWithText:(NSString*)text;
@end @end
@interface QXRoomMessage : NSObject @interface QXRoomMessage : NSObject

View File

@@ -12,6 +12,9 @@
#import "QXGiftDisplayManager.h" #import "QXGiftDisplayManager.h"
#import <AgoraRtcKit/AgoraRtcEngineKit.h> #import <AgoraRtcKit/AgoraRtcEngineKit.h>
#import "TUIChatConfig.h" #import "TUIChatConfig.h"
#import "QXDrifNobilityJoinRoomView.h"
#import "QXCustomAlertView.h"
#import "QXHeartBeatSpaceViewController.h"
@interface QXRoomMessageManager() <V2TIMGroupListener,V2TIMSimpleMsgListener,V2TIMAdvancedMsgListener> @interface QXRoomMessageManager() <V2TIMGroupListener,V2TIMSimpleMsgListener,V2TIMAdvancedMsgListener>
@property (nonatomic,strong)NSString *groupId; @property (nonatomic,strong)NSString *groupId;
@@ -33,13 +36,15 @@
} }
return self; return self;
} }
-(void)addC2CObserver{
[[V2TIMManager sharedInstance] addSimpleMsgListener:self];
}
-(void)joinGroupWithRoomId:(NSString *)roomId{ -(void)joinGroupWithRoomId:(NSString *)roomId{
MJWeakSelf MJWeakSelf
if (self.groupId) { if (self.groupId) {
[self quitGroupWithRoomId:self.groupId]; [self quitGroupWithRoomId:self.groupId removeListener:YES];
} }
[[V2TIMManager sharedInstance] addGroupListener:self]; [[V2TIMManager sharedInstance] addGroupListener:self];
[[V2TIMManager sharedInstance] addSimpleMsgListener:self];
[[V2TIMManager sharedInstance] addAdvancedMsgListener:self]; [[V2TIMManager sharedInstance] addAdvancedMsgListener:self];
NSString *groupId = [NSString stringWithFormat:@"room%@",roomId]; NSString *groupId = [NSString stringWithFormat:@"room%@",roomId];
[[V2TIMManager sharedInstance] joinGroup:groupId msg:@"大家好,我来啦" succ:^{ [[V2TIMManager sharedInstance] joinGroup:groupId msg:@"大家好,我来啦" succ:^{
@@ -51,13 +56,13 @@
QXLOG(@"腾讯IM加入聊天室失败-code%d-原因%@",code,desc); QXLOG(@"腾讯IM加入聊天室失败-code%d-原因%@",code,desc);
}]; }];
} }
-(void)quitGroupWithRoomId:(NSString *)roomId{ -(void)quitGroupWithRoomId:(NSString *)roomId removeListener:(BOOL)removeListener{
MJWeakSelf if (removeListener) {
self.groupId = nil; self.groupId = nil;
self.roomId = nil; self.roomId = nil;
[[V2TIMManager sharedInstance] removeGroupListener:self]; [[V2TIMManager sharedInstance] removeGroupListener:self];
[[V2TIMManager sharedInstance] removeSimpleMsgListener:self]; [[V2TIMManager sharedInstance] removeAdvancedMsgListener:self];
[[V2TIMManager sharedInstance] removeAdvancedMsgListener:self]; }
NSString *groupId = [NSString stringWithFormat:@"room%@",roomId]; NSString *groupId = [NSString stringWithFormat:@"room%@",roomId];
[[V2TIMManager sharedInstance] quitGroup:groupId succ:^{ [[V2TIMManager sharedInstance] quitGroup:groupId succ:^{
@@ -109,6 +114,9 @@
// md.play_image = jia_jia; // md.play_image = jia_jia;
[[QXGiftPlayerManager shareManager] displayChatEffectView:jia_jia]; [[QXGiftPlayerManager shareManager] displayChatEffectView:jia_jia];
} }
if ([model.FromUserInfo.enter_image isExist]) {
[[QXDrifNobilityJoinRoomView shareView] addNobilityUserModel:model];
}
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
[self.delegate didInsertMessge:model]; [self.delegate didInsertMessge:model];
} }
@@ -624,13 +632,13 @@
// 1 线 2线 // 1 线 2线
NSInteger type = 1; NSInteger type = 1;
type = [msg.Text[@"type"] integerValue]; type = [msg.Text[@"type"] integerValue];
BOOL isOnline = type == 1?YES:NO; // BOOL isOnline = type == 1?YES:NO;
// if (self.delegate && [self.delegate respondsToSelector:@selector(roomUserOnlineStatusDidChanged:userId:)]) { // if (self.delegate && [self.delegate respondsToSelector:@selector(roomUserOnlineStatusDidChanged:userId:)]) {
// [self.delegate roomUserOnlineStatusDidChanged:YES userId:userId]; // [self.delegate roomUserOnlineStatusDidChanged:YES userId:userId];
// } // }
NSDictionary *parm = @{ NSDictionary *parm = @{
@"user_id":userId, @"user_id":userId,
@"is_online":[NSNumber numberWithBool:isOnline], @"is_online":[NSNumber numberWithInteger:type],
}; };
[[NSNotificationCenter defaultCenter] postNotificationName:noticeRoomUserOnlineStatusDidChanged object:parm]; [[NSNotificationCenter defaultCenter] postNotificationName:noticeRoomUserOnlineStatusDidChanged object:parm];
} }
@@ -649,6 +657,73 @@
} }
} }
break; break;
case QXRoomMessageTypeSingerRoomCurrentSongDidChanged:{
QXUserSongListModel *songInfo = [QXUserSongListModel yy_modelWithJSON:msg.Text[@"song_info"]];
if (self.delegate && [self.delegate respondsToSelector:@selector(singerSongCurrentSongInfoDidChanged:)]) {
[self.delegate singerSongCurrentSongInfoDidChanged:songInfo];
}
}
break;
case QXRoomMessageTypeSingerRoomNextSongDidChanged:{
QXUserSongListModel *songInfo = [QXUserSongListModel yy_modelWithJSON:msg.Text[@"next_song_info"]];
if (self.delegate && [self.delegate respondsToSelector:@selector(singerSongNextSongInfoDidChanged:)]) {
[self.delegate singerSongNextSongInfoDidChanged:songInfo];
}
}
break;
case QXRoomMessageTypeSingerRoomSongCountDidChanged:{
NSString *songCount = [NSString stringWithFormat:@"%@",msg.Text[@"count"]];
if (self.delegate && [self.delegate respondsToSelector:@selector(singerSongCountDidChanged:)]) {
[self.delegate singerSongCountDidChanged:songCount];
}
}
break;
case QXRoomMessageTypeCpJoinRoom:{
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
[[QXGiftPlayerManager shareManager] displayCpEffectView:model];
}
break;
case QXRoomMessageTypeStartSign:{
NSString *sign_id = [NSString stringWithFormat:@"%@",msg.Text[@"sign_id"]];
NSString *end_time = [NSString stringWithFormat:@"%@",msg.Text[@"end_time"]];
NSString *sign_day = [NSString stringWithFormat:@"%@",msg.Text[@"sign_day"]];
NSString *current_body_value = [NSString stringWithFormat:@"%@",msg.Text[@"current_body_value"]];
if (self.delegate && [self.delegate respondsToSelector:@selector(signDidStartWithEndTime:signId:signDay:signValue:)]) {
[self.delegate signDidStartWithEndTime:end_time signId:sign_id signDay:sign_day signValue:current_body_value];
}
}
break;
case QXRoomMessageTypeEndSign:{
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
NSString *sign_value = [NSString stringWithFormat:@"%@",msg.Text[@"sign_value"]];
if (self.delegate && [self.delegate respondsToSelector:@selector(signDidEndWithUserInfo1:userInfo2:sign_value:)]) {
[self.delegate signDidEndWithUserInfo1:model.FromUserInfo userInfo2:model.ToUserInfo sign_value:sign_value];
}
}
break;
case QXRoomMessageTypeDelaySignTime:{
NSString *end_time = [NSString stringWithFormat:@"%@",msg.Text[@"end_time"]];
if (self.delegate && [self.delegate respondsToSelector:@selector(signTimeDelayWithEndTime:)]) {
[self.delegate signTimeDelayWithEndTime:end_time];
}
}
break;
case QXRoomMessageTypeSignBodyPriceDidChanged:{
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
NSString *sign_id = [NSString stringWithFormat:@"%@",msg.Text[@"sign_id"]];
NSString *sign_value = [NSString stringWithFormat:@"%@",msg.Text[@"sign_value"]];
NSArray *sign_coin_list;
id object = msg.Text[@"sign_coin_list"];
if ([object isKindOfClass:[NSArray class]]) {
sign_coin_list = object;
}
if (self.delegate && [self.delegate respondsToSelector:@selector(signValueDidChangedWithSignUserInfo:sign_value:signId:sign_coin_list:)]) {
[self.delegate signValueDidChangedWithSignUserInfo:model.FromUserInfo sign_value:sign_value signId:sign_id sign_coin_list:sign_coin_list];
}
}
break;
default: default:
break; break;
} }
@@ -668,6 +743,46 @@
*/ */
-(void)reSendGiftWithId:(NSString*)giftId userId:(NSString*)userId{
MJWeakSelf
[QXMineNetwork userCpReSendWithGiftId:giftId userId:userId roomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
id object = dict[@"cp_type"];
if ([object isKindOfClass:[NSDictionary class]]) {
NSDictionary *cpDict = (NSDictionary *)object;
NSString *cp_type = object[@"cp_type"];
if (cp_type.intValue == 1) {
/// cp
NSString *jsonStr = [cpDict jsonStringEncoded];
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:(QXRoomMessageTypeSendAndRecieveCpHeartSignal) userId:userId];
}else if (cp_type.intValue == 2){
/// cp
NSString *jsonStr = [cpDict jsonStringEncoded];
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:(QXRoomMessageTypeCpHeartFinished) userId:userId];
NSString *message = [NSString stringWithFormat:@"%@",cpDict[@"text"]];
[weakSelf showCpFinishedAlertViewWithText:message];
}else{
}
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}
-(void)showCpFinishedAlertViewWithText:(NSString*)text{
QXCustomAlertView *alertView = [[QXCustomAlertView alloc] init];
[alertView showInView:KEYWINDOW title:@"缘定三生 此刻同心" message:text cancleTitle:@"稍后进入" commitTitle:@"进入心动空间"];
alertView.commitBlock = ^{
QXLOG(@"进入心动空间");
QXHeartBeatSpaceViewController *vc = [[QXHeartBeatSpaceViewController alloc] init];
QXRoomNavigationController *navagationController = (QXRoomNavigationController*)KEYWINDOW.rootViewController;
vc.userId = QXGlobal.shareGlobal.loginModel.user_id;
[navagationController pushViewController:vc animated:YES];
};
}
-(void)onRecvC2CTextMessage:(NSString *)msgID sender:(V2TIMUserInfo *)info text:(NSString *)text{ -(void)onRecvC2CTextMessage:(NSString *)msgID sender:(V2TIMUserInfo *)info text:(NSString *)text{
@@ -684,6 +799,23 @@
if (self.delegate && [self.delegate respondsToSelector:@selector(pkMuteRemoteAudio:fromUserInfo:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(pkMuteRemoteAudio:fromUserInfo:)]) {
[self.delegate pkMuteRemoteAudio:is_mute==1 fromUserInfo:model.FromUserInfo]; [self.delegate pkMuteRemoteAudio:is_mute==1 fromUserInfo:model.FromUserInfo];
} }
}else if (meesageType == QXRoomMessageTypeSendAndRecieveCpHeartSignal){
NSString *json = [NSString stringWithFormat:@"%@",msg.Text[@"text"]];
NSDictionary *dict = [json jsonValueDecoded];
NSString *message = [NSString stringWithFormat:@"%@",dict[@"text1"]];
__block NSString *gift_id = [NSString stringWithFormat:@"%@",dict[@"gift_id"]];
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
QXCustomAlertView *alertView = [[QXCustomAlertView alloc] init];
[alertView showInView:KEYWINDOW title:@"心动信号" message:message cancleTitle:@"再想想" commitTitle:@"回赠"];
MJWeakSelf
alertView.commitBlock = ^{
[weakSelf reSendGiftWithId:gift_id userId:model.FromUserInfo.user_id];
};
}else if (meesageType == QXRoomMessageTypeCpHeartFinished){
NSString *json = [NSString stringWithFormat:@"%@",msg.Text[@"text"]];
NSDictionary *dict = [json jsonValueDecoded];
NSString *message = [NSString stringWithFormat:@"%@",dict[@"text1"]];
[self showCpFinishedAlertViewWithText:message];
} }
} }
-(void)onRecvGroupCustomMessage:(NSString *)msgID groupID:(NSString *)groupID sender:(V2TIMGroupMemberInfo *)info customData:(NSData *)data{ -(void)onRecvGroupCustomMessage:(NSString *)msgID groupID:(NSString *)groupID sender:(V2TIMGroupMemberInfo *)info customData:(NSData *)data{
@@ -715,7 +847,7 @@
}else if (meesageType == QXRoomMessageTypeMuteLocalAudio){ }else if (meesageType == QXRoomMessageTypeMuteLocalAudio){
NSString *json = [NSString stringWithFormat:@"%@",msg.Text[@"text"]]; NSString *json = [NSString stringWithFormat:@"%@",msg.Text[@"text"]];
NSDictionary *dict = [json jsonValueDecoded]; NSDictionary *dict = [json jsonValueDecoded];
NSInteger is_mute = [[dict objectForKey:@"is_mute"] integerValue]; // NSInteger is_mute = [[dict objectForKey:@"is_mute"] integerValue];
QXUserHomeModel *userModel = [QXUserHomeModel yy_modelWithJSON:msg.Text[@"FromUserInfo"]]; QXUserHomeModel *userModel = [QXUserHomeModel yy_modelWithJSON:msg.Text[@"FromUserInfo"]];
AgoraRtcAudioVolumeInfo *userInfo = [[AgoraRtcAudioVolumeInfo alloc] init]; AgoraRtcAudioVolumeInfo *userInfo = [[AgoraRtcAudioVolumeInfo alloc] init];
userInfo.uid = userModel.user_id.longLongValue; userInfo.uid = userModel.user_id.longLongValue;
@@ -743,6 +875,8 @@
@"avatar":[QXGlobal shareGlobal].loginModel.avatar?[QXGlobal shareGlobal].loginModel.avatar:@"", @"avatar":[QXGlobal shareGlobal].loginModel.avatar?[QXGlobal shareGlobal].loginModel.avatar:@"",
@"icon":[QXGlobal shareGlobal].loginModel.icon?[QXGlobal shareGlobal].loginModel.icon:@"", @"icon":[QXGlobal shareGlobal].loginModel.icon?[QXGlobal shareGlobal].loginModel.icon:@"",
@"chat_bubble":[QXGlobal shareGlobal].loginModel.chat_bubble?:@"", @"chat_bubble":[QXGlobal shareGlobal].loginModel.chat_bubble?:@"",
@"nobility_image":[QXGlobal shareGlobal].loginModel.nobility_image?:@"",
@"nickname_color":[QXGlobal shareGlobal].loginModel.nickname_color?:@"",
}, },
@"text":message @"text":message
} }
@@ -756,6 +890,8 @@
userInfo.user_id = [QXGlobal shareGlobal].loginModel.user_id; userInfo.user_id = [QXGlobal shareGlobal].loginModel.user_id;
userInfo.icon = [QXGlobal shareGlobal].loginModel.icon; userInfo.icon = [QXGlobal shareGlobal].loginModel.icon;
userInfo.chat_bubble = [QXGlobal shareGlobal].loginModel.chat_bubble; userInfo.chat_bubble = [QXGlobal shareGlobal].loginModel.chat_bubble;
userInfo.nobility_image = [QXGlobal shareGlobal].loginModel.nobility_image;
userInfo.nickname_color = [QXGlobal shareGlobal].loginModel.nickname_color;
model.FromUserInfo = userInfo; model.FromUserInfo = userInfo;
model.messageType = QXRoomChatMessageTypeChat; model.messageType = QXRoomChatMessageTypeChat;
if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didInsertMessge:)]) {
@@ -783,6 +919,8 @@
@"avatar":[QXGlobal shareGlobal].loginModel.avatar?[QXGlobal shareGlobal].loginModel.avatar:@"", @"avatar":[QXGlobal shareGlobal].loginModel.avatar?[QXGlobal shareGlobal].loginModel.avatar:@"",
@"icon":[QXGlobal shareGlobal].loginModel.icon?[QXGlobal shareGlobal].loginModel.icon:@"", @"icon":[QXGlobal shareGlobal].loginModel.icon?[QXGlobal shareGlobal].loginModel.icon:@"",
@"chat_bubble":[QXGlobal shareGlobal].loginModel.chat_bubble?:@"", @"chat_bubble":[QXGlobal shareGlobal].loginModel.chat_bubble?:@"",
@"nobility_image":[QXGlobal shareGlobal].loginModel.nobility_image?:@"",
@"nickname_color":[QXGlobal shareGlobal].loginModel.nickname_color?:@"",
}, },
@"emoji":@{ @"emoji":@{
@"image":emoji.image?:@"", @"image":emoji.image?:@"",
@@ -799,6 +937,8 @@
userInfo.user_id = [QXGlobal shareGlobal].loginModel.user_id; userInfo.user_id = [QXGlobal shareGlobal].loginModel.user_id;
userInfo.icon = [QXGlobal shareGlobal].loginModel.icon; userInfo.icon = [QXGlobal shareGlobal].loginModel.icon;
userInfo.chat_bubble = [QXGlobal shareGlobal].loginModel.chat_bubble; userInfo.chat_bubble = [QXGlobal shareGlobal].loginModel.chat_bubble;
userInfo.nobility_image = [QXGlobal shareGlobal].loginModel.nobility_image;
userInfo.nickname_color = [QXGlobal shareGlobal].loginModel.nickname_color;
model.FromUserInfo = userInfo; model.FromUserInfo = userInfo;
model.messageType = QXRoomChatMessageTypeEmoji; model.messageType = QXRoomChatMessageTypeEmoji;
model.emoji = emoji; model.emoji = emoji;
@@ -843,9 +983,9 @@
[[V2TIMManager sharedInstance] sendMessage:message1 receiver:toUserId groupID:nil priority:(V2TIM_PRIORITY_HIGH) onlineUserOnly:YES offlinePushInfo:nil progress:^(uint32_t progress) { [[V2TIMManager sharedInstance] sendMessage:message1 receiver:toUserId groupID:nil priority:(V2TIM_PRIORITY_HIGH) onlineUserOnly:YES offlinePushInfo:nil progress:^(uint32_t progress) {
} succ:^{ } succ:^{
QXLOG(@"c2c发送成功");
} fail:^(int code, NSString * _Nullable desc) { } fail:^(int code, NSString * _Nullable desc) {
QXLOG(@"c2c发送失败");
}]; }];
} }
@end @end

View File

@@ -77,7 +77,7 @@
-(void)moreAction{ -(void)moreAction{
if (self.data.groupID.length>0) { if (self.data.groupID.length>0) {
QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init]; QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init];
vc.groupId = [self.data.groupID stringByReplacingOccurrencesOfString:@"g" withString:@""]; vc.groupId = self.data.groupID;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
}else{ }else{
QXMenuPopView *menuView = [[QXMenuPopView alloc] initWithPoint:CGPointMake(SCREEN_WIDTH-60, NavContentHeight+10)]; QXMenuPopView *menuView = [[QXMenuPopView alloc] initWithPoint:CGPointMake(SCREEN_WIDTH-60, NavContentHeight+10)];
@@ -103,6 +103,7 @@
} }
- (void)initSubViews{ - (void)initSubViews{
// TUIConversationListBaseDataProvider markConversationAsRead
[TUIChatConfig_Classic sharedConfig].delegate = self; [TUIChatConfig_Classic sharedConfig].delegate = self;
if (self.data.groupID.length>0) { if (self.data.groupID.length>0) {
TUIGroupChatViewController *vc = [[TUIGroupChatViewController alloc] init]; TUIGroupChatViewController *vc = [[TUIGroupChatViewController alloc] init];

View File

@@ -74,14 +74,15 @@
[self.view addSubview:vc.view]; [self.view addSubview:vc.view];
} }
-(void)reloadConversions{ -(void)reloadConversions{
[self.vc.view removeFromSuperview]; // [self.vc.view removeFromSuperview];
[self.vc removeFromParentViewController]; // [self.vc removeFromParentViewController];
self.vc = nil; // self.vc = nil;
self.vc = [[TUIConversationListController alloc] init]; // self.vc = [[TUIConversationListController alloc] init];
self.vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, self.view.height-NavContentHeight); // self.vc.view.frame = CGRectMake(0, NavContentHeight, SCREEN_WIDTH, self.view.height-NavContentHeight);
self.vc.tableViewForAll.tableHeaderView = self.topView; // self.vc.tableViewForAll.tableHeaderView = self.topView;
[self addChildViewController:self.vc]; // [self addChildViewController:self.vc];
[self.view addSubview:self.vc.view]; // [self.view addSubview:self.vc.view];
[self.vc reloadConversationList];
} }
- (void)conversationListController:(UIViewController *)conversationController - (void)conversationListController:(UIViewController *)conversationController
@@ -98,6 +99,7 @@
data.title = conversation.title; data.title = conversation.title;
data.faceUrl = conversation.faceUrl; data.faceUrl = conversation.faceUrl;
vc.data = data; vc.data = data;
[self.vc.dataProvider markConversationAsRead:conversation];
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
// } // }

View File

@@ -8,9 +8,10 @@
#import "QXSystemNoticeViewController.h" #import "QXSystemNoticeViewController.h"
#import "QXSystemNoticeCell.h" #import "QXSystemNoticeCell.h"
#import "QXSystemMessageCell.h" #import "QXSystemMessageCell.h"
#import "QXSystemMessageHandleCell.h"
#import "QXMessageServices.h" #import "QXMessageServices.h"
#import "AppDelegate.h" #import "AppDelegate.h"
@interface QXSystemNoticeViewController ()<UITableViewDataSource,UITableViewDelegate> @interface QXSystemNoticeViewController ()<UITableViewDataSource,UITableViewDelegate,QXSystemMessageHandleCellDelegate>
@property (nonatomic,strong)UITableView *tableView; @property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,assign)CGFloat rowHeight; @property (nonatomic,assign)CGFloat rowHeight;
@end @end
@@ -78,12 +79,22 @@
cell.model = self.dataArray[indexPath.row]; cell.model = self.dataArray[indexPath.row];
return cell; return cell;
}else{ }else{
QXSystemMessageCell *cell = [QXSystemMessageCell cellWithTableView:tableView]; QXMessageListModel *model = self.dataArray[indexPath.row];
cell.model = self.dataArray[indexPath.row]; if (model.type.intValue == 6) {
return cell; QXSystemMessageHandleCell *cell = [QXSystemMessageHandleCell cellWithTableView:tableView];
cell.model = model;
cell.delegate = self;
return cell;
}else{
QXSystemMessageCell *cell = [QXSystemMessageCell cellWithTableView:tableView];
cell.model = model;
return cell;
}
} }
} }
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
QXMessageListModel *model = self.dataArray[indexPath.row]; QXMessageListModel *model = self.dataArray[indexPath.row];
if (model.room_id.integerValue > 0) { if (model.room_id.integerValue > 0) {
@@ -97,13 +108,22 @@
} }
} }
-(void)handleInviteIsAgree:(BOOL)isAgree message:(nonnull QXMessageListModel *)message{
MJWeakSelf
[QXMessageServices guildInviteApplyHandleWithApplyId:message.id type:isAgree?@"1":@"2" successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"操作成功");
weakSelf.page = 1;
[weakSelf getMessageList];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}];
}
-(UITableView *)tableView{ -(UITableView *)tableView{
if (!_tableView) { if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight) style:(UITableViewStylePlain)]; _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight) style:(UITableViewStylePlain)];
_tableView.dataSource = self; _tableView.dataSource = self;
_tableView.delegate = self; _tableView.delegate = self;
_tableView.backgroundColor = [UIColor clearColor]; _tableView.backgroundColor = [UIColor clearColor];
_tableView.rowHeight = 60;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.rowHeight = UITableViewAutomaticDimension; _tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = self.rowHeight; _tableView.estimatedRowHeight = self.rowHeight;

View File

@@ -40,6 +40,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong,nonatomic)NSString *image; @property (strong,nonatomic)NSString *image;
@property (strong,nonatomic)NSString *url; @property (strong,nonatomic)NSString *url;
/// 公会邀请处理状态 0未处理 1已通过 2已拒绝
@property (strong,nonatomic)NSString *guild_invited_status;
@property (strong,nonatomic)NSString *room_id; @property (strong,nonatomic)NSString *room_id;
@end @end

View File

@@ -31,6 +31,13 @@ NS_ASSUME_NONNULL_BEGIN
+(void)getMessageWithId:(NSString*)Id +(void)getMessageWithId:(NSString*)Id
successBlock:(void (^)(QXMessageListModel *model))successBlock successBlock:(void (^)(QXMessageListModel *model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock; failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
消息工会邀请处理
*/
+(void)guildInviteApplyHandleWithApplyId:(NSString*)applyId
type:(NSString*)type
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -48,4 +48,24 @@
failBlock(error,msg); failBlock(error,msg);
}]; }];
} }
/**
*/
+(void)guildInviteApplyHandleWithApplyId:(NSString*)applyId
type:(NSString*)type
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"apply_id":applyId?:@"",
@"type":type?type:@""
};
[[QXRequset shareInstance] postWithUrl:QXGuildInviteApplyHandle parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
@end @end

View File

@@ -0,0 +1,32 @@
//
// QXSystemMessageHandleCell.h
// QXLive
//
// Created by 启星 on 2025/11/22.
//
#import <UIKit/UIKit.h>
#import "QXMessageModel.h"
NS_ASSUME_NONNULL_BEGIN
@protocol QXSystemMessageHandleCellDelegate <NSObject>
@optional
-(void)handleInviteIsAgree:(BOOL)isAgree message:(QXMessageListModel*)message;
@end
@interface QXSystemMessageHandleCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIButton *cancelBtn;
@property (weak, nonatomic) IBOutlet UIButton *commitBtn;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIButton *stateBtn;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) id<QXSystemMessageHandleCellDelegate> delegate;
@property (nonatomic,strong)QXMessageListModel *model;
+(instancetype)cellWithTableView:(UITableView *)tableView;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,66 @@
//
// QXSystemMessageHandleCell.m
// QXLive
//
// Created by on 2025/11/22.
//
#import "QXSystemMessageHandleCell.h"
@implementation QXSystemMessageHandleCell
+(instancetype)cellWithTableView:(UITableView *)tableView{
static NSString *cellId = @"QXSystemMessageHandleCell";
QXSystemMessageHandleCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
if (!cell) {
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
cell.backgroundColor = [UIColor clearColor];
}
return cell;
}
-(void)setModel:(QXMessageListModel *)model{
_model = model;
self.contentLabel.text = model.content;
NSDate *date = [NSDate dateWithTimeIntervalSince1970:model.createtime.longLongValue]; //,1000 , 1000
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
NSString*time = [formatter stringFromDate:date];
self.timeLabel.text = time;
if (model.guild_invited_status.intValue == 0) {
self.cancelBtn.hidden = NO;
self.commitBtn.hidden = NO;
self.stateBtn.hidden = YES;
}else if (model.guild_invited_status.intValue == 1){
self.cancelBtn.hidden = YES;
self.commitBtn.hidden = YES;
self.stateBtn.hidden = NO;
self.stateBtn.selected = NO;
}else if (model.guild_invited_status.intValue == 2){
self.cancelBtn.hidden = YES;
self.commitBtn.hidden = YES;
self.stateBtn.hidden = NO;
self.stateBtn.selected = YES;
}
}
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (IBAction)cancelAction:(id)sender {
if (self.delegate && [self.delegate respondsToSelector:@selector(handleInviteIsAgree:message:)]) {
[self.delegate handleInviteIsAgree:NO message:self.model];
}
}
- (IBAction)commitAction:(id)sender {
if (self.delegate && [self.delegate respondsToSelector:@selector(handleInviteIsAgree:message:)]) {
[self.delegate handleInviteIsAgree:YES message:self.model];
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="230" id="KGk-i7-Jjw" customClass="QXSystemMessageHandleCell">
<rect key="frame" x="0.0" y="0.0" width="535" height="230"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="535" height="230"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2023-12-12 12:11:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k89-mp-kfb">
<rect key="frame" x="16" y="12" width="503" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="ZLC-vO-7Au"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2eO-sZ-nQk">
<rect key="frame" x="16" y="46" width="503" height="184"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="【某某传媒·粉丝狂欢】今晚22点已开启嗨玩三重奏不仅有才艺舞台还有分组pk,粉丝互动环节等你来~" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xZb-cE-pmT">
<rect key="frame" x="10" y="40" width="483" height="74"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.20000001789999999" green="0.20000001789999999" blue="0.20000001789999999" alpha="0.84705883260000003" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="公会通知" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QNa-NX-Jv7">
<rect key="frame" x="10" y="12" width="483" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="bP9-Yu-qHk"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.20000001789999999" green="0.20000001789999999" blue="0.20000001789999999" alpha="0.84705883260000003" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TYD-pk-Hrj">
<rect key="frame" x="136.66666666666666" y="130" width="110" height="42"/>
<color key="backgroundColor" red="0.95294117647058818" green="0.95294117647058818" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="110" id="Och-3b-hUb"/>
<constraint firstAttribute="height" constant="42" id="ivE-DC-HsD"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="取消">
<color key="titleColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="21"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="cancelAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="iK3-mS-a91"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sR8-oC-oyN">
<rect key="frame" x="254.66666666666669" y="130" width="110" height="42"/>
<color key="backgroundColor" red="0.22745099663734436" green="0.73725497722625732" blue="0.42745098471641541" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="Zhk-jD-xb4"/>
<constraint firstAttribute="width" constant="110" id="s21-Na-Sk1"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="确认">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="21"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="commitAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="uFS-cO-2IB"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Svn-Qm-TJa">
<rect key="frame" x="196.66666666666666" y="130" width="109.99999999999997" height="42"/>
<color key="backgroundColor" red="0.95294117649999999" green="0.95294117649999999" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="TDD-P4-OBJ"/>
<constraint firstAttribute="width" constant="110" id="dqr-GS-Ytb"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="已同意">
<color key="titleColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
</state>
<state key="selected" title="已拒绝"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="21"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="sR8-oC-oyN" firstAttribute="leading" secondItem="TYD-pk-Hrj" secondAttribute="trailing" constant="8" id="4sX-G8-MLB"/>
<constraint firstAttribute="trailing" secondItem="xZb-cE-pmT" secondAttribute="trailing" constant="10" id="9Cz-Jd-aIT"/>
<constraint firstItem="QNa-NX-Jv7" firstAttribute="leading" secondItem="2eO-sZ-nQk" secondAttribute="leading" constant="10" id="EIT-LE-qbh"/>
<constraint firstItem="Svn-Qm-TJa" firstAttribute="centerY" secondItem="TYD-pk-Hrj" secondAttribute="centerY" id="Edo-KK-EQ7"/>
<constraint firstAttribute="trailing" secondItem="QNa-NX-Jv7" secondAttribute="trailing" constant="10" id="Fe4-Ge-oSe"/>
<constraint firstItem="TYD-pk-Hrj" firstAttribute="top" secondItem="xZb-cE-pmT" secondAttribute="bottom" constant="16" id="GtC-Uu-kKb"/>
<constraint firstItem="sR8-oC-oyN" firstAttribute="centerY" secondItem="TYD-pk-Hrj" secondAttribute="centerY" id="am3-th-Di3"/>
<constraint firstItem="Svn-Qm-TJa" firstAttribute="centerX" secondItem="2eO-sZ-nQk" secondAttribute="centerX" id="kd5-ej-naZ"/>
<constraint firstItem="TYD-pk-Hrj" firstAttribute="centerX" secondItem="2eO-sZ-nQk" secondAttribute="centerX" constant="-60" id="sls-gP-EjX"/>
<constraint firstItem="QNa-NX-Jv7" firstAttribute="top" secondItem="2eO-sZ-nQk" secondAttribute="top" constant="12" id="tP9-5g-9RB"/>
<constraint firstAttribute="bottom" secondItem="TYD-pk-Hrj" secondAttribute="bottom" constant="12" id="uyc-Hk-XVM"/>
<constraint firstItem="xZb-cE-pmT" firstAttribute="top" secondItem="QNa-NX-Jv7" secondAttribute="bottom" constant="10" id="xQu-UD-KuR"/>
<constraint firstItem="xZb-cE-pmT" firstAttribute="leading" secondItem="2eO-sZ-nQk" secondAttribute="leading" constant="10" id="zJN-Y2-dxN"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="2eO-sZ-nQk" secondAttribute="bottom" id="59c-Mm-R9s"/>
<constraint firstItem="2eO-sZ-nQk" firstAttribute="top" secondItem="k89-mp-kfb" secondAttribute="bottom" constant="16" id="8Zq-uc-eqs"/>
<constraint firstItem="k89-mp-kfb" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="EYh-y9-4Tq"/>
<constraint firstAttribute="trailing" secondItem="k89-mp-kfb" secondAttribute="trailing" constant="16" id="Taz-Qy-KeI"/>
<constraint firstItem="k89-mp-kfb" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="12" id="auE-x8-0Qt"/>
<constraint firstItem="2eO-sZ-nQk" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="cuK-3y-fHc"/>
<constraint firstAttribute="trailing" secondItem="2eO-sZ-nQk" secondAttribute="trailing" constant="16" id="nFh-Ct-lOl"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
<connections>
<outlet property="cancelBtn" destination="TYD-pk-Hrj" id="Gac-yn-ujG"/>
<outlet property="commitBtn" destination="sR8-oC-oyN" id="NHC-ja-haS"/>
<outlet property="contentLabel" destination="xZb-cE-pmT" id="uxF-Q5-zRi"/>
<outlet property="stateBtn" destination="Svn-Qm-TJa" id="DmT-JH-rzM"/>
<outlet property="timeLabel" destination="k89-mp-kfb" id="C8p-G4-gfQ"/>
<outlet property="titleLabel" destination="QNa-NX-Jv7" id="9gp-1x-ru9"/>
</connections>
<point key="canvasLocation" x="303.05343511450383" y="85.91549295774648"/>
</tableViewCell>
</objects>
</document>

View File

@@ -29,19 +29,31 @@
#import "QXInviteViewController.h" #import "QXInviteViewController.h"
#import "QXChatViewController.h" #import "QXChatViewController.h"
#import "QXWalletRuleView.h" #import "QXWalletRuleView.h"
#import "QXRechargeViewcController.h"
#import "QXGiftWallViewController.h"
#import "QXNobilityViewController.h"
#import "QXHomePageNetwork.h"
#import "QXRoomSingerAuthViewController.h"
#import "QXMineSongListViewController.h"
#import "QXIntimateViewController.h"
#import "QXBodyPriceRuleView.h"
#import "QXFamilyViewController.h"
#import <WXApi.h>
@interface QXMineViewController ()<UITableViewDelegate,UITableViewDataSource,QXMineServiceCellDelegate,QXMainHeaderViewDelegate> @interface QXMineViewController ()<UITableViewDelegate,UITableViewDataSource,QXMineServiceCellDelegate,QXMainHeaderViewDelegate>
@property (nonatomic,strong)QXMainHeaderView *tableHeaderView; @property (nonatomic,strong)QXMainHeaderView *tableHeaderView;
@property (nonatomic,strong)UITableView *tableView; @property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UIButton *redbagBtn; //@property (nonatomic,strong)UIButton *redbagBtn;
@property (nonatomic,strong)UIButton *serviceBtn; //@property (nonatomic,strong)UIButton *serviceBtn;
@property (nonatomic,strong)UIButton *settingBtn; //@property (nonatomic,strong)UIButton *settingBtn;
@property (nonatomic,strong)QXUserModel *userModel; @property (nonatomic,strong)QXUserModel *userModel;
@property (nonatomic,strong)NSMutableArray *bannerArry;
@end @end
@implementation QXMineViewController @implementation QXMineViewController
- (void)viewDidLoad { - (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
@@ -50,78 +62,135 @@
[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]; [self.tableHeaderView reloadData];
if (QXGlobal.shareGlobal.isOpenRecharge) {
self.redbagBtn.hidden = NO;
}else{
self.redbagBtn.hidden = YES;
}
} }
- (void)initSubViews{ - (void)initSubViews{
[self updateBgImage:@"app_home_bg"];
self.tableView.tableHeaderView = self.tableHeaderView; self.tableView.tableHeaderView = self.tableHeaderView;
[self.view addSubview:self.tableView]; [self.view addSubview:self.tableView];
[self.view addSubview:self.settingBtn]; // [self.view addSubview:self.settingBtn];
[self.view addSubview:self.serviceBtn]; // [self.view addSubview:self.serviceBtn];
[self.view addSubview:self.redbagBtn]; // [self.view addSubview:self.redbagBtn];
[self.settingBtn mas_makeConstraints:^(MASConstraintMaker *make) { // [self.settingBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kSafeAreaTop +10); // make.top.mas_equalTo(kSafeAreaTop +10);
make.right.mas_equalTo(-10); // make.right.mas_equalTo(-10);
make.width.height.mas_equalTo(30); // make.width.height.mas_equalTo(30);
}]; // }];
//
[self.serviceBtn mas_makeConstraints:^(MASConstraintMaker *make) { // [self.serviceBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(30); // make.width.height.mas_equalTo(30);
make.centerY.equalTo(self.settingBtn); // make.centerY.equalTo(self.settingBtn);
make.right.equalTo(self.settingBtn.mas_left).offset(-10); // make.right.equalTo(self.settingBtn.mas_left).offset(-10);
}]; // }];
[self.redbagBtn mas_makeConstraints:^(MASConstraintMaker *make) { // [self.redbagBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.serviceBtn.mas_left).offset(-10); // make.right.equalTo(self.serviceBtn.mas_left).offset(-10);
make.centerY.width.height.equalTo(self.settingBtn); // make.centerY.width.height.equalTo(self.settingBtn);
}]; // }];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(passwordDidChanged) name:noticeChangePassword object:nil]; [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(passwordDidChanged) name:noticeChangePassword object:nil];
[self getBanner];
} }
-(void)getUserInfo{ -(void)getUserInfo{
MJWeakSelf MJWeakSelf
[QXMineNetwork getMineInfoSuccessBlock:^(QXUserModel * _Nonnull userModel) { [QXMineNetwork getMineInfoSuccessBlock:^(QXUserModel * _Nonnull userModel) {
weakSelf.userModel = userModel; weakSelf.userModel = userModel;
weakSelf.tableHeaderView.userModel = userModel; weakSelf.tableHeaderView.userModel = userModel;
[weakSelf.tableView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
[QXMineNetwork getWalletInfoSuccessBlock:^(NSString * _Nonnull coin, NSString * _Nonnull earnings, NSString * _Nonnull title, NSString * _Nonnull url) {
weakSelf.tableHeaderView.coin = coin;
weakSelf.tableHeaderView.earnings = earnings;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}]; }];
} }
#pragma mark - QXMineServiceCellDelegate #pragma mark - QXMineServiceCellDelegate
-(void)didClickServiceWithBtn:(UIButton *)button title:(NSString *)title{ -(void)didClickServiceWithType:(QXMineServiceType)type{
UIViewController *vc; switch (type) {
if ([title isEqualToString:QXText(@"道具商城")]) { case QXMineServiceTypeLevel:{
vc = [[QXPropShopViewController alloc] init]; QXLevelViewController *vc = [[QXLevelViewController alloc] init];
}else if([title isEqualToString:QXText(@"段位")]){ [self.navigationController pushViewController:vc animated:YES];
vc = [[QXLevelViewController alloc] init];
}else if([title isEqualToString:QXText(@"公会中心")]){
vc = [[QXGuildViewController alloc] init];
}else if([title isEqualToString:QXText(@"个性装扮")]){
vc = [[QXDressViewController alloc] init];
}else if([title isEqualToString:QXText(@"我的背包")]){
vc = [[QXBackpackViewController alloc] init];
}else if([title isEqualToString:QXText(@"每日任务")]){
vc = [[QXTaskViewController alloc] init];
}else if([title isEqualToString:QXText(@"钱包")]){
BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:kWalletRuleHide];
if (result) {
vc = [[QXWalletViewController alloc] init];
}else{
QXWalletRuleView *ruleView = [[QXWalletRuleView alloc] init];
MJWeakSelf
ruleView.toWalletBlock = ^{
QXWalletViewController*vc = [[QXWalletViewController alloc] init];
[weakSelf.navigationController pushViewController:vc animated:YES];
};
[ruleView showInView:self.view];
return;
} }
break;
case QXMineServiceTypeDress:{
QXDressViewController *vc = [[QXDressViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMineServiceTypeBackpack:{
QXBackpackViewController *vc = [[QXBackpackViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMineServiceTypeSetting:{
[self gotoSetting];
}
break;
case QXMineServiceTypeFamily:{
QXLOG(@"跳转家族");
QXFamilyViewController *vc = [[QXFamilyViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMineServiceTypeHelp:{
[self gotoService];
}
break;
case QXMineServiceTypeInvite:{
[self gotoInvite];
}
break;
case QXMineServiceTypeDayTask:{
QXTaskViewController *vc = [[QXTaskViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMineServiceTypeReport:{
[self gotoService];
}
break;
case QXMineServiceTypeCustomerService:{
WXOpenCustomerServiceReq *req = [[WXOpenCustomerServiceReq alloc] init];
req.corpid = @"ww1de4300858c0b461";
req.url = @"https://work.weixin.qq.com/kfid/kfcb3d23a59c188a0e7";
[WXApi sendReq:req completion:nil];
}
break;
case QXMineServiceTypeSingerAuth:{
QXLOG(@"点击了歌手认证");
MJWeakSelf
if (![QXGlobal shareGlobal].isRealName) {
QXLOG(@"未实名,弹出实名认证");
QXRealNamePopView *v = [[QXRealNamePopView alloc] init];
v.closeActionBlock = ^{
[[QXGlobal shareGlobal] hideViewBlock:^{}];
};
v.authActionBlock = ^{
[[QXGlobal shareGlobal] hideViewBlock:^{
QXRoomSingerAuthViewController *vc = [[QXRoomSingerAuthViewController alloc] init];
vc.singer_status = weakSelf.userModel.singer_status;
[weakSelf.navigationController pushViewController:vc animated:YES];
}];
};
[[QXGlobal shareGlobal] showView:v popType:(PopViewTypePopFromCenter) tapDismiss:NO finishBlock:^{}];
}else{
QXMyRoomViewController *vc = [[QXMyRoomViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
}
break;
case QXMineServiceTypeSongList:{
QXLOG(@"我的歌单");
QXMineSongListViewController *vc = [[QXMineSongListViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
default:
break;
} }
[self.navigationController pushViewController:vc animated:YES];
QXLOG(@"点击了%@",title);
} }
-(void)didClickOptionType:(QXMainHeaderOptionType)type{ -(void)didClickOptionType:(QXMainHeaderOptionType)type{
MJWeakSelf MJWeakSelf
@@ -140,12 +209,63 @@
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
break; break;
case QXMainHeaderOptionTypeRealName:{ case QXMainHeaderOptionTypeNobility:{
QXLOG(@"跳转实名认证"); QXLOG(@"跳转贵族");
QXNobilityViewController *vc = [[QXNobilityViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
} }
break; break;
case QXMainHeaderOptionTypeAnchorCenter:{ case QXMainHeaderOptionTypeRecharge:{
QXLOG(@"跳转主播中心"); QXLOG(@"跳转充值");
QXRechargeViewcController *vc = [[QXRechargeViewcController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMainHeaderOptionTypeShop:{
QXLOG(@"跳转商城");
QXPropShopViewController *vc = [[QXPropShopViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMainHeaderOptionTypeGuild:{
QXLOG(@"跳转公会");
QXGuildViewController *vc = [[QXGuildViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMainHeaderOptionTypeFriend:{
QXLOG(@"跳转挚友");
QXIntimateViewController *vc = [[QXIntimateViewController alloc] init];
vc.userId = QXGlobal.shareGlobal.loginModel.user_id;
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMainHeaderOptionTypeGiftWall:{
QXLOG(@"跳转礼物墙");
QXGiftWallViewController *vc = [[QXGiftWallViewController alloc] init];
vc.userId = [QXGlobal shareGlobal].loginModel.user_id;
[self.navigationController pushViewController:vc animated:YES];
}
break;
case QXMainHeaderOptionTypeBodyPrice:{
[QXBodyPriceRuleView showInView:self.view currentBodyValue:self.userModel.market_value coin:self.userModel.market_value_coin bodyValue:self.userModel.market_value_market];
}
break;
case QXMainHeaderOptionTypeWallet:{
QXLOG(@"跳转钱包");
BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:kWalletRuleHide];
if (result) {
QXWalletViewController * vc = [[QXWalletViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}else{
QXWalletRuleView *ruleView = [[QXWalletRuleView alloc] init];
MJWeakSelf
ruleView.toWalletBlock = ^{
QXWalletViewController*vc = [[QXWalletViewController alloc] init];
[weakSelf.navigationController pushViewController:vc animated:YES];
};
[ruleView showInView:self.view];
}
} }
break; break;
case QXMainHeaderOptionTypeRoom:{ case QXMainHeaderOptionTypeRoom:{
@@ -198,18 +318,43 @@
#pragma mark - UITableViewDelegate,UITableViewDataSource #pragma mark - UITableViewDelegate,UITableViewDataSource
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1; return 2;
} }
-(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]; cell.singerIsAuth = self.userModel.singer_status.intValue==1;
if (indexPath.row == 0) {
cell.isMore = NO;
}else{
cell.isMore = YES;
}
return cell; return cell;
} }
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 0) {
// return ScaleWidth(168);
return ScaleWidth(110);
}else{
// if (QXGlobal.shareGlobal.isOpenRecharge) {
return ScaleWidth(168);
// }else{
// return ScaleWidth(110);
// }
}
}
-(void)getBanner{
MJWeakSelf
[QXHomePageNetwork homeBannerWithType:@"6" successBlock:^(NSArray<QXBanner *> * _Nonnull list) {
weakSelf.tableHeaderView.bannerArray = list;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)gotoSetting{ -(void)gotoSetting{
QXSettingViewController *vc = [[QXSettingViewController alloc] init]; QXSettingViewController *vc = [[QXSettingViewController alloc] init];
vc.haveNobility = self.userModel.is_hide.intValue == 1;
MJWeakSelf MJWeakSelf
vc.logOutBlock = ^(BOOL isCancel) { vc.logOutBlock = ^(BOOL isCancel) {
if (isCancel) { if (isCancel) {
@@ -220,7 +365,7 @@
}; };
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
-(void)gotoRedbag{ -(void)gotoInvite{
QXInviteViewController *vc = [[QXInviteViewController alloc] init]; QXInviteViewController *vc = [[QXInviteViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
@@ -262,49 +407,54 @@
-(QXMainHeaderView *)tableHeaderView{ -(QXMainHeaderView *)tableHeaderView{
if (!_tableHeaderView) { if (!_tableHeaderView) {
_tableHeaderView = [[QXMainHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 230+12-67+ScaleWidth(67))]; _tableHeaderView = [[QXMainHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 0)];
_tableHeaderView.height = _tableHeaderView.getHeight;
_tableHeaderView.delegate = self; _tableHeaderView.delegate = self;
} }
return _tableHeaderView; return _tableHeaderView;
} }
-(UITableView *)tableView{ -(UITableView *)tableView{
if (!_tableView) { if (!_tableView) {
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-TabbarContentHeight-kSafeAreaTop) style:UITableViewStylePlain]; self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-TabbarContentHeight) style:UITableViewStylePlain];
self.tableView.backgroundColor = [UIColor clearColor]; self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.delegate = self; self.tableView.delegate = self;
self.tableView.dataSource = self; self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.rowHeight = 164;
} }
return _tableView; return _tableView;
} }
-(UIButton *)settingBtn{ -(NSMutableArray *)bannerArry{
if (!_settingBtn) { if (!_bannerArry) {
_settingBtn = [[UIButton alloc] init]; _bannerArry = [NSMutableArray array];
[_settingBtn setImage:[UIImage imageNamed:@"mine_setting"] forState:UIControlStateNormal];
[_settingBtn setImage:[UIImage imageNamed:@"mine_setting"] forState:UIControlStateHighlighted];
[_settingBtn addTarget:self action:@selector(gotoSetting) forControlEvents:UIControlEventTouchUpInside];
} }
return _settingBtn; return _bannerArry;
}
- (UIButton *)redbagBtn {
if (!_redbagBtn) {
_redbagBtn = [[UIButton alloc] init];
[_redbagBtn setImage:[UIImage imageNamed:@"mine_redbag"] forState:UIControlStateNormal];
[_redbagBtn setImage:[UIImage imageNamed:@"mine_redbag"] forState:UIControlStateHighlighted];
[_redbagBtn addTarget:self action:@selector(gotoRedbag) forControlEvents:UIControlEventTouchUpInside];
}
return _redbagBtn;
}
- (UIButton *)serviceBtn {
if (!_serviceBtn) {
_serviceBtn = [[UIButton alloc] init];
[_serviceBtn setImage:[UIImage imageNamed:@"mine_service"] forState:UIControlStateNormal];
[_serviceBtn setImage:[UIImage imageNamed:@"mine_service"] forState:UIControlStateHighlighted];
[_serviceBtn addTarget:self action:@selector(gotoService) forControlEvents:UIControlEventTouchUpInside];
}
return _serviceBtn;
} }
//-(UIButton *)settingBtn{
// if (!_settingBtn) {
// _settingBtn = [[UIButton alloc] init];
// [_settingBtn setImage:[UIImage imageNamed:@"mine_setting"] forState:UIControlStateNormal];
// [_settingBtn setImage:[UIImage imageNamed:@"mine_setting"] forState:UIControlStateHighlighted];
// [_settingBtn addTarget:self action:@selector(gotoSetting) forControlEvents:UIControlEventTouchUpInside];
// }
// return _settingBtn;
//}
//- (UIButton *)redbagBtn {
// if (!_redbagBtn) {
// _redbagBtn = [[UIButton alloc] init];
// [_redbagBtn setImage:[UIImage imageNamed:@"mine_redbag"] forState:UIControlStateNormal];
// [_redbagBtn setImage:[UIImage imageNamed:@"mine_redbag"] forState:UIControlStateHighlighted];
// [_redbagBtn addTarget:self action:@selector(gotoRedbag) forControlEvents:UIControlEventTouchUpInside];
// }
// return _redbagBtn;
//}
//
//- (UIButton *)serviceBtn {
// if (!_serviceBtn) {
// _serviceBtn = [[UIButton alloc] init];
// [_serviceBtn setImage:[UIImage imageNamed:@"mine_service"] forState:UIControlStateNormal];
// [_serviceBtn setImage:[UIImage imageNamed:@"mine_service"] forState:UIControlStateHighlighted];
// [_serviceBtn addTarget:self action:@selector(gotoService) forControlEvents:UIControlEventTouchUpInside];
// }
// return _serviceBtn;
//}
@end @end

View File

@@ -16,6 +16,8 @@
#import "QXCreatPhotosViewController.h" #import "QXCreatPhotosViewController.h"
#import "QXMineNetwork.h" #import "QXMineNetwork.h"
#import "QXPhotosDetailVC.h" #import "QXPhotosDetailVC.h"
#import "QXIntimateContentView.h"
#import "QXHeartBeatSpaceViewController.h"
@interface QXUserHomePageViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,SDCycleScrollViewDelegate> @interface QXUserHomePageViewController ()<JXCategoryViewDelegate,JXPagerViewDelegate,SDCycleScrollViewDelegate>
@property (nonatomic,strong)UIImageView * backgourdImageView; @property (nonatomic,strong)UIImageView * backgourdImageView;
@@ -27,6 +29,7 @@
@property (nonatomic, strong) JXCategoryTitleView *categoryView; @property (nonatomic, strong) JXCategoryTitleView *categoryView;
@property (nonatomic, strong) NSArray <NSString *> *titles; @property (nonatomic, strong) NSArray <NSString *> *titles;
@property (nonatomic, assign)CGRect cycleScrollViewFrame; @property (nonatomic, assign)CGRect cycleScrollViewFrame;
@property (nonatomic, strong)QXUserHomeModel *userModel;
@end @end
@implementation QXUserHomePageViewController @implementation QXUserHomePageViewController
@@ -38,12 +41,15 @@
-(void)viewWillAppear:(BOOL)animated{ -(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES]; [self.navigationController setNavigationBarHidden:NO animated:YES];
[self.headerView headerStartPlay];
} }
-(void)setNavgationItems{ -(void)setNavgationItems{
[super setNavgationItems]; [super setNavgationItems];
self.navigationController.navigationBar.backgroundColor = [UIColor clearColor]; self.navigationController.navigationBar.backgroundColor = [UIColor clearColor];
} }
- (void)initSubViews{ - (void)initSubViews{
self.bgImageHidden = YES;
self.view.backgroundColor = RGB16(0xF3F3F3);
self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, self.view.width, 121+NavContentHeight+16) delegate:self placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]]; self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, self.view.width, 121+NavContentHeight+16) delegate:self placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
self.cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill; self.cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
@@ -57,14 +63,14 @@
self.cycleScrollViewFrame = self.backgourdImageView.frame; self.cycleScrollViewFrame = self.backgourdImageView.frame;
[self.view addSubview:self.backgourdImageView]; [self.view addSubview:self.backgourdImageView];
self.titles = @[QXText(@"动态"),QXText(@"礼物墙"),QXText(@"我的相册")]; self.titles = @[QXText(@"动态"),QXText(@"挚友"),QXText(@"我的相册")];
_categoryView = [[JXCategoryTitleView alloc] init]; _categoryView = [[JXCategoryTitleView alloc] init];
self.categoryView.frame = CGRectMake(0, 0, 200, 48); self.categoryView.frame = CGRectMake(0, 0, 200, 48);
self.categoryView.titles = self.titles; self.categoryView.titles = self.titles;
self.categoryView.delegate = self; self.categoryView.delegate = self;
self.categoryView.titleSelectedColor = QXConfig.textColor; self.categoryView.titleSelectedColor = QXConfig.textColor;
self.categoryView.titleColor = RGB16(0x666666); self.categoryView.titleColor = RGB16(0x666666);
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:12]; self.categoryView.titleFont = [UIFont boldSystemFontOfSize:14];
self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:16]; self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:16];
self.categoryView.titleColorGradientEnabled = YES; self.categoryView.titleColorGradientEnabled = YES;
self.categoryView.titleLabelZoomEnabled = YES; self.categoryView.titleLabelZoomEnabled = YES;
@@ -86,10 +92,12 @@
_pagingView.mainTableView.backgroundColor = [UIColor clearColor]; _pagingView.mainTableView.backgroundColor = [UIColor clearColor];
self.pagingView.backgroundColor = [UIColor clearColor]; self.pagingView.backgroundColor = [UIColor clearColor];
[self.view addSubview:self.pagingView]; [self.view addSubview:self.pagingView];
self.cycleScrollView.hidden = YES;
self.backgourdImageView.hidden = YES;
self.categoryView.hidden = YES;
self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView; self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
self.navigationController.interactivePopGestureRecognizer.enabled = (self.categoryView.selectedIndex == 0); // self.navigationController.interactivePopGestureRecognizer.enabled = (self.categoryView.selectedIndex == 0);
// self.backBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, kSafeAreaTop, 40, 40)]; // self.backBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, kSafeAreaTop, 40, 40)];
@@ -106,7 +114,18 @@
-(void)getUserInfo{ -(void)getUserInfo{
MJWeakSelf MJWeakSelf
[QXMineNetwork userHomePageWithUserId:self.user_id successBlock:^(QXUserHomeModel * _Nonnull userModel) { [QXMineNetwork userHomePageWithUserId:self.user_id successBlock:^(QXUserHomeModel * _Nonnull userModel) {
weakSelf.userModel = userModel;
weakSelf.headerView.hidden = NO;
weakSelf.headerView.model = userModel; weakSelf.headerView.model = userModel;
if (weakSelf.userModel.cp_info != nil) {
weakSelf.headerView.height = 243+ScaleWidth(40)+8+ScaleWidth(100)+14;
}else{
weakSelf.headerView.height = 243+ScaleWidth(40)+8;
}
[weakSelf.pagingView resizeTableHeaderViewHeightWithAnimatable:NO duration:0.1 curve:UIViewAnimationCurveLinear];
weakSelf.cycleScrollView.hidden = NO;
weakSelf.backgourdImageView.hidden = NO;
weakSelf.categoryView.hidden = NO;
NSArray *imgs; NSArray *imgs;
if (userModel.home_bgimages.length > 0) { if (userModel.home_bgimages.length > 0) {
imgs = [userModel.home_bgimages componentsSeparatedByString:@","]; imgs = [userModel.home_bgimages componentsSeparatedByString:@","];
@@ -125,7 +144,7 @@
weakSelf.cycleScrollView.imageURLStringsGroup = imgs; weakSelf.cycleScrollView.imageURLStringsGroup = imgs;
} }
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
}]; }];
} }
#pragma mark - JXPagingViewDelegate #pragma mark - JXPagingViewDelegate
@@ -134,7 +153,7 @@
return self.headerView; return self.headerView;
} }
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView { - (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
return 215+26; return self.headerView.height;
} }
- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView { - (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
@@ -155,10 +174,13 @@
dynamicView.backgroundColor = RGB16(0xf6f6f6); dynamicView.backgroundColor = RGB16(0xf6f6f6);
return dynamicView; return dynamicView;
}else if(index == 1){ }else if(index == 1){
QXUserGiftWallView *giftWallView = [[QXUserGiftWallView alloc] init]; // QXUserGiftWallView *giftWallView = [[QXUserGiftWallView alloc] init];
giftWallView.backgroundColor = RGB16(0xf6f6f6); // giftWallView.backgroundColor = RGB16(0xf6f6f6);
giftWallView.user_id = self.user_id; // giftWallView.user_id = self.user_id;
return giftWallView; // return giftWallView;
QXIntimateContentView *intimateView = [[QXIntimateContentView alloc] init];
intimateView.userId = self.user_id;
return intimateView;
}else{ }else{
QXUserPhotosView *photosView = [[QXUserPhotosView alloc] init]; QXUserPhotosView *photosView = [[QXUserPhotosView alloc] init];
photosView.user_id = self.user_id; photosView.user_id = self.user_id;
@@ -179,6 +201,8 @@
-(QXUserHomeHeaderView *)headerView{ -(QXUserHomeHeaderView *)headerView{
if (!_headerView) { if (!_headerView) {
_headerView = [[QXUserHomeHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 215+26)]; _headerView = [[QXUserHomeHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 215+26)];
_headerView.userId = self.user_id;
_headerView.hidden = YES;
} }
return _headerView; return _headerView;
} }

View File

@@ -10,6 +10,7 @@
#import "QXMineNetwork.h" #import "QXMineNetwork.h"
#import "QXSeatHeaderView.h" #import "QXSeatHeaderView.h"
#import "QXGiftPlayerManager.h" #import "QXGiftPlayerManager.h"
#import "QXCustomAlertView.h"
@interface QXDressSubViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout> @interface QXDressSubViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic,strong)QXSeatHeaderView *headerImageView; @property (nonatomic,strong)QXSeatHeaderView *headerImageView;
@@ -46,17 +47,20 @@
} }
-(void)getData{ -(void)getData{
MJWeakSelf @weakify(self)
[QXMineNetwork userDressListWithType:self.model.id successBlock:^(NSArray<QXUserDressModel *> * _Nonnull list) { [QXMineNetwork userDressListWithType:self.model.id successBlock:^(NSArray<QXUserDressModel *> * _Nonnull list) {
[weakSelf.dataArray removeAllObjects]; @strongify(self);
[weakSelf.dataArray addObjectsFromArray:list]; [self.dataArray removeAllObjects];
if (list.count > 0 ) { [self.dataArray addObjectsFromArray:list];
QXUserDressModel *model = [[QXUserDressModel alloc] init]; if (![self.model.id isEqualToString:@"12"]) {
model.title = QXText(@"无"); if (list.count > 0 ) {
model.udid = @"-1"; QXUserDressModel *model = [[QXUserDressModel alloc] init];
[weakSelf.dataArray insertObject:model atIndex:0]; model.title = QXText(@"无");
model.udid = @"-1";
[self.dataArray insertObject:model atIndex:0];
}
} }
[weakSelf.collectionView reloadData]; [self.collectionView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}]; }];
@@ -76,8 +80,8 @@
return cell; return cell;
} }
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ -(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
int width = (SCREEN_WIDTH-15*2-22*2-1)/3; int width = (SCREEN_WIDTH-16*2-15*2-1)/3;
return CGSizeMake(width, width/100*120); return CGSizeMake((int)width, ScaleWidth(136));
} }
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == self.selectedIndex) { if (indexPath.row == self.selectedIndex) {
@@ -96,23 +100,45 @@
} }
-(void)commitAction{ -(void)commitAction{
if (self.selectedIndex == -1) {
return;
}
QXUserDressModel *model = self.dataArray[self.selectedIndex]; QXUserDressModel *model = self.dataArray[self.selectedIndex];
if ([self.model.id isEqualToString:@"12"]) {
@weakify(self);
QXCustomAlertView *al = [[QXCustomAlertView alloc] init];
[al showInView:self.view title:@"温馨提示" message:[NSString stringWithFormat:@"亲爱的羽声用户,您好~ 您是否确认使用%@,本次使用后 您的身价会降至原身价的%@%%",model.title,model.ext_value] cancleTitle:@"取消" commitTitle:@"确认"];
al.commitBlock = ^{
@strongify(self);
[self commitNetworkWithModel:model];
};
return;
}
[self commitNetworkWithModel:model];
}
-(void)commitNetworkWithModel:(QXUserDressModel*)model{
BOOL isCancel = NO; BOOL isCancel = NO;
if ([model.udid isEqualToString:@"-1"]) { if ([model.udid isEqualToString:@"-1"]) {
isCancel = YES; isCancel = YES;
}else{ }else{
isCancel = NO; isCancel = NO;
} }
MJWeakSelf @weakify(self);
[QXMineNetwork setUserDressIsCancel:isCancel udid:model.udid type:self.model.id successBlock:^(NSDictionary * _Nonnull dict) { [QXMineNetwork setUserDressIsCancel:isCancel udid:model.udid type:self.model.id successBlock:^(NSDictionary * _Nonnull dict) {
if (weakSelf.model.id.intValue == 1) { @strongify(self);
if (self.model.id.intValue == 1) {
[QXGlobal shareGlobal].loginModel.dress = model.play_image; [QXGlobal shareGlobal].loginModel.dress = model.play_image;
} }
if (weakSelf.model.id.intValue == 9) { if (self.model.id.intValue == 9) {
[QXGlobal shareGlobal].loginModel.chat_bubble = model.base_image; [QXGlobal shareGlobal].loginModel.chat_bubble = model.base_image;
} }
[[QXGlobal shareGlobal] updateUserInfoWithMolde:[QXGlobal shareGlobal].loginModel]; [[QXGlobal shareGlobal] updateUserInfoWithMolde:[QXGlobal shareGlobal].loginModel];
showToast(@"设置成功"); showToast(@"设置成功");
if (self.model.id.intValue == 12) {
[self getData];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg); showToast(msg);
}]; }];
@@ -135,9 +161,9 @@
-(UICollectionView *)collectionView{ -(UICollectionView *)collectionView{
if (!_collectionView) { if (!_collectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing = 22; layout.minimumLineSpacing = 15;
layout.minimumInteritemSpacing = 22; layout.minimumInteritemSpacing = 15;
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15); layout.sectionInset = UIEdgeInsetsMake(0, 16, 0, 16);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.headerImageView.bottom+12+12, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight) collectionViewLayout:layout]; _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.headerImageView.bottom+12+12, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight) collectionViewLayout:layout];
_collectionView.delegate = self; _collectionView.delegate = self;
_collectionView.dataSource = self; _collectionView.dataSource = self;

View File

@@ -0,0 +1,16 @@
//
// QXHeartBeatSpaceViewController.h
// QXLive
//
// Created by 启星 on 2025/11/21.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXHeartBeatSpaceViewController : QXBaseViewController
@property (nonatomic,strong)NSString *userId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,245 @@
//
// QXHeartBeatSpaceViewController.m
// QXLive
//
// Created by on 2025/11/21.
//
#import "QXHeartBeatSpaceViewController.h"
#import "QXMineNetwork.h"
#import "QXHeartBeatSpaceRecordCell.h"
#import "QXHeartBeatLevelRuleView.h"
#import "QXUserCpDressView.h"
@interface QXHeartBeatSpaceViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong)UIImageView *topImageView;
@property (nonatomic,strong)UIImageView *titleImageView;
@property (nonatomic,strong)UIImageView *flyImageView;
@property (nonatomic,strong)QXSeatHeaderView *leftHeaderView;
@property (nonatomic,strong)UIImageView *heartImageView;
@property (nonatomic,strong)QXSeatHeaderView *rightHeaderView;
@property (nonatomic,strong)UILabel *timeLabel;
@property (nonatomic,strong)UIView *recordContentView;
@property (nonatomic,strong)UIView *expView;
@property (nonatomic,strong)UILabel *expLabel;
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UIImageView *cpDressBgImageView;
@property (nonatomic,strong)QXUserCpDressView *cpDressView;
@end
@implementation QXHeartBeatSpaceViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)setNavgationItems{
[super setNavgationItems];
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[recordBtn setImage:[UIImage imageNamed:@"nobility_help_icon"] forState:(UIControlStateNormal)];
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
[recordBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:recordBtn];
}
- (void)initSubViews{
[self updateBackImage:[UIImage imageNamed:@"mine_intimate_back"]];
self.page = 1;
self.view.backgroundColor = RGB16(0xBF8BFA);
self.topImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_heart_beat_space_bg"]];
self.topImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(336));
[self.view addSubview:self.topImageView];
self.titleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_heart_beat_title"]];
self.titleImageView.frame = CGRectMake((SCREEN_WIDTH-ScaleWidth(199))/2, ScaleWidth(48), ScaleWidth(199), ScaleWidth(87));
[self.view addSubview:self.titleImageView];
self.flyImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_heart_beat_fly"]];
self.flyImageView.frame = CGRectMake((self.view.width-ScaleWidth(328))/2, self.titleImageView.top+ScaleWidth(24), ScaleWidth(328), ScaleWidth(184));
[self.view addSubview:self.flyImageView];
self.leftHeaderView = [[QXSeatHeaderView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/2-ScaleWidth(72), self.titleImageView.bottom+ScaleWidth(26), ScaleWidth(72), ScaleWidth(72))];
[self.leftHeaderView addRoundedCornersWithRadius:ScaleWidth(36)];
self.leftHeaderView.layer.borderWidth = 2;
self.leftHeaderView.layer.borderColor = RGB16(0xffffff).CGColor;
[self.view addSubview:self.leftHeaderView];
self.rightHeaderView = [[QXSeatHeaderView alloc] initWithFrame:CGRectMake(self.leftHeaderView.right, self.titleImageView.bottom+ScaleWidth(26), ScaleWidth(72), ScaleWidth(72))];
[self.rightHeaderView addRoundedCornersWithRadius:ScaleWidth(36)];
self.rightHeaderView.layer.borderWidth = 2;
self.rightHeaderView.layer.borderColor = RGB16(0xffffff).CGColor;
[self.view addSubview:self.rightHeaderView];
self.heartImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_heart_beat_heart_icon"]];
self.heartImageView.frame = CGRectMake(SCREEN_WIDTH/2-ScaleWidth(26/2), 0, ScaleWidth(26), ScaleWidth(26));
[self.view addSubview:self.heartImageView];
self.heartImageView.centerY = self.leftHeaderView.centerY;
self.timeLabel = [[UILabel alloc] init];
self.timeLabel.font = [UIFont systemFontOfSize:14];
self.timeLabel.textColor = RGB16(0xffffff);
self.timeLabel.backgroundColor = RGB16A(0x0300C8,0.35);
[self.timeLabel addRoundedCornersWithRadius:11.5];
[self.view addSubview:self.timeLabel];
self.recordContentView = [[UIView alloc] initWithFrame:CGRectMake(16, self.topImageView.bottom-ScaleWidth(20), SCREEN_WIDTH-32, self.view.height-self.topImageView.bottom-ScaleWidth(20))];
self.recordContentView.backgroundColor = RGB16(0xffffff);
[self.recordContentView addRoundedCornersWithRadius:12];
self.expView = [[UIView alloc] initWithFrame:CGRectMake(14, 14, self.recordContentView.width-28, ScaleWidth(89))];
[self.recordContentView addSubview:self.expView];
UIImageView *expImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_heart_beat_exp_bg"]];
expImageView.frame = self.expView.bounds;
[self.expView addSubview:expImageView];
self.expLabel = [[UILabel alloc] initWithFrame:CGRectMake(127, (self.expView.height-32)/2, self.expView.width-127-10, 32)];
self.expLabel.textColor = RGB16(0xffffff);
self.expLabel.font = [UIFont systemFontOfSize:16];
[self.expView addSubview:self.expLabel];
[self.recordContentView addSubview:self.tableView];
[self.view addSubview:self.recordContentView];
// user_heart_beat_exp_bg
self.cpDressBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"heart_beat_space_dress_bg"]];
self.cpDressBgImageView.frame = CGRectMake(self.view.width-ScaleWidth(115), 0, ScaleWidth(115), ScaleWidth(210));
[self.view addSubview:self.cpDressBgImageView];
self.cpDressBgImageView.centerY = self.leftHeaderView.centerY;
// [self.cpDressBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.right.equalTo(self.view);
// make.centerY.equalTo(self.leftHeaderView);
// make.width.mas_equalTo(ScaleWidth(115));
// make.height.mas_equalTo(ScaleWidth(210));
// }];
self.cpDressView = [[QXUserCpDressView alloc] initWithFrame:self.cpDressBgImageView.frame];
[self.cpDressView hideHeader];
[self.view addSubview:self.cpDressView];
// [self.cpDressView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.edges.equalTo(self.cpDressBgImageView);
// }];
self.cpDressView.hidden = YES;
self.cpDressBgImageView.hidden = YES;
}
-(void)helpAction{
QXHeartBeatLevelRuleView *view = [[QXHeartBeatLevelRuleView alloc] init];
NSString *urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=31",ServerUrl];
view.rule = urlStr;
[view showInView:self.view];
}
-(void)setUserId:(NSString *)userId{
_userId = userId;
self.page = 1;
[self getList];
}
-(void)getList{
MJWeakSelf
[QXMineNetwork heartBeatUserInfoWithUserId:self.userId page:self.page successBlock:^(QXUserCpInfoModel * _Nonnull model) {
if (weakSelf.page == 1) {
if ([model.user_info1.user_id isEqualToString:weakSelf.userId]) {
[weakSelf.leftHeaderView setHeadIcon:model.user_info1.avatar dress:model.user_info1.dress];
[weakSelf.rightHeaderView setHeadIcon:model.user_info2.avatar dress:model.user_info2.dress];
}else{
[weakSelf.leftHeaderView setHeadIcon:model.user_info2.avatar dress:model.user_info2.dress];
[weakSelf.rightHeaderView setHeadIcon:model.user_info1.avatar dress:model.user_info1.dress];
}
if ([model.pendant isExist]) {
weakSelf.cpDressView.hidden = NO;
weakSelf.cpDressBgImageView.hidden = NO;
weakSelf.cpDressView.model = model;
}
NSTimeInterval currentTime = [[NSDate date] timeIntervalSince1970];
long long milliseconds = (long long)(currentTime);
NSInteger time = milliseconds - model.createtime.longLongValue;
weakSelf.timeLabel.text = [NSString stringWithFormat:@" 我们在一起%@啦 ",[NSString getTimeWithDay:time]];
[weakSelf.timeLabel sizeToFit];
weakSelf.timeLabel.centerX = weakSelf.topImageView.centerX;
weakSelf.timeLabel.height = 21;
weakSelf.timeLabel.top = weakSelf.leftHeaderView.bottom+ScaleWidth(21);
if (model.next_level_exp.integerValue <=0 ) {
weakSelf.expLabel.text = @"当前已是最高等级";
}else{
NSString *expString = [NSString stringWithFormat:@"还需%@经验升级",model.next_level_exp];
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:expString];
[attr yy_setFont:[UIFont fontWithName:@"DIN Condensed" size:32] range:[expString rangeOfString:model.next_level_exp]];
[attr yy_setColor:RGB16(0xFFF022) range:[expString rangeOfString:model.next_level_exp]];
weakSelf.expLabel.attributedText = attr;
}
[weakSelf.dataArray removeAllObjects];
}
[weakSelf.dataArray addObjectsFromArray:model.gift_log];
[weakSelf.tableView reloadData];
if (model.gift_log.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{
[weakSelf.tableView.mj_footer endRefreshing];
}
[weakSelf.tableView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
[weakSelf.tableView.mj_header endRefreshing];
[weakSelf.tableView.mj_footer endRefreshing];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf.navigationController popViewControllerAnimated:YES];
});
}];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXHeartBeatSpaceRecordCell *cell = [QXHeartBeatSpaceRecordCell cellWithTableView:tableView];
cell.userId = self.userId;
cell.model = self.dataArray[indexPath.row];
return cell;
}
-(UITableView *)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(14,self.expView.bottom+6,self.recordContentView.width-28,self.recordContentView.height-self.expView.bottom-14-6) style:(UITableViewStylePlain)];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = RGB16(0xF4F4F4);
[_tableView addRoundedCornersWithRadius:12];
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
if (@available(iOS 15.0, *)) {
_tableView.sectionHeaderTopPadding = 0;
} else {
// Fallback on earlier versions
}
MJWeakSelf
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.page = 1;
[weakSelf getList];
}];
_tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
weakSelf.page++;
[weakSelf getList];
}];
}
return _tableView;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXIntimateViewController.h
// QXLive
//
// Created by 启星 on 2025/11/20.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXIntimateViewController : QXBaseViewController
@property (nonatomic,strong)NSString *userId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,270 @@
//
// QXIntimateViewController.m
// QXLive
//
// Created by on 2025/11/20.
//
#import "QXIntimateViewController.h"
#import "QXIntimateCpCell.h"
#import "QXIntimateListCell.h"
#import "QXIntimateNoCpCell.h"
#import "QXMineNetwork.h"
#import "QXButton.h"
#import "QXMoreIntimateViewController.h"
#import "QXIntimateMoreListCell.h"
#import "QXHeartBeatSpaceViewController.h"
#import "QXUserHomePageViewController.h"
@interface QXIntimateViewController ()<UITableViewDataSource,UITableViewDelegate,QXUserCpCardViewDelegate,QXIntimateMoreListCellDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)QXRoomBestFriendModel *model;
@end
@implementation QXIntimateViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)setNavgationItems{
[super setNavgationItems];
}
- (void)initSubViews{
self.page = 1;
[self updateBgImage:@"mine_intimate_bg"];
[self updateBackImage:[UIImage imageNamed:@"mine_intimate_back"]];
UIImageView *titleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_intimate_title_img"]];
[self.view addSubview:titleImageView];
[titleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.width.mas_equalTo(ScaleWidth(178));
make.height.mas_equalTo(ScaleWidth(68));
make.top.mas_equalTo(NavContentHeight);
}];
[self.view addSubview:self.tableView];
}
-(void)setUserId:(NSString *)userId{
_userId = userId;
self.page = 1;
[self getList];
}
-(void)getList{
MJWeakSelf
[QXMineNetwork userBestFriendsListWithUserId:self.userId page:self.page successBlock:^(QXRoomBestFriendModel * _Nonnull model) {
weakSelf.model = model;
if (weakSelf.page == 1) {
[weakSelf.dataArray removeAllObjects];
}
[weakSelf.dataArray addObjectsFromArray:model.no_cp];
[weakSelf.tableView reloadData];
if (model.no_cp.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{
[weakSelf.tableView.mj_footer endRefreshing];
}
[weakSelf.tableView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)moreAction:(QXButton*)btn{
QXRoomBestFriendListModel *md = btn.object;
QXMoreIntimateViewController *vc = [[QXMoreIntimateViewController alloc] init];
vc.userId = self.userId;
vc.relation_id = md.relation_list.firstObject.relation_id;
vc.relation_name = md.relation_name;
[self.navigationController pushViewController:vc animated:YES];
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
if (self.model == nil) {
return 0;
}else{
return 1+self.dataArray.count;
}
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
if (self.model.cp) {
QXIntimateCpCell *cell = [QXIntimateCpCell cellWithTableView:tableView];
cell.userId = self.userId;
cell.model = self.model.cp;
cell.delegate = self;
return cell;
}else{
QXIntimateNoCpCell *cell = [QXIntimateNoCpCell cellWithTableView:tableView];
return cell;
}
}else{
QXRoomBestFriendListModel *md = self.dataArray[indexPath.section-1];
if (md.relation_list.count > 1) {
QXIntimateListCell*cell = [QXIntimateListCell cellWithTableView:tableView];
cell.userId = self.userId;
if (self.dataArray.count>0) {
QXRoomBestFriendListModel *md = self.dataArray[indexPath.section-1];
cell.model = md;
}
return cell;
}else{
MJWeakSelf
QXIntimateMoreListCell *cell = [QXIntimateMoreListCell cellWithTableView:tableView];
cell.userId = self.userId;
QXRoomBestFriendListModel *md = self.dataArray[indexPath.section-1];
cell.model = md.relation_list.firstObject;
cell.delegate = self;
cell.deleteSuccessBlock = ^(QXRelationshipListModel * _Nonnull model) {
weakSelf.page = 1;
[weakSelf getList];
};
return cell;
}
}
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 50)];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_intimate_title_bg"]];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont boldSystemFontOfSize:16];
titleLabel.textColor = RGB16(0xffffff);
QXButton *btn = [[QXButton alloc] init];
[btn setTitle:@"更多>>" forState:(UIControlStateNormal)];
[btn setTitleColor:RGB16(0xE973FC) forState:(UIControlStateNormal)];
btn.titleLabel.font = [UIFont systemFontOfSize:12];
[btn addTarget:self action:@selector(moreAction:) forControlEvents:(UIControlEventTouchUpInside)];
[header addSubview:btn];
[header addSubview:imageView];
[header addSubview:titleLabel];
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(132);
make.height.mas_equalTo(36);
make.centerX.centerY.equalTo(header);
}];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(header);
make.centerY.equalTo(header).offset(2);
}];
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(-23);
make.top.bottom.equalTo(header);
make.width.mas_equalTo(40);
}];
if (section == 0) {
titleLabel.text = @"心动";
btn.hidden = YES;
}else{
QXRoomBestFriendListModel *md = self.dataArray[section-1];
titleLabel.text = md.relation_name;
if (md.relation_list.count>1) {
btn.hidden = NO;
btn.object = md;
}else{
btn.hidden = YES;
}
}
return header;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 50;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
if (self.model.cp) {
return ScaleWidth(100);
}else{
return ScaleWidth(36);
}
}else{
QXRoomBestFriendListModel *md = self.dataArray[indexPath.section-1];
if (md.relation_list.count == 1) {
return ScaleWidth(92)+18;
}else{
if (md.relation_list.count == 0) {
return 0;
}else{
return ScaleWidth(125);
}
}
}
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 15)];
return footer;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 15;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
// if (indexPath.section == 0) {
// if (self.model.cp) {
// QXHeartBeatSpaceViewController *vc = [[QXHeartBeatSpaceViewController alloc] init];
// vc.userId = self.userId;
// [self.navigationController pushViewController:vc animated:YES];
// }
// }
}
-(void)didClickHeaderCardViewWithUserId:(NSString *)userId{
if (self.model.cp) {
QXHeartBeatSpaceViewController *vc = [[QXHeartBeatSpaceViewController alloc] init];
vc.userId = self.userId;
[self.navigationController pushViewController:vc animated:YES];
}
}
-(void)didClickHeaderViewUserId:(NSString *)userId{
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
vc.user_id = userId;
[self.navigationController pushViewController:vc animated:YES];
}
- (void)didClickHeaderWithUserId:(NSString *)userId{
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
vc.user_id = userId;
[self.navigationController pushViewController:vc animated:YES];
}
-(UITableView *)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavContentHeight+ScaleWidth(68), SCREEN_WIDTH, SCREEN_HEIGHT -NavContentHeight-ScaleWidth(68)) style:(UITableViewStyleGrouped)];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
if (@available(iOS 15.0, *)) {
_tableView.sectionHeaderTopPadding = 0;
} else {
// Fallback on earlier versions
}
MJWeakSelf
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.page = 1;
[weakSelf getList];
}];
_tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
weakSelf.page++;
[weakSelf getList];
}];
}
return _tableView;
}
@end

View File

@@ -0,0 +1,18 @@
//
// QXMoreIntimateViewController.h
// QXLive
//
// Created by 启星 on 2025/11/20.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXMoreIntimateViewController : QXBaseViewController
@property (nonatomic,strong)NSString *userId;
@property (nonatomic,strong)NSString *relation_id;
@property (nonatomic,strong)NSString *relation_name;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,120 @@
//
// QXMoreIntimateViewController.m
// QXLive
//
// Created by on 2025/11/20.
//
#import "QXMoreIntimateViewController.h"
#import "QXMineNetwork.h"
#import "QXIntimateMoreListCell.h"
@interface QXMoreIntimateViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@end
@implementation QXMoreIntimateViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)initSubViews{
[super initSubViews];
self.page = 1;
[self updateBgImage:@"mine_intimate_bg"];
[self updateBackImage:[UIImage imageNamed:@"mine_intimate_back"]];
UIImageView *titleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_intimate_title_img"]];
[self.view addSubview:titleImageView];
[titleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.width.mas_equalTo(ScaleWidth(178));
make.height.mas_equalTo(ScaleWidth(68));
make.top.mas_equalTo(NavContentHeight);
}];
[self.view addSubview:self.tableView];
}
-(void)setUserId:(NSString *)userId{
_userId = userId;
}
-(void)setRelation_id:(NSString *)relation_id{
_relation_id = relation_id;
if (self.userId) {
[self getList];
}
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXIntimateMoreListCell *cell = [QXIntimateMoreListCell cellWithTableView:tableView];
cell.userId = self.userId;
cell.model = self.dataArray[indexPath.row];
MJWeakSelf
cell.topSuccessBlock = ^(QXRelationshipListModel * _Nonnull model) {
[weakSelf getList];
};
cell.deleteSuccessBlock = ^(QXRelationshipListModel * _Nonnull model) {
[weakSelf getList];
};
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return ScaleWidth(92)+16;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 50)];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_intimate_title_bg"]];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont boldSystemFontOfSize:16];
titleLabel.textColor = RGB16(0xffffff);
[header addSubview:imageView];
[header addSubview:titleLabel];
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(132);
make.height.mas_equalTo(36);
make.centerX.centerY.equalTo(header);
}];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(header);
make.centerY.equalTo(header).offset(2);
}];
titleLabel.text = self.relation_name;
return header;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 50;
}
-(void)getList{
MJWeakSelf
[QXMineNetwork userBestFriendsMoreListWithUserId:self.userId relation_id:self.relation_id successBlock:^(NSArray<QXRelationshipListModel *> * _Nonnull model) {
[weakSelf.dataArray removeAllObjects];
[weakSelf.dataArray addObjectsFromArray:model];
[weakSelf.tableView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(UITableView *)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavContentHeight+ScaleWidth(68), SCREEN_WIDTH, SCREEN_HEIGHT -NavContentHeight-ScaleWidth(68)) style:(UITableViewStyleGrouped)];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
if (@available(iOS 15.0, *)) {
_tableView.sectionHeaderTopPadding = 0;
} else {
// Fallback on earlier versions
}
}
return _tableView;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXFamilyPriceRecordViewController.h
// QXLive
//
// Created by 启星 on 2025/11/26.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXFamilyPriceRecordViewController : QXBaseViewController
@property (nonatomic,strong)NSString *userId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,129 @@
//
// QXFamilyPriceRecordViewController.m
// QXLive
//
// Created by on 2025/11/26.
//
#import "QXFamilyPriceRecordViewController.h"
#import "QXWalletDateView.h"
#import "QXFamilyPriceRecordCell.h"
#import "QXMineNetwork.h"
@interface QXFamilyPriceRecordViewController ()<QXWalletDateViewDelegate,UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong)UIView *contentView;
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)QXWalletDateView *dateView;
@property (nonatomic,strong)NSString* startTime;
@property (nonatomic,strong)NSString* endTime;
@end
@implementation QXFamilyPriceRecordViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationItem.title = QXText(@"总收益");
}
-(void)initSubViews{
self.page = 1;
UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(16, NavContentHeight+12, SCREEN_WIDTH-32, SCREEN_HEIGHT-NavContentHeight-12)];
[contentView addRoundedCornersWithRadius:16];
contentView.backgroundColor = RGB16(0xffffff);
self.contentView = contentView;
[self.view addSubview:contentView];
[contentView addSubview:self.dateView];
[contentView addSubview:self.tableView];
}
-(void)setUserId:(NSString *)userId{
_userId = userId;
self.page = 1;
[self getList];
}
-(void)getList{
__weak typeof(self) weakSelf = self;
[QXMineNetwork getFamilyEarningWithUserId:self.userId page:self.page start_time:self.startTime end_time:self.endTime successBlock:^(NSArray<QXFamilyEarningModel *> * _Nonnull list) {
__strong typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) {
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
return;
}
if (strongSelf.page == 1) {
[strongSelf.dataArray removeAllObjects];
}
[strongSelf.dataArray addObjectsFromArray:list];
[strongSelf.tableView reloadData];
if (list.count == 0) {
strongSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{
[strongSelf.tableView.mj_footer endRefreshing];
}
[strongSelf.tableView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
dispatch_async(dispatch_get_main_queue(), ^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (strongSelf) {
[strongSelf.tableView.mj_header endRefreshing];
[strongSelf.tableView.mj_footer endRefreshing];
}
});
}];
//
// }];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXFamilyPriceRecordCell *cell = [QXFamilyPriceRecordCell cellWithTableView:tableView];
cell.model = self.dataArray[indexPath.row];
return cell;
}
#pragma mark - QXWalletDateViewDelegate
-(void)didSelectedStartDate:(NSString *)startDateString startDate:(NSDate *)startDate endDateString:(NSString *)endDateString endDate:(NSDate *)endDate{
QXLOG(@"开始时间-%@ 结束时间-%@",startDateString,endDateString);
self.startTime = startDateString;
self.endTime = endDateString;
self.page = 1;
[self getList];
}
-(QXWalletDateView *)dateView{
if (!_dateView) {
_dateView = [[QXWalletDateView alloc] initWithFrame:CGRectMake(12, 12, SCREEN_WIDTH-32-24, 38)];
_dateView.delegate = self;
}
return _dateView;
}
-(UITableView *)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.dateView.bottom+10, SCREEN_WIDTH-32, self.contentView.height - self.dateView.bottom-10) style:(UITableViewStylePlain)];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = [UIColor whiteColor];
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.rowHeight = 107;
MJWeakSelf
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.page = 1;
[weakSelf getList];
}];
_tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
weakSelf.page++;
[weakSelf getList];
}];
}
return _tableView;
}
@end

View File

@@ -0,0 +1,17 @@
//
// QXFamilySubViewController.h
// QXLive
//
// Created by 启星 on 2025/11/26.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXFamilySubViewController : QXBaseViewController<JXCategoryListContentViewDelegate>
@property (nonatomic,assign)NSInteger index;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,190 @@
//
// QXFamilySubViewController.m
// QXLive
//
// Created by on 2025/11/26.
//
#import "QXFamilySubViewController.h"
#import "QXFamilyMemberCell.h"
#import "QXFamilyTopCell.h"
#import "QXMineNetwork.h"
#import "QXUserHomePageViewController.h"
@interface QXFamilySubViewController ()<UITableViewDelegate,UITableViewDataSource,QXFamilyMemberCellDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)QXFamilyModel *model;
@property (nonatomic,strong)UIView *noDataView;
@end
@implementation QXFamilySubViewController
-(UIView *)listView{
return self.view;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)initSubViews{
self.bgImageHidden = YES;
self.view.backgroundColor = RGB16(0x102477);
[self.view addSubview:self.tableView];
}
-(void)viewDidLayoutSubviews{
[super viewDidLayoutSubviews];
_tableView.frame = self.view.bounds;
}
-(void)setIndex:(NSInteger)index{
_index = index;
[self getList];
}
-(void)getList{
BOOL isJoin = YES;
if (self.index == 0) {
isJoin = NO;
}else{
isJoin = YES;
}
MJWeakSelf
[QXMineNetwork getMyFamilyIsJoin:isJoin successBlock:^(QXFamilyModel * _Nonnull model) {
weakSelf.model = model;
if (weakSelf.model.group_members_lists.count == 0) {
weakSelf.tableView.tableFooterView = weakSelf.noDataView;
}else{
weakSelf.tableView.tableFooterView = nil;
}
[weakSelf.tableView reloadData];
[weakSelf.tableView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
[weakSelf.tableView.mj_header endRefreshing];
}];
}
-(void)needRefresh{
self.page = 1;
[self getList];
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
if (self.model) {
return 2;
}
return 0;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (section == 0) {
return 1;
}else{
return self.model.group_members_lists.count;
}
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
QXFamilyTopCell *cell = [QXFamilyTopCell cellWithTableView:tableView];
cell.model = self.model;
return cell;
}else{
QXFamilyMemberCell *cell = [QXFamilyMemberCell cellWithTableView:tableView];
cell.model = self.model.group_members_lists[indexPath.row];
cell.delegate = self;
return cell;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
return 180;
}else{
return 176;
}
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
if (section == 0) {
return [UIView new];
}else{
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.width, 50)];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"family_list_section_bg"]];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont boldSystemFontOfSize:16];
titleLabel.textColor = RGB16(0xffffff);
[header addSubview:imageView];
[header addSubview:titleLabel];
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(132);
make.height.mas_equalTo(36);
make.centerX.centerY.equalTo(header);
}];
titleLabel.text = @"家族成员";
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(header);
make.centerY.equalTo(header).offset(2);
}];
return header;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section == 0) {
return 0;
}
return 50;
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
return [UIView new];
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 0;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
return;
}
QXFamilyMemberModel*md = self.model.group_members_lists[indexPath.row];
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
vc.user_id = md.user_id;
[self.navigationController pushViewController:vc animated:YES];
}
-(UITableView *)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.view.height) style:(UITableViewStyleGrouped)];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
if (@available(iOS 15.0, *)) {
_tableView.sectionHeaderTopPadding = 0;
} else {
// Fallback on earlier versions
}
MJWeakSelf
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
[weakSelf getList];
}];
}
return _tableView;
}
-(UIView *)noDataView{
if (!_noDataView) {
_noDataView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(120)+30)];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"qx_no_data"]];
[_noDataView addSubview:imageView];
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(ScaleWidth(148));
make.height.mas_equalTo(ScaleWidth(99));
make.centerX.equalTo(_noDataView);
make.top.mas_equalTo(30);
}];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont systemFontOfSize:12];
titleLabel.text = @"暂无数据";
titleLabel.textColor = RGB16(0xffffff);
[_noDataView addSubview:titleLabel];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(_noDataView);
make.top.equalTo(imageView.mas_bottom);
}];
}
return _noDataView;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXFamilyViewController.h
// QXLive
//
// Created by 启星 on 2025/11/26.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXFamilyViewController : QXBaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,88 @@
//
// QXFamilyViewController.m
// QXLive
//
// Created by on 2025/11/26.
//
#import "QXFamilyViewController.h"
#import "QXFamilySubViewController.h"
@interface QXFamilyViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
@property (nonatomic,strong)UIImageView *topImageView;
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
@property (nonatomic,strong)JXCategoryListContainerView *containerView;
@property (nonatomic,strong)NSMutableArray *titles;
@end
@implementation QXFamilyViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0xffffff)};
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0x000000)};
}
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationItem.title = QXText(@"家族");
self.navigationTintColor = RGB16(0xffffff);
}
- (void)initSubViews{
self.titles = [NSMutableArray arrayWithArray:@[@"我的家族",@"我加入的家族"]];
self.topImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_family_top_bg"]];
self.topImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(435));
[self.view addSubview:self.topImageView];
self.view.backgroundColor = RGB16(0x102477);
self.categoryView = [[JXCategoryTitleView alloc] init];
self.categoryView.frame = CGRectMake((self.view.width-246)/2, NavContentHeight+ScaleWidth(236), 246, 38);
self.categoryView.delegate = self;
self.categoryView.titles = self.titles;
self.categoryView.backgroundColor = RGB16A(0x000000, 0.2);
[self.categoryView addRoundedCornersWithRadius:19];
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"];
self.categoryView.titleColor = [UIColor colorWithHexString:@"#ffffff"];
self.categoryView.cellWidth = 123;
self.categoryView.contentEdgeInsetLeft = 0;
self.categoryView.cellSpacing = 0;
self.categoryView.contentEdgeInsetLeft = 0;
// self.categoryView.titleLabelZoomScale = 1.1;
// self.categoryView.titleLabelZoomEnabled = YES;
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:14];
self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:14];
self.categoryView.averageCellSpacingEnabled = NO;
JXCategoryIndicatorBackgroundView *indicatorView = [[JXCategoryIndicatorBackgroundView alloc] init];
indicatorView.indicatorWidth = 123;
indicatorView.indicatorHeight = 38;
indicatorView.indicatorCornerRadius = 19;
indicatorView.indicatorColor = RGB16(0xA4FFB8);
self.categoryView.indicators = @[indicatorView];
self.containerView = [[JXCategoryListContainerView alloc] initWithType:(JXCategoryListContainerType_CollectionView) delegate:self];
self.containerView.frame = CGRectMake(0, self.categoryView.bottom+8, SCREEN_WIDTH, SCREEN_HEIGHT-self.categoryView.bottom-8);
[self.view addSubview:self.categoryView];
[self.view addSubview:self.containerView];
self.categoryView.listContainer = self.containerView;
}
-(NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
return self.titles.count;
}
-(id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index{
QXFamilySubViewController *vc = [[QXFamilySubViewController alloc] init];
vc.index = index;
return vc;
}
@end

View File

@@ -57,14 +57,19 @@
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
-(void)getPriceData{ -(void)getPriceData{
MJWeakSelf __weak typeof(self) weakSelf = self;
[QXMineNetwork roomWaterDetailWithRoomId:self.room_id start_time:self.startTime end_time:self.endTime page:self.page type:self.type successBlock:^(QXRoomDetailModel * _Nonnull model) { [QXMineNetwork roomWaterDetailWithRoomId:self.room_id start_time:self.startTime end_time:self.endTime page:self.page type:self.type successBlock:^(QXRoomDetailModel * _Nonnull model) {
weakSelf.headerView.model = model; __strong typeof(weakSelf) strongSelf = weakSelf;
if (weakSelf.page == 1) { if (!strongSelf) {
[weakSelf.dict removeAllObjects]; NSLog(@"⚠️ self has been deallocated, skipping hide operation");
return;
}
strongSelf.headerView.model = model;
if (strongSelf.page == 1) {
[strongSelf.dict removeAllObjects];
} }
NSArray *arr = [weakSelf.dict allKeys]; NSArray *arr = [strongSelf.dict allKeys];
for (QXRoomWaterModel*md in model.list) { for (QXRoomWaterModel*md in model.list) {
BOOL haveKey = NO; BOOL haveKey = NO;
for (NSString *s in arr) { for (NSString *s in arr) {
@@ -75,10 +80,10 @@
} }
if (!haveKey) { if (!haveKey) {
// keyjson // keyjson
[weakSelf.dict setObject:[md yy_modelToJSONString] forKey:md.time]; [strongSelf.dict setObject:[md yy_modelToJSONString] forKey:md.time];
}else{ }else{
// //
NSString *json = [weakSelf.dict objectForKey:md.time]; NSString *json = [strongSelf.dict objectForKey:md.time];
// //
QXRoomWaterModel *m = [QXRoomWaterModel yy_modelWithJSON:json]; QXRoomWaterModel *m = [QXRoomWaterModel yy_modelWithJSON:json];
// //
@@ -88,10 +93,10 @@
// //
m.list = newArr; m.list = newArr;
// //
[weakSelf.dict setObject:[m yy_modelToJSONString] forKey:md.time]; [strongSelf.dict setObject:[m yy_modelToJSONString] forKey:md.time];
} }
} }
NSArray *keys = [weakSelf.dict.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { NSArray *keys = [strongSelf.dict.allKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
// NSString *s1 = obj1; // NSString *s1 = obj1;
// NSString *s2 = obj2; // NSString *s2 = obj2;
NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc] init]; NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc] init];
@@ -110,18 +115,23 @@
return NSOrderedSame; return NSOrderedSame;
} }
}]; }];
self.allDateArray = [NSMutableArray arrayWithArray:keys]; strongSelf.allDateArray = [NSMutableArray arrayWithArray:keys];
[weakSelf.tableView reloadData]; [strongSelf.tableView reloadData];
[weakSelf.tableView.mj_header endRefreshing]; [strongSelf.tableView.mj_header endRefreshing];
if (model.list.count == 0) { if (model.list.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData; strongSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{ }else{
[weakSelf.tableView.mj_footer endRefreshing]; [strongSelf.tableView.mj_footer endRefreshing];
} }
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg); dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.tableView.mj_footer endRefreshing]; __strong typeof(weakSelf) strongSelf = weakSelf;
[weakSelf.tableView.mj_header endRefreshing]; if (strongSelf) {
showToast(msg);
[strongSelf.tableView.mj_header endRefreshing];
[strongSelf.tableView.mj_footer endRefreshing];
}
});
}]; }];
} }

View File

@@ -0,0 +1,16 @@
//
// QXMineSongListViewController.h
// QXLive
//
// Created by 启星 on 2025/11/13.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXMineSongListViewController : QXBaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,207 @@
//
// QXMineSongListViewController.m
// QXLive
//
// Created by on 2025/11/13.
//
#import "QXMineSongListViewController.h"
#import "QXMineNetwork.h"
#import "QXMineSongListCell.h"
#import "QXMineAddSongView.h"
#import "QXMineAddSongGiftView.h"
#import "QXCustomAlertView.h"
@interface QXMineSongListViewController ()<UITableViewDataSource,UITableViewDelegate,QXMineAddSongViewDelegate,QXMineAddSongGiftViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UILabel *countLabel;
@property (nonatomic,strong)QXMineAddSongView *addSongView;
@end
@implementation QXMineSongListViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
}
-(void)setNavgationItems{
[super setNavgationItems];;
self.navigationItem.title = @"歌单列表";
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[recordBtn setTitle:QXText(@"新增") forState:(UIControlStateNormal)];
[recordBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
[recordBtn addTarget:self action:@selector(addAction) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:recordBtn];
}
-(void)initSubViews{
self.page = 1;
self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, NavContentHeight+12, 200, 35)];
self.countLabel.textColor = RGB16(0x666666);
self.countLabel.font = [UIFont systemFontOfSize:12];
self.countLabel.text = @"共0首歌";
[self.view addSubview:self.countLabel];
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.view.width-35-16, NavContentHeight+12, 35, 35)];
[recordBtn setImage:[[UIImage imageNamed:@"nobility_help_icon"] imageByTintColor:RGB16(0x666666)] forState:(UIControlStateNormal)];
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
[recordBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.view addSubview:recordBtn];
[self.view addSubview:self.tableView];
[self getSongList];
}
-(void)getSongList{
MJWeakSelf
[QXMineNetwork getUserSongListWithRoomId:@"" user_id:QXGlobal.shareGlobal.loginModel.user_id page:self.page SuccessBlock:^(NSArray<QXUserSongListModel *> * _Nonnull list, NSString * _Nonnull count) {
weakSelf.countLabel.text = [NSString stringWithFormat:@"共有%@首歌",count];
if (weakSelf.page == 1) {
[weakSelf.dataArray removeAllObjects];
}
[weakSelf.dataArray addObjectsFromArray:list];
[weakSelf.tableView reloadData];
[weakSelf.tableView.mj_header endRefreshing];
if (list.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{
[weakSelf.tableView.mj_header endRefreshing];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)helpAction{
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"34"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.navigationController pushViewController:vc animated:YES];
}
-(void)didSeletedGift:(QXGiftModel *)giftModel giftCount:(nonnull NSString *)giftCount{
giftModel.num = giftCount;
self.addSongView.giftModel = giftModel;
}
-(void)qx_mineAddSongViewDidSeleteGift{
QXMineAddSongGiftView *giftView = [[QXMineAddSongGiftView alloc] initWithFrame:[UIScreen mainScreen].bounds];
giftView.delegate = self;
[giftView showInView:self.view];
}
-(void)qx_mineAddSongViewCommitWithSongName:(NSString *)songName giftModel:(QXGiftModel *)giftModel{
MJWeakSelf
[QXMineNetwork mineUserAddAndDeleteAndEditWithType:0 Id:@"" songName:songName giftId:giftModel.gift_id giftNum:giftModel.num successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"添加成功");
[weakSelf.addSongView hide];
weakSelf.page = 1;
[weakSelf getSongList];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(@"添加失败");
}];
}
-(void)qx_mineAddSongViewDidRemove{
self.addSongView = nil;
}
-(void)qx_mineEditSongViewCommitWithSongModel:(QXUserSongListModel *)songModel{
MJWeakSelf
[QXMineNetwork mineUserAddAndDeleteAndEditWithType:1 Id:songModel.id songName:songModel.song_name giftId:songModel.gift_id giftNum:songModel.gift_num successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"修改成功");
[weakSelf.addSongView hide];
weakSelf.page = 1;
[weakSelf getSongList];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(@"修改失败");
}];
}
-(void)addAction{
self.addSongView = [[QXMineAddSongView alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.addSongView.delegate = self;
[self.addSongView showInView:self.view];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXMineSongListCell *cell = [QXMineSongListCell cellWithTableView:tableView];
cell.model = self.dataArray[indexPath.row];
return cell;
}
-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
-(UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath{
QXUserSongListModel *model = self.dataArray[indexPath.row];
MJWeakSelf
UIContextualAction *deletAction = [UIContextualAction contextualActionWithStyle:(UIContextualActionStyleDestructive) title:@"删除" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
[weakSelf deleteSongWithModel:model];
completionHandler(YES);
}];
UIContextualAction *editAction = [UIContextualAction contextualActionWithStyle:(UIContextualActionStyleNormal) title:@"编辑" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
[weakSelf editSongWithModel:model];
completionHandler(YES);
}];
editAction.backgroundColor = RGB16(0x3665F9);
UISwipeActionsConfiguration *config = [UISwipeActionsConfiguration configurationWithActions:@[deletAction,editAction]];
return config;
}
-(void)deleteSongWithModel:(QXUserSongListModel*)model{
QXCustomAlertView *alertView = [[QXCustomAlertView alloc] init];
[alertView showInView:self.view title:@"您确定要删除歌曲吗" message:[NSString stringWithFormat:@"歌曲名称:%@\n礼物信息%@ x%@",model.song_name,model.gift_name,model.gift_num] cancleTitle:@"取消" commitTitle:@"确定"];
MJWeakSelf
alertView.commitBlock = ^{
[QXMineNetwork mineUserAddAndDeleteAndEditWithType:2 Id:model.id songName:model.song_name giftId:model.gift_id giftNum:model.gift_num successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"删除成功");
weakSelf.page = 1;
[weakSelf getSongList];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(@"删除失败");
}];
};
}
-(void)editSongWithModel:(QXUserSongListModel*)model{
self.addSongView = [[QXMineAddSongView alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.addSongView.delegate = self;
self.addSongView.songModel = model;
[self.addSongView showInView:self.view];
}
-(UITableView *)tableView{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(16, self.countLabel.bottom+5, SCREEN_WIDTH-32, SCREEN_HEIGHT-NavContentHeight) style:(UITableViewStylePlain)];
_tableView.dataSource = self;
_tableView.delegate = self;
_tableView.backgroundColor = [UIColor whiteColor];
[_tableView addRoundedCornersWithRadius:16 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
_tableView.rowHeight = 45;
// _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
if (@available(iOS 15.0, *)) {
_tableView.sectionHeaderTopPadding = 0;
} else {
// Fallback on earlier versions
}
MJWeakSelf
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.page = 1;
[weakSelf getSongList];
}];
_tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
weakSelf.page++;
[weakSelf getSongList];
}];
}
return _tableView;
}
@end

View File

@@ -0,0 +1,17 @@
//
// QXRoomSingerAuthViewController.h
// QXLive
//
// Created by 启星 on 2025/11/12.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXRoomSingerAuthViewController : QXBaseViewController
/// 当前状态:-1 未认证歌手, 0待审核 1已认证 2被拒绝
@property (nonatomic,strong)NSString *singer_status;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,153 @@
//
// QXRoomSingerAuthViewController.m
// QXLive
//
// Created by on 2025/11/12.
//
#import "QXRoomSingerAuthViewController.h"
#import "QXAudioRecorderView.h"
#import "QXMineNetwork.h"
@interface QXRoomSingerAuthViewController ()<QXAudioRecorderViewDelegate>
@property (nonatomic,strong)UIView *contentView;
@property (nonatomic,strong)UIImageView *contentImageView;
@property (nonatomic,strong)UIImageView *myAuthImageView;
@property (nonatomic,strong)UIImageView *authStatusImageView;
@property (nonatomic,strong)UILabel *authStatusLabel;
@property (nonatomic,strong)QXAudioRecorderView *audioRecorderView;
@end
@implementation QXRoomSingerAuthViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0xffffff)};
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0x000000)};
}
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationTintColor = RGB16(0xffffff);
self.navigationItem.title = @"歌手认证";
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[recordBtn setImage:[UIImage imageNamed:@"nobility_help_icon"] forState:(UIControlStateNormal)];
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
[recordBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:recordBtn];
}
- (void)initSubViews{
[self updateBgImage:@"singer_auth_bg"];
self.contentView = [[UIView alloc] initWithFrame:CGRectMake(16, ScaleWidth(300), SCREEN_WIDTH-32, ScaleWidth(140))];
[self.view addSubview:self.contentView];
self.contentImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"singer_auth_center_bg"]];
self.contentImageView.contentMode = UIViewContentModeScaleToFill;
self.contentImageView.frame = self.contentView.bounds;
[self.contentView addSubview:self.contentImageView];
self.myAuthImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"singer_auth_title_image"]];
self.myAuthImageView.frame = CGRectMake((self.contentView.width-ScaleWidth(69))/2, ScaleWidth(10), ScaleWidth(69), ScaleWidth(24));
[self.contentView addSubview:self.myAuthImageView];
self.authStatusImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"singer_auth_status_no"]];
self.authStatusImageView.frame = CGRectMake((self.contentView.width-ScaleWidth(52))/2, self.myAuthImageView.bottom+ScaleWidth(22), ScaleWidth(52), ScaleWidth(52));
[self.contentView addSubview:self.authStatusImageView];
self.authStatusLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.authStatusImageView.bottom+4, self.contentView.width, 17)];
self.authStatusLabel.text = @"暂未认证";
self.authStatusLabel.textColor = RGB16A(0x000000, 0.45);
self.authStatusLabel.font = [UIFont systemFontOfSize:12];
self.authStatusLabel.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:self.authStatusLabel];
self.audioRecorderView = [[QXAudioRecorderView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT-kSafeAreaBottom-246, SCREEN_WIDTH, 246+kSafeAreaBottom) maxDuration:300];
self.audioRecorderView.delegate = self;
self.audioRecorderView.hidden = YES;
[self.view addSubview:self.audioRecorderView];
[self conifgViews];
}
-(void)conifgViews{
if ([self.singer_status isEqualToString:@"-1"] || [self.singer_status isEqualToString:@"2"]) {
self.audioRecorderView.hidden = NO;
}else{
self.audioRecorderView.hidden = YES;
}
if ([self.singer_status isEqualToString:@"-1"]) {
self.authStatusLabel.text = @"暂未认证";
self.authStatusLabel.textColor = RGB16A(0x000000, 0.45);
}else if ([self.singer_status isEqualToString:@"0"]) {
self.authStatusLabel.text = @"待审核";
self.authStatusLabel.textColor = RGB16(0xFF8832);
}else if ([self.singer_status isEqualToString:@"1"]) {
self.authStatusLabel.text = @"已认证";
self.authStatusLabel.textColor = QXConfig.themeColor;
}else if ([self.singer_status isEqualToString:@"2"]) {
self.authStatusLabel.text = @"已拒绝";
self.authStatusLabel.textColor = RGB16(0xFF2424);
}
}
-(void)helpAction{
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"33"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - AudioRecorderViewDelegate
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didChangeState:(AudioRecorderState)state{
NSLog(@"录音状态改变: %ld", (long)state);
}
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didFinishRecordingWithMP3File:(NSURL *)mp3FileURL duration:(NSTimeInterval)duration{
NSLog(@"录音完成MP3文件: %@, 总时长: %.1f秒", mp3FileURL, duration);
//
NSData *audioData = [NSData dataWithContentsOfURL:mp3FileURL];
NSLog(@"MP3文件大小: %.2f KB", audioData.length / 1024.0);
}
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didFailWithError:(NSError *)error{
NSLog(@"录音失败: %@", error);
}
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didUpdateProgress:(NSTimeInterval)progress totalDuration:(NSTimeInterval)totalDuration{
//
}
-(void)didClickAuthWithFileUrl:(NSURL *)audioFileUrl{
NSData *data = [NSData dataWithContentsOfURL:audioFileUrl];
@weakify(self)
showLoadingInView(self.view);
[[QXCOSUploadManager shareManager] audioUploadFile:data withObjectKey:audioFileUrl.lastPathComponent complete:^(NSString * _Nonnull fileUrl, QXCOSUploadImageState state) {
@strongify(self);
dispatch_async(dispatch_get_main_queue(), ^{
hideLoadingInView(self.view);
if ([fileUrl isExist]) {
[QXMineNetwork singerAuthWithSong:fileUrl successBlock:^(NSDictionary * _Nonnull dict) {
showToast(@"上传成功");
self.singer_status = @"0";
[self conifgViews];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(@"上传失败");
}];
}else{
showToast(@"上传失败");
}
});
}];
}
@end

View File

@@ -25,6 +25,10 @@
self.page = 1; self.page = 1;
[self getHistorySubsidy]; [self getHistorySubsidy];
} }
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)getHistorySubsidy{ -(void)getHistorySubsidy{
MJWeakSelf MJWeakSelf
[QXMineNetwork dayTaskGiftBoxRecordSuccessBlock:^(NSArray<QXTaskGiftBoxRecordModel *> * _Nonnull list) { [QXMineNetwork dayTaskGiftBoxRecordSuccessBlock:^(NSArray<QXTaskGiftBoxRecordModel *> * _Nonnull list) {

View File

@@ -74,15 +74,22 @@
if (self.model == nil) { if (self.model == nil) {
return 0; return 0;
} }
return 3; if (self.model.tasks.teacher_tasks.count > 0) {
return 4;
}else{
return 3;
}
} }
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (section == 0) { if (section == 0) {
return self.model.tasks.daily_tasks.count; return self.model.tasks.daily_tasks.count;
}else if(section == 1){ }else if(section == 1){
return self.model.tasks.daily_tasks_special.count; return self.model.tasks.daily_tasks_special.count;
}else{ }else if(section == 2){
return self.model.tasks.usual_tasks.count; return self.model.tasks.usual_tasks.count;
}else{
return self.model.tasks.teacher_tasks.count;
} }
} }
@@ -93,8 +100,10 @@
model = self.model.tasks.daily_tasks[indexPath.row]; model = self.model.tasks.daily_tasks[indexPath.row];
}else if(indexPath.section == 1){ }else if(indexPath.section == 1){
model = self.model.tasks.daily_tasks_special[indexPath.row]; model = self.model.tasks.daily_tasks_special[indexPath.row];
}else{ }else if(indexPath.section == 2){
model = self.model.tasks.usual_tasks[indexPath.row]; model = self.model.tasks.usual_tasks[indexPath.row];
}else{
model = self.model.tasks.teacher_tasks[indexPath.row];
} }
cell.model = model; cell.model = model;
return cell; return cell;
@@ -110,8 +119,10 @@
titleLabel.text = QXText(@"每日任务"); titleLabel.text = QXText(@"每日任务");
}else if(section == 1){ }else if(section == 1){
titleLabel.text = QXText(@"特殊任务"); titleLabel.text = QXText(@"特殊任务");
}else{ }else if(section == 2){
titleLabel.text = QXText(@"平台任务"); titleLabel.text = QXText(@"平台任务");
}else{
titleLabel.text = QXText(@"师徒任务");
} }
[header addSubview:titleLabel]; [header addSubview:titleLabel];
return header; return header;

View File

@@ -0,0 +1,16 @@
//
// QXBuyNobilitySuccessViewController.h
// QXLive
//
// Created by 启星 on 2025/11/10.
//
#import "QXBaseViewController.h"
#import "QXNobilityGetPriceModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXBuyNobilitySuccessViewController : QXBaseViewController
@property (nonatomic,strong)QXNobilityGetPriceModel *model;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,142 @@
//
// QXBuyNobilitySuccessViewController.m
// QXLive
//
// Created by on 2025/11/10.
//
#import "QXBuyNobilitySuccessViewController.h"
#import "QXNobilityBuyDesCell.h"
@interface QXBuyNobilitySuccessViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UIView *headerView;
@property (nonatomic,strong)UIImageView *resultImageView;
@property (nonatomic,strong)UILabel *resultLabel;
@property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)UIImageView *nobilityImageView;
@end
@implementation QXBuyNobilitySuccessViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
}
-(void)initSubViews{
self.titleLabel.text = [NSString stringWithFormat:@"恭喜您已经成功开通%@爵位",self.model.nobility_name];
[self.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:self.model.nobility_image]];
self.tableView.tableHeaderView = self.headerView;
[self.view addSubview:self.tableView];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.model.power_list.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
QXNobilityBuyDesCell *cell = [QXNobilityBuyDesCell cellWithTableView:tableView];
QXNobilityGetPricePowerList *md = self.model.power_list[indexPath.row];
cell.titleLabel.text = md.content;
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 36;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 42)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, SCREEN_WIDTH-32, 30)];
label.font = [UIFont boldSystemFontOfSize:16];
label.text = @"骑士特权";
label.textColor = RGB16A(0x000000, 0.85);
[header addSubview:label];
return header;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 42;
}
-(UITableView *)tableView{
if (!_tableView) {
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight) style:UITableViewStyleGrouped];
self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
return _tableView;
}
-(UIView *)headerView{
if (!_headerView) {
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, 280)];
[_headerView addSubview:self.resultImageView];
[_headerView addSubview:self.resultLabel];
[_headerView addSubview:self.titleLabel];
[_headerView addSubview:self.nobilityImageView];
[self.resultImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(68);
make.height.mas_equalTo(60);
make.top.mas_equalTo(25);
make.centerX.equalTo(_headerView);
}];
[self.resultLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(22);
make.centerX.equalTo(_headerView);
make.top.equalTo(self.resultImageView.mas_bottom).offset(7);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.centerX.equalTo(_headerView);
make.top.equalTo(self.resultLabel.mas_bottom).offset(7);
}];
[self.nobilityImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(104);
make.height.mas_equalTo(104);
make.top.equalTo(self.titleLabel.mas_bottom).offset(36);
make.centerX.equalTo(_headerView);
}];
}
return _headerView;
}
-(UIImageView *)resultImageView{
if (!_resultImageView) {
_resultImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobility_pay_result_successs"]];
}
return _resultImageView;
}
-(UILabel *)resultLabel{
if (!_resultLabel) {
_resultLabel = [[UILabel alloc] init];
_resultLabel.textColor = RGB16(0x333333);
_resultLabel.font = [UIFont boldSystemFontOfSize:20];
_resultLabel.text = @"支付成功";
}
return _resultLabel;
}
-(UILabel *)titleLabel{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.textColor = RGB16A(0x000000,0.65);
_titleLabel.font = [UIFont systemFontOfSize:14];
}
return _titleLabel;
}
-(UIImageView *)nobilityImageView{
if (!_nobilityImageView) {
_nobilityImageView = [[UIImageView alloc] init];
}
return _nobilityImageView;
}
@end

View File

@@ -0,0 +1,17 @@
//
// QXNobilityBuyViewController.h
// QXLive
//
// Created by 启星 on 2025/11/7.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXNobilityBuyViewController : QXBaseViewController
/// 购买id
@property (nonatomic,strong)NSString *nobility_id;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,346 @@
//
// QXNobilityBuyViewController.m
// QXLive
//
// Created by on 2025/11/7.
//
#import "QXNobilityBuyViewController.h"
#import "QXNobilityBuyDesCell.h"
#import "QXRechargePayTypeTableCell.h"
#import "QXNobilityPriceView.h"
#import "QXMineNetwork.h"
#import "QXBuyNobilitySuccessViewController.h"
#import <AlipaySDK/AlipaySDK.h>
#import <WXApi.h>
@interface QXNobilityBuyViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)QXNobilityGetPriceModel *model;
@property (nonatomic,strong)NSMutableArray* payTypeArray;
@property (nonatomic,strong)QXNobilityPriceView *priceView;
@property (nonatomic,strong)UIView *footerView;
@property (nonatomic,strong)UIView *tableFooterView;
@property (nonatomic,assign)BOOL isSelectedAgreement;
@property (nonatomic,strong)QXPayTypeModel* selectedPayTypeModel;
@end
@implementation QXNobilityBuyViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
}
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationItem.title = @"支付";
}
- (void)initSubViews{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(paySuccess) name:noticeAlipayResult object:nil];
self.tableView.tableHeaderView = self.priceView;
self.tableView.tableFooterView = self.tableFooterView;
[self.view addSubview:self.tableView];
[self getRechargeList];
}
-(void)setNobility_id:(NSString *)nobility_id{
_nobility_id = nobility_id;
MJWeakSelf
[QXMineNetwork getNobilityPriceWithId:nobility_id successBlock:^(QXNobilityGetPriceModel * _Nonnull model) {
weakSelf.model = model;
weakSelf.priceView.model = model;
[weakSelf.tableView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf.navigationController popViewControllerAnimated:YES];
});
}];
}
-(void)getRechargeList{
MJWeakSelf
[QXMineNetwork walletPayTypeWithUserId:QXGlobal.shareGlobal.loginModel.user_id successBlock:^(QXPayTypeStatusModel * _Nonnull model) {
[weakSelf.payTypeArray removeAllObjects];
if (model.wx.is_pay_open.intValue == 1) {
[weakSelf.payTypeArray addObject:model.wx];
}
if (model.ali.is_pay_open.intValue == 1) {
[weakSelf.payTypeArray addObject:model.ali];
}
if (model.wx_tl.is_pay_open.intValue == 1) {
[weakSelf.payTypeArray addObject:model.wx_tl];
}
if (model.ali_tl.is_pay_open.intValue == 1) {
[weakSelf.payTypeArray addObject:model.ali_tl];
}
[weakSelf.tableView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)payAction{
if (!self.isSelectedAgreement) {
showToast(@"请先阅读并同意爵位用户协议");
return;
}
if (self.selectedPayTypeModel == nil) {
showToast(@"请选择支付方式");
return;
}
@weakify(self)
[QXMineNetwork rechargePayWithMoney:self.model.price coin:@"" type:self.selectedPayTypeModel.type userId:QXGlobal.shareGlobal.loginModel.user_id typeId:@"" nobility_id:self.nobility_id successBlock:^(NSDictionary * _Nonnull dict) {
@strongify(self)
if (self.selectedPayTypeModel.type.intValue == 2) {
NSDictionary *resultDict = dict[@"data"];
NSString *order = [NSString stringWithFormat:@"%@",resultDict[@"ali"]];
[[AlipaySDK defaultService] payOrder:order fromScheme:AppScheme callback:^(NSDictionary *resultDic) {
NSLog(@"支付宝H5支付回调 - %@", resultDic);
}];
}else if (self.selectedPayTypeModel.type.intValue == 1) {
NSDictionary *resultDict = dict[@"data"][@"wx"];
NSString *appid = resultDict[@"appid"];
NSString *partnerId = resultDict[@"partnerid"];
NSString *prepayId = [NSString stringWithFormat:@"%@",resultDict[@"prepayid"]];
NSString *nonceStr = resultDict[@"noncestr"];
UInt32 timeStamp = (UInt32)[resultDict[@"timestamp"] intValue];
NSString *package = resultDict[@"package"];
NSString *sign = resultDict[@"sign"];
PayReq *req = [[PayReq alloc] init];
req.openID = appid;
req.partnerId = partnerId;
req.prepayId = prepayId;
req.nonceStr = nonceStr;
req.timeStamp = timeStamp;
req.package = package;
req.sign = sign;
[WXApi sendReq:req completion:^(BOOL success) {
}];
}
else if (self.selectedPayTypeModel.type.intValue == 4) {
NSMutableDictionary*dic = [NSMutableDictionary dictionaryWithDictionary:dict[@"data"][@"tl"]];
[dic removeObjectForKey:@"json_data"];
NSString *json = [dic jsonStringEncoded];
NSString *thirdPartSchema = [NSString stringWithFormat:@"thirdPartSchema=%@://",AppScheme];
NSString *json1 = [json stringByReplacingOccurrencesOfString:@"\\" withString:@""];
NSCharacterSet *customSet1 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
// NSCharacterSet *customSet2 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
NSCharacterSet *customSet3 = [[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]{}\""] invertedSet];
NSString *json2 = [json1 stringByAddingPercentEncodingWithAllowedCharacters:customSet1];
NSString *encodedString = [thirdPartSchema stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *queryString = [NSString stringWithFormat:@"payinfo=%@", json2];
NSString *doubleEncodedQuery = [queryString stringByAddingPercentEncodingWithAllowedCharacters:customSet3];
NSString *jumpStr = [NSString stringWithFormat:@"alipays://platformapi/startapp?appId=2021001104615521&page=pages/orderDetail/orderDetail&%@&query=%@",encodedString,doubleEncodedQuery];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:jumpStr] options:@{} completionHandler:nil];
}else if (self.selectedPayTypeModel.type.intValue == 5) {
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_e64a1a89a0ad";
NSDictionary *dic = dict[@"data"][@"tl"];
NSString *param = @"";
for (NSString*key in dic.allKeys) {
if (param.length == 0) {
param = [param stringByAppendingFormat:@"%@=%@",key,dic[key]];
}else{
param = [param stringByAppendingFormat:@"&%@=%@",key,dic[key]];
}
}
launchMiniProgramReq.path = [NSString stringWithFormat:@"pages/orderDetail/orderDetail?%@",param];
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease;
[WXApi sendReq:launchMiniProgramReq completion:nil];
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)paySuccess{
QXBuyNobilitySuccessViewController *vc = [[QXBuyNobilitySuccessViewController alloc] init];
vc.model = self.model;
[self.navigationController pushViewController:vc animated:YES];
}
-(void)agreementAction{
// id = 30;
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"30"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.navigationController pushViewController:vc animated:YES];
}
-(void)selectedAction:(UIButton*)sender{
sender.selected = !sender.selected;
self.isSelectedAgreement = sender.isSelected;
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 2;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (section == 0) {
return self.payTypeArray.count;
}else{
return self.model.power_list.count;
}
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
QXRechargePayTypeTableCell *cell = [QXRechargePayTypeTableCell cellWithTableView:tableView];
cell.model = self.payTypeArray[indexPath.row];
return cell;
}else{
QXNobilityBuyDesCell *cell = [QXNobilityBuyDesCell cellWithTableView:tableView];
QXNobilityGetPricePowerList *md = self.model.power_list[indexPath.row];
cell.titleLabel.text = md.content;
return cell;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 36;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
if (section == 0) {
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 42)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, SCREEN_WIDTH-32, 30)];
label.font = [UIFont boldSystemFontOfSize:16];
label.text = @"支付方式";
label.textColor = RGB16A(0x000000, 0.85);
[header addSubview:label];
return header;
}else{
return nil;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section == 0) {
return 42;
}else{
return 0;
}
}
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
if (section == 0) {
return self.footerView;
}
return nil;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
if (section == 0) {
return self.footerView.height;
}
return 0;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0) {
QXPayTypeModel *model = self.payTypeArray[indexPath.row];
if (model == self.selectedPayTypeModel) {
return;
}
if (self.selectedPayTypeModel) {
self.selectedPayTypeModel.isSelected = NO;
}
model.isSelected = YES;
self.selectedPayTypeModel = model;
[tableView reloadData];
}
}
-(UITableView *)tableView{
if (!_tableView) {
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight) style:UITableViewStyleGrouped];
self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
return _tableView;
}
-(QXNobilityPriceView *)priceView{
if (!_priceView) {
_priceView = [[QXNobilityPriceView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 187)];
}
return _priceView;
}
-(UIView *)footerView{
if (!_footerView) {
_footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 120)];
UIButton *payBtn = [[UIButton alloc] initWithFrame:CGRectMake(37, 28, SCREEN_WIDTH-37*2, 42)];
payBtn.backgroundColor = QXConfig.themeColor;
[payBtn addRoundedCornersWithRadius:21];
[payBtn setTitle:@"立即支付" forState:(UIControlStateNormal)];
[payBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
payBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[payBtn addTarget:self action:@selector(payAction) forControlEvents:(UIControlEventTouchUpInside)];
[_footerView addSubview:payBtn];
UILabel *titleLabel = [[UILabel alloc] init];
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:@"点击支付即表示您同意《爵位用户协议》"];
[attr yy_setColor:QXConfig.textColor range:NSMakeRange(0, attr.length)];
[attr yy_setColor:QXConfig.themeColor range:NSMakeRange(attr.length-8, 8)];
[attr yy_setFont:[UIFont systemFontOfSize:12] range:NSMakeRange(0, attr.length)];
titleLabel.attributedText = attr;
[titleLabel sizeToFit];
titleLabel.x = (SCREEN_WIDTH-titleLabel.width)/2+15;
titleLabel.y = payBtn.bottom+9;
titleLabel.height = 30;
[_footerView addSubview:titleLabel];
UIButton *agreementBtn = [[UIButton alloc] initWithFrame:CGRectMake(titleLabel.right-100, titleLabel.top, 100, 30)];
[agreementBtn addTarget:self action:@selector(agreementAction) forControlEvents:(UIControlEventTouchUpInside)];
[_footerView addSubview:agreementBtn];
UIButton *selectedBtn = [[UIButton alloc] initWithFrame:CGRectMake(titleLabel.left-30, titleLabel.top, 30, 30)];
[selectedBtn setImage:[UIImage imageNamed:@"login_agreement_nor"] forState:(UIControlStateNormal)];
[selectedBtn setImage:[UIImage imageNamed:@"login_agreement_sel"] forState:(UIControlStateSelected)];
[selectedBtn addTarget:self action:@selector(selectedAction:) forControlEvents:(UIControlEventTouchUpInside)];
[_footerView addSubview:selectedBtn];
}
return _footerView;
}
-(UIView *)tableFooterView{
if (!_tableFooterView) {
_tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 90)];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobility_desc_icon"]];
imageView.frame = CGRectMake(16, 15, 18, 18);
[_tableFooterView addSubview:imageView];
UILabel *titleLabel =[[ UILabel alloc] initWithFrame:CGRectMake(imageView.right+5, 15, 100, 18)];
titleLabel.textColor = QXConfig.textColor;
titleLabel.text = @"升级说明";
titleLabel.font = [UIFont boldSystemFontOfSize:16];
[_tableFooterView addSubview:titleLabel];
UILabel *bottomLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, imageView.bottom+10, SCREEN_WIDTH-16*2, 42)];
bottomLabel.numberOfLines = 0;
bottomLabel.textColor = QXConfig.textColor;
bottomLabel.font = [UIFont systemFontOfSize:14];
bottomLabel.text = @"如果您当前已有爵位,升级时将自动计算剩余价值抵扣新爵位费用";
[_tableFooterView addSubview:bottomLabel];
}
return _tableFooterView;
}
-(NSMutableArray *)payTypeArray{
if (!_payTypeArray) {
_payTypeArray = [NSMutableArray array];
}
return _payTypeArray;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXNobilityDetailViewController.h
// QXLive
//
// Created by 启星 on 2025/11/8.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXNobilityDetailViewController : QXBaseViewController
@property (nonatomic,strong)NSString *cruuent_nobility_id;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,257 @@
//
// QXNobilityDetailViewController.m
// QXLive
//
// Created by on 2025/11/8.
//
#import "QXNobilityDetailViewController.h"
#import "GKCycleScrollView.h"
#import "QXNobilityDetailTopCell.h"
#import "QXMineNetwork.h"
#import "QXNobilityDetailCell.h"
#import "QXNobilityBuyViewController.h"
@interface QXNobilityDetailViewController ()<GKCycleScrollViewDataSource,GKCycleScrollViewDelegate,UICollectionViewDelegate,UICollectionViewDataSource>
@property (nonatomic,strong)GKCycleScrollView *cycleScrollView;
@property (nonatomic,strong)UIView *headerView;
@property (nonatomic,strong)UIImageView *headerImageView;
@property (nonatomic,strong)UILabel *headerLabel;
@property (nonatomic,strong)UICollectionView *collectionView;
@property (nonatomic,strong)QXNobilityListModel *currentModel;
@property (nonatomic,strong)UIView *bottomView;
@property (nonatomic,strong)UIImageView *bottomImageView;
@property (nonatomic,strong)UILabel *bottomLabel;
@property (nonatomic,strong)UIButton *openBtn;
@property (nonatomic,assign)NSInteger currentIndex;
@end
@implementation QXNobilityDetailViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0xffffff)};
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0x000000)};
}
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationTintColor = RGB16(0xffffff);
self.navigationItem.title = @"爵位详情";
UIButton*createBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[createBtn setImage:[UIImage imageNamed:@"nobility_help_icon"] forState:(UIControlStateNormal)];
createBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentTrailing;
[createBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:createBtn];
}
-(void)helpAction{
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"29"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.navigationController pushViewController:vc animated:YES];
}
-(void)getData{
MJWeakSelf
[QXMineNetwork getNobilityListSuccessBlock:^(NSArray<QXNobilityListModel *> * _Nonnull list) {
[weakSelf.dataArray removeAllObjects];
[weakSelf.dataArray addObjectsFromArray:list];
weakSelf.currentModel = weakSelf.dataArray.firstObject;
weakSelf.headerLabel.text = [NSString stringWithFormat:@"专属特权%@",self.currentModel.power.count_str];
[weakSelf setPirce];
for (NSInteger i = 0;i<weakSelf.dataArray.count;i++) {
QXNobilityListModel*md = weakSelf.dataArray[i];
if ([md.lid isEqualToString:weakSelf.cruuent_nobility_id]) {
weakSelf.currentIndex = i;
break;
}
}
weakSelf.cycleScrollView.defaultSelectIndex = weakSelf.currentIndex;
[weakSelf.cycleScrollView reloadData];
[weakSelf.collectionView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)initSubViews{
[self updateBgImage:@"nobility_detail_bg"];
[self.view addSubview:self.headerView];
[self.view addSubview:self.cycleScrollView];
[self.view addSubview:self.bottomView];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
int itemWidth = (SCREEN_WIDTH-16*2-8*2)/3;
layout.itemSize = CGSizeMake(itemWidth, itemWidth);
layout.minimumLineSpacing = 8;
layout.minimumInteritemSpacing = 8;
layout.sectionInset = UIEdgeInsetsMake(0, 16, 0, 16);
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.headerView.bottom+16, SCREEN_WIDTH, SCREEN_HEIGHT-self.headerView.bottom-16-24-80) collectionViewLayout:layout];
[self.collectionView registerNib:[UINib nibWithNibName:@"QXNobilityDetailCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"QXNobilityDetailCell"];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.collectionView.showsHorizontalScrollIndicator = NO;
self.collectionView.bounces = NO;
self.collectionView.pagingEnabled = NO;
self.collectionView.backgroundColor = [UIColor clearColor];
[self.view addSubview:self.collectionView];
}
-(void)setPirce{
NSString *price = [NSString stringWithFormat:@"%@开通:%@/%@天",self.currentModel.name,self.currentModel.pay_price,self.currentModel.day];
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:price];
[attr yy_setColor:RGB16(0xFFDA7E) range:[price rangeOfString:self.currentModel.pay_price]];
self.bottomLabel.attributedText = attr;
}
-(void)openAction{
QXNobilityBuyViewController *vc = [[QXNobilityBuyViewController alloc] init];
vc.nobility_id = self.currentModel.lid;
[self.navigationController pushViewController:vc animated:YES];
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.currentModel.power.list.count;
}
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
QXNobilityDetailCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXNobilityDetailCell" forIndexPath:indexPath];
cell.model = self.currentModel.power.list[indexPath.row];
return cell;
}
#pragma mark - GKCycleScrollViewDataSource,GKCycleScrollViewDelegate
- (NSInteger)numberOfCellsInCycleScrollView:(GKCycleScrollView *)cycleScrollView {
return self.dataArray.count;
}
- (GKCycleScrollViewCell *)cycleScrollView:(GKCycleScrollView *)cycleScrollView cellForViewAtIndex:(NSInteger)index {
GKCycleScrollViewCell *cell = [cycleScrollView dequeueReusableCell];
if (!cell) {
cell = [QXNobilityDetailTopCell new];
}
QXNobilityDetailTopCell *topcell = (QXNobilityDetailTopCell*)cell;
topcell.index = index;
topcell.myIndex = self.currentIndex;
topcell.model = self.dataArray[index];
return cell;
}
- (CGSize)sizeForCellInCycleScrollView:(GKCycleScrollView *)cycleScrollView {
return CGSizeMake(220, 242);
}
-(void)cycleScrollView:(GKCycleScrollView *)cycleScrollView didScrollCellToIndex:(NSInteger)index{
self.currentModel = self.dataArray[index];
dispatch_async(dispatch_get_main_queue(), ^{
self.headerLabel.text = [NSString stringWithFormat:@"专属特权%@",self.currentModel.power.count_str];
[self setPirce];
[self.collectionView reloadData];
});
_openBtn.enabled = YES;
if (![self.cruuent_nobility_id isExist]) {
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_nor"] forState:(UIControlStateNormal)];
return;
}
if (self.currentIndex<index) {
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_update"] forState:(UIControlStateNormal)];
return;
}else if (self.currentIndex==index){
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_renew"] forState:(UIControlStateNormal)];
}else{
_openBtn.enabled = NO;
}
}
- (void)cycleScrollView:(GKCycleScrollView *)cycleScrollView didSelectCellAtIndex:(NSInteger)index {
}
-(GKCycleScrollView *)cycleScrollView{
if (!_cycleScrollView) {
_cycleScrollView = [[GKCycleScrollView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, 242)];
_cycleScrollView.dataSource = self;
_cycleScrollView.delegate = self;
_cycleScrollView.minimumCellAlpha = 0.0;
_cycleScrollView.leftRightMargin = 16.0f;
_cycleScrollView.topBottomMargin = 15.0f;
_cycleScrollView.isInfiniteLoop = NO;
_cycleScrollView.isAutoScroll = NO;
}
return _cycleScrollView;
}
-(UIView *)headerView{
if (!_headerView) {
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0,self.cycleScrollView.bottom+16, SCREEN_WIDTH, ScaleWidth(35))];
[_headerView addSubview:self.headerImageView];;
[_headerView addSubview:self.headerLabel];;
}
return _headerView;
}
-(UIImageView *)headerImageView{
if (!_headerImageView) {
_headerImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobility_power_header_bg"]];
_headerImageView.contentMode = UIViewContentModeScaleToFill;
_headerImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(35));
}
return _headerImageView;
}
-(UILabel *)headerLabel{
if (!_headerLabel) {
_headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(35))];
_headerLabel.textColor = RGB16(0xFFEDBD);
_headerLabel.font = [UIFont systemFontOfSize:16];
_headerLabel.textAlignment = NSTextAlignmentCenter;
}
return _headerLabel;
}
-(UIView *)bottomView{
if (!_bottomView) {
_bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT-24-80, SCREEN_WIDTH, 80+24)];
[_bottomView addRoundedCornersWithRadius:16 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
[_bottomView addSubview:self.bottomImageView];
[_bottomView addSubview:self.openBtn];
[_bottomView addSubview:self.bottomLabel];
}
return _bottomView;
}
-(UIImageView *)bottomImageView{
if (!_bottomImageView) {
_bottomImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobility_detail_bottom_bg"]];
_bottomImageView.frame = CGRectMake(0, 0, self.bottomView.width, self.bottomView.height);
}
return _bottomImageView;
}
-(UIButton *)openBtn{
if (!_openBtn) {
_openBtn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-16-128, 19, 128, 41)];
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_nor"] forState:(UIControlStateNormal)];
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_disable"] forState:(UIControlStateDisabled)];
[_openBtn addTarget:self action:@selector(openAction) forControlEvents:(UIControlEventTouchUpInside)];;
}
return _openBtn;
}
-(UILabel *)bottomLabel{
if (!_bottomLabel) {
_bottomLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 28, self.openBtn.left-16, 24)];
_bottomLabel.textColor = RGB16(0xF7EAC9);
_bottomLabel.font = [UIFont systemFontOfSize:16];
}
return _bottomLabel;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXNobilityViewController.h
// QXLive
//
// Created by 启星 on 2025/11/7.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXNobilityViewController : QXBaseViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,176 @@
//
// QXNobilityViewController.m
// QXLive
//
// Created by on 2025/11/7.
//
#import "QXNobilityViewController.h"
#import "QXNobilityHeaderView.h"
#import "QXNobilityContentView.h"
#import "QXMineNetwork.h"
#import "QXSeatHeaderView.h"
#import "QXNobilityDetailViewController.h"
#import "QXNobilityBuyViewController.h"
@interface QXNobilityViewController ()<QXNobilityHeaderViewDelegate>
@property (nonatomic,strong)QXNobilityHeaderView *topView;
@property (nonatomic,strong)UIView *nobilityBgView;
@property (nonatomic,strong)UIView *nobilityContentView;
@property (nonatomic,strong)UILabel *nobilityTitleLabel;
//@property (nonatomic,strong)JXCategoryTitleView *categoryView;
//@property (nonatomic,strong)JXCategoryListContainerView *containerView;
@property (nonatomic,strong)UIView *bottomView;
@property (nonatomic,strong)QXSeatHeaderView *userAvatarView;
@property (nonatomic,strong)UILabel *bottomNickNameLabel;
@property (nonatomic,strong)UIButton *bottomBuyBtn;
@property (nonatomic,strong)NSMutableArray *titles;
@property (nonatomic,strong)QXNobilityContentView *contentView;;
@property (nonatomic,strong)QXNobilityModel* model;
@end
@implementation QXNobilityViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0xffffff)};
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0x000000)};
}
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationTintColor = RGB16(0xffffff);
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobility_nav_icon"]];
imageView.frame = CGRectMake(0, 0, 71, 18);
self.navigationItem.titleView = imageView;
UIButton*createBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[createBtn setImage:[UIImage imageNamed:@"nobility_help_icon"] forState:(UIControlStateNormal)];
createBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentTrailing;
[createBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:createBtn];
}
- (void)initSubViews{
[self updateBgImage:@"home_rank_vc_bg"];
self.topView = [[QXNobilityHeaderView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH,0)];
self.topView.delegate = self;
[self.view addSubview:self.topView];
self.nobilityBgView = [[UIView alloc] initWithFrame:CGRectMake(16, self.topView.bottom, SCREEN_WIDTH-32, SCREEN_HEIGHT-self.topView.bottom-80)];
self.nobilityBgView.backgroundColor = RGB16(0x1E2127);
self.nobilityBgView.layer.borderWidth = 1;
self.nobilityBgView.layer.borderColor = RGB16A(0xF5E9D1, 0.2).CGColor;
[self.nobilityBgView addRoundedCornersWithRadius:12];
[self.view addSubview:self.nobilityBgView];
self.nobilityContentView = [[UIView alloc] initWithFrame:CGRectMake(12, 12, self.nobilityBgView.width-24, self.nobilityBgView.height-24)];
[self.nobilityContentView addRoundedCornersWithRadius:6];
[self.nobilityBgView addSubview:self.nobilityContentView];
[self.view addSubview:self.bottomView];
self.contentView = [[QXNobilityContentView alloc] initWithFrame:self.nobilityContentView.bounds];
[self.nobilityContentView addSubview:self.contentView];
}
-(void)getData{
MJWeakSelf
[QXMineNetwork getUserNobilitSuccessBlock:^(QXNobilityModel * _Nonnull model) {
weakSelf.model = model;
weakSelf.topView.model = model;
weakSelf.contentView.model = model;
[weakSelf.contentView reloadData];
if (weakSelf.model.nobility_info.status.intValue == 0) {
weakSelf.bottomView.hidden = YES;;
}else{
[weakSelf.userAvatarView setHeadIcon:model.user_info.avatar dress:@""];
weakSelf.bottomNickNameLabel.text = [NSString stringWithFormat:@"%@的当前爵位状态是%@",model.user_info.nickname,model.nobility_info.name];
weakSelf.bottomView.hidden = NO;;
}
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(void)helpAction{
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"29"];
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
vc.urlStr = urlString;
[self.navigationController pushViewController:vc animated:YES];
}
-(void)buyAction{
QXNobilityDetailViewController *vc = [[QXNobilityDetailViewController alloc] init];
vc.cruuent_nobility_id = self.model.nobility_info.lid;
[self.navigationController pushViewController:vc animated:YES];
}
///
-(void)didOpenNobility{
QXNobilityDetailViewController *vc = [[QXNobilityDetailViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
///
-(void)didRenewNobility{
QXNobilityBuyViewController *vc = [[QXNobilityBuyViewController alloc] init];
vc.nobility_id = self.model.nobility_info.lid;
[self.navigationController pushViewController:vc animated:YES];
}
-(NSMutableArray *)titles{
if (!_titles) {
_titles = [NSMutableArray array];
}
return _titles;
}
-(UIView *)bottomView{
if (!_bottomView) {
_bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT-57, SCREEN_WIDTH, 57)];
[_bottomView addRoundedCornersWithRadius:20 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobility_my_info_bg"]];
imageView.frame = _bottomView.bounds;
[_bottomView addSubview:imageView];
[_bottomView addSubview:self.userAvatarView];
[_bottomView addSubview:self.bottomNickNameLabel];
[_bottomView addSubview:self.bottomBuyBtn];
}
return _bottomView;
}
-(QXSeatHeaderView *)userAvatarView{
if (!_userAvatarView) {
_userAvatarView = [[QXSeatHeaderView alloc] initWithFrame:CGRectMake(12, 12, 30, 30)];
// [_userAvatarView setHeadIcon:QXGlobal.shareGlobal.loginModel.avatar dress:@""];
}
return _userAvatarView;
}
-(UIButton *)bottomBuyBtn{
if (!_bottomBuyBtn) {
_bottomBuyBtn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-14-118, (57-36)/2, 118, 36)];
[_bottomBuyBtn setBackgroundImage:[UIImage imageNamed:@"nobility_update_btn"] forState:(UIControlStateNormal)];
[_bottomBuyBtn addTarget:self action:@selector(buyAction) forControlEvents:(UIControlEventTouchUpInside)];
}
return _bottomBuyBtn;
}
-(UILabel *)bottomNickNameLabel{
if (!_bottomNickNameLabel) {
_bottomNickNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.userAvatarView.right+6, 0, self.bottomBuyBtn.left-self.userAvatarView.right-20, 57)];
// _bottomNickNameLabel.text = QXGlobal.shareGlobal.loginModel.nickname;
_bottomNickNameLabel.textColor = RGB16(0xF5E9D1);
_bottomNickNameLabel.font = [UIFont systemFontOfSize:12];
}
return _bottomNickNameLabel;
}
@end

View File

@@ -0,0 +1,19 @@
//
// QXGiftWallSubViewController.h
// QXLive
//
// Created by 启星 on 2025/11/5.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXGiftWallSubViewController : QXBaseViewController<JXCategoryListContentViewDelegate>
/// 是否为已点亮
@property(nonatomic,assign)BOOL isLight;
/// 数据源
@property(nonatomic,strong)NSArray<QXUserGiftWallModel*> *giftArray;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,62 @@
//
// QXGiftWallSubViewController.m
// QXLive
//
// Created by on 2025/11/5.
//
#import "QXGiftWallSubViewController.h"
#import "QXMineGiftWallCell.h"
@interface QXGiftWallSubViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
@property (nonatomic,strong)UICollectionView *collectionView;
@end
@implementation QXGiftWallSubViewController
-(UIView *)listView{
return self.view;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)initSubViews{
self.bgImageHidden = YES;
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
int itemWidth = (SCREEN_WIDTH-16*2-12*2)/3;
layout.itemSize = CGSizeMake(itemWidth, ScaleWidth(143));
layout.minimumLineSpacing = 12;
layout.minimumInteritemSpacing = 12;
layout.sectionInset = UIEdgeInsetsMake(0, 16, 0, 16);
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[self.collectionView registerNib:[UINib nibWithNibName:@"QXMineGiftWallCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"QXMineGiftWallCell"];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.collectionView.showsHorizontalScrollIndicator = NO;
self.collectionView.bounces = NO;
self.collectionView.pagingEnabled = NO;
self.collectionView.backgroundColor = [UIColor clearColor];
[self.view addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(0);
make.top.mas_equalTo(0);
make.bottom.mas_equalTo(0);
make.right.mas_equalTo(0);
}];
}
-(void)setGiftArray:(NSArray<QXUserGiftWallModel *> *)giftArray{
_giftArray = giftArray;
[self.collectionView reloadData];
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.giftArray.count;
}
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
QXMineGiftWallCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXMineGiftWallCell" forIndexPath:indexPath];
cell.isLight = self.isLight;
cell.model = self.giftArray[indexPath.row];
return cell;
}
@end

View File

@@ -0,0 +1,16 @@
//
// QXGiftWallViewController.h
// QXLive
//
// Created by 启星 on 2025/11/5.
//
#import "QXBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXGiftWallViewController : QXBaseViewController
@property (nonatomic,strong)NSString*userId;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,119 @@
//
// QXGiftWallViewController.m
// QXLive
//
// Created by on 2025/11/5.
//
#import "QXGiftWallViewController.h"
#import "QXGiftWallSubViewController.h"
#import "QXMineNetwork.h"
@interface QXGiftWallViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
@property (nonatomic,strong)JXCategoryListContainerView *containerView;
@property (nonatomic,strong)NSMutableArray <UIViewController*>*listVCArray;
@property (nonatomic,strong)NSArray*titles;
@property (nonatomic,strong)QXGiftWallSubViewController *lightVC;
@property (nonatomic,strong)QXGiftWallSubViewController *grayVC;
@end
@implementation QXGiftWallViewController
- (void)viewDidLoad {
self.isNoChangeBgImage = YES;
[super viewDidLoad];
// Do any additional setup after loading the view.
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO animated:YES];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0xffffff)};
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:RGB16(0x000000)};
}
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationItem.title = @"礼物墙";
}
-(void)initSubViews{
// if ([QXConfig.backgroundImage hasPrefix:@"http"] || [QXConfig.backgroundImage hasPrefix:@"https"]) {
// [self updateBgImage:QXConfig.backgroundImage];
// }else{
[self updateBgImage:@"home_rank_vc_bg"];
// }
self.navigationTintColor = RGB16(0xffffff);
self.view.backgroundColor = [UIColor clearColor];
// self.titles = @[@"房间榜", @"财富榜", @"魅力榜",@"公会榜",@"真爱榜"];
self.titles = @[@"已点亮", @"未点亮"];
self.listVCArray = [NSMutableArray array];
self.categoryView = [[JXCategoryTitleView alloc] init];
self.categoryView.frame = CGRectMake(16, NavContentHeight, SCREEN_WIDTH, 44);
self.categoryView.delegate = self;
self.categoryView.titles = self.titles;
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#ffffff"];
self.categoryView.titleColor = [UIColor colorWithHexString:@"#ffffff"];
JXCategoryIndicatorImageView *indicatorImageView = [[JXCategoryIndicatorImageView alloc] init];
indicatorImageView.indicatorImageView.image = [UIImage imageNamed:@"home_slider"];
indicatorImageView.indicatorWidth = (SCREEN_WIDTH-100)/self.titles.count;
indicatorImageView.indicatorHeight = 5;
self.categoryView.indicators = @[indicatorImageView];
self.categoryView.cellWidth = JXCategoryViewAutomaticDimension;
self.categoryView.contentEdgeInsetLeft = 5;
self.categoryView.cellSpacing = 20;
self.categoryView.titleLabelZoomScale = 1.1;
self.categoryView.titleLabelZoomEnabled = YES;
self.categoryView.titleFont = [UIFont systemFontOfSize:14];
self.categoryView.averageCellSpacingEnabled = NO;
self.containerView = [[JXCategoryListContainerView alloc] initWithType:(JXCategoryListContainerType_ScrollView) delegate:self];
self.containerView.frame = CGRectMake(0, self.categoryView.bottom, SCREEN_WIDTH, SCREEN_HEIGHT-self.categoryView.bottom);
[self.view addSubview: self.categoryView];
[self.view addSubview:self.containerView];
self.categoryView.listContainer = self.containerView;
[self getGiftWall];
}
-(void)getGiftWall{
MJWeakSelf
[QXMineNetwork userGiftWallithUserId:self.userId successBlock:^(NSArray<QXUserGiftWallModel *> * _Nonnull lightList, NSArray<QXUserGiftWallModel *> * _Nonnull grayList) {
weakSelf.lightVC.giftArray = lightList;
weakSelf.grayVC.giftArray = grayList;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
return self.titles.count;
}
-(id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index{
if (index == 0) {
return self.lightVC;
}else{
return self.grayVC;
}
}
-(QXGiftWallSubViewController *)lightVC{
if (!_lightVC) {
_lightVC = [[QXGiftWallSubViewController alloc] init];
_lightVC.isLight = YES;
}
return _lightVC;
}
-(QXGiftWallSubViewController *)grayVC{
if (!_grayVC) {
_grayVC = [[QXGiftWallSubViewController alloc] init];
_grayVC.isLight = NO;
}
return _grayVC;
}
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
}
@end

View File

@@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface QXSettingViewController : QXBaseViewController @interface QXSettingViewController : QXBaseViewController
@property (nonatomic,copy)void(^logOutBlock)(BOOL isCancel); @property (nonatomic,copy)void(^logOutBlock)(BOOL isCancel);
@property (nonatomic,assign)BOOL haveNobility;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -36,15 +36,27 @@ static NSInteger maxClickCount = 6;
self.navigationItem.title = QXText(@"设置"); self.navigationItem.title = QXText(@"设置");
} }
-(void)initSubViews{ -(void)initSubViews{
NSArray *section1 = @[ NSArray *section1;
// QXText(@"消息通知"), if (self.haveNobility) {
// QXText(@"未成年人模式"), section1 = @[
QXText(@"黑名单"), QXText(@"隐身进入房间"),
QXText(@"设置密码"), QXText(@"黑名单"),
QXText(@"手机绑定"), QXText(@"设置密码"),
QXText(@"关于我们"), QXText(@"手机绑定"),
QXText(@"版本号") QXText(@"关于我们"),
]; QXText(@"版本号")
];
}else{
section1 = @[
// QXText(@"消息通知"),
QXText(@"黑名单"),
QXText(@"设置密码"),
QXText(@"手机绑定"),
QXText(@"关于我们"),
QXText(@"版本号")
];
}
NSArray *section2 = @[ NSArray *section2 = @[
QXText(@"切换账号"), QXText(@"切换账号"),
@@ -62,7 +74,8 @@ static NSInteger maxClickCount = 6;
QXText(@"切换账号"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow], QXText(@"切换账号"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
QXText(@"实名认证"):[NSNumber numberWithInteger:QXSettingCellTypeNormal], QXText(@"实名认证"):[NSNumber numberWithInteger:QXSettingCellTypeNormal],
QXText(@"账号注销"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow], QXText(@"账号注销"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
QXText(@"退出登录"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow] QXText(@"退出登录"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
QXText(@"隐身进入房间"):[NSNumber numberWithInteger:QXSettingCellTypeSwitch]
}; };
self.controllerDict = @{ self.controllerDict = @{
@@ -89,7 +102,8 @@ static NSInteger maxClickCount = 6;
QXText(@"切换账号"):@"", QXText(@"切换账号"):@"",
QXText(@"实名认证"):@"", QXText(@"实名认证"):@"",
QXText(@"账号注销"):@"", QXText(@"账号注销"):@"",
QXText(@"退出登录"):@"" QXText(@"退出登录"):@"",
QXText(@"隐身进入房间"):QXGlobal.shareGlobal.loginModel.hide_status
}; };
[self.dataArray addObject:section1]; [self.dataArray addObject:section1];
[self.dataArray addObject:section2]; [self.dataArray addObject:section2];
@@ -111,10 +125,27 @@ static NSInteger maxClickCount = 6;
NSString *value = self.valueDict[text]; NSString *value = self.valueDict[text];
cell.titleLabel.text = text; cell.titleLabel.text = text;
cell.detailLabel.text = value; cell.detailLabel.text = value;
cell.btnSwitch.selected = value.intValue==1;
[cell.btnSwitch addTarget:self action:@selector(setHideJoinRoom:) forControlEvents:(UIControlEventTouchUpInside)];
cell.cellType = [self.cellTypeDict[text] integerValue]; cell.cellType = [self.cellTypeDict[text] integerValue];
cell.needLine = (indexPath.row>=0) && (indexPath.row < arr.count-1); cell.needLine = (indexPath.row>=0) && (indexPath.row < arr.count-1);
return cell; return cell;
} }
-(void)setHideJoinRoom:(UIButton *)sender{
sender.selected = !sender.selected;
__block NSString *status = QXGlobal.shareGlobal.loginModel.hide_status;
if ([status isEqualToString:@"0"]) {
status = @"1";
}else{
status = @"0";
}
[QXMineNetwork getNobilityPriceWithHideStatus:status successBlock:^(NSDictionary * _Nonnull dict) {
QXGlobal.shareGlobal.loginModel.hide_status = status;
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
return [UIView new]; return [UIView new];
} }

View File

@@ -40,22 +40,33 @@
// [self.dataArray addObject:@""]; // [self.dataArray addObject:@""];
// [self.tableView reloadData]; // [self.tableView reloadData];
// //
MJWeakSelf __weak typeof(self) weakSelf = self;
[QXMineNetwork roomCoinOrDiamondDetailWithPage:self.page in_out_type:[NSString stringWithFormat:@"%ld",self.type+1] start_time:self.startTime end_time:self.endTime gift_type:[NSString stringWithFormat:@"%ld",self.waterType+1] successBlock:^(NSArray<QXCoinDetailModel *> * _Nonnull list) { [QXMineNetwork roomCoinOrDiamondDetailWithPage:self.page in_out_type:[NSString stringWithFormat:@"%ld",self.type+1] start_time:self.startTime end_time:self.endTime gift_type:[NSString stringWithFormat:@"%ld",self.waterType+1] successBlock:^(NSArray<QXCoinDetailModel *> * _Nonnull list) {
if (weakSelf.page == 1) { __strong typeof(weakSelf) strongSelf = weakSelf;
[weakSelf.dataArray removeAllObjects]; if (!strongSelf) {
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
return;
} }
[weakSelf.dataArray addObjectsFromArray:list]; if (strongSelf.page == 1) {
[weakSelf.tableView reloadData]; [strongSelf.dataArray removeAllObjects];
}
[strongSelf.dataArray addObjectsFromArray:list];
[strongSelf.tableView reloadData];
if (list.count == 0) { if (list.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData; strongSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{ }else{
[weakSelf.tableView.mj_footer endRefreshing]; [strongSelf.tableView.mj_footer endRefreshing];
} }
[weakSelf.tableView.mj_header endRefreshing]; [strongSelf.tableView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
[weakSelf.tableView.mj_header endRefreshing]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.tableView.mj_footer endRefreshing]; __strong typeof(weakSelf) strongSelf = weakSelf;
if (strongSelf) {
[strongSelf.tableView.mj_header endRefreshing];
[strongSelf.tableView.mj_footer endRefreshing];
}
});
}]; }];
} }
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
@@ -91,7 +102,8 @@
_tableView.backgroundColor = [UIColor whiteColor]; _tableView.backgroundColor = [UIColor whiteColor];
_tableView.tableFooterView = [UIView new]; _tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.rowHeight = 66; _tableView.estimatedRowHeight = 66;
_tableView.rowHeight = UITableViewAutomaticDimension;
MJWeakSelf MJWeakSelf
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ _tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.page = 1; weakSelf.page = 1;

View File

@@ -43,22 +43,32 @@
self.page = 1; self.page = 1;
} }
-(void)getData{ -(void)getData{
MJWeakSelf __weak typeof(self) weakSelf = self;
[QXMineNetwork walletWithDrawRecordWithPage:self.page start_time:self.startTime end_time:self.endTime SuccessBlock:^(NSArray<QXWithDrawRecordModel *> * _Nonnull list) { [QXMineNetwork walletWithDrawRecordWithPage:self.page start_time:self.startTime end_time:self.endTime SuccessBlock:^(NSArray<QXWithDrawRecordModel *> * _Nonnull list) {
if (weakSelf.page == 1) { __strong typeof(weakSelf) strongSelf = weakSelf;
[weakSelf.dataArray removeAllObjects]; if (!strongSelf) {
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
return;
} }
[weakSelf.dataArray addObjectsFromArray:list]; if (strongSelf.page == 1) {
[weakSelf.tableView reloadData]; [strongSelf.dataArray removeAllObjects];
}
[strongSelf.dataArray addObjectsFromArray:list];
[strongSelf.tableView reloadData];
if (list.count == 0) { if (list.count == 0) {
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData; strongSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
}else{ }else{
[weakSelf.tableView.mj_footer endRefreshing]; [strongSelf.tableView.mj_footer endRefreshing];
} }
[weakSelf.tableView.mj_header endRefreshing]; [strongSelf.tableView.mj_header endRefreshing];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
[weakSelf.tableView.mj_header endRefreshing]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf.tableView.mj_footer endRefreshing]; __strong typeof(weakSelf) strongSelf = weakSelf;
if (strongSelf) {
[strongSelf.tableView.mj_header endRefreshing];
[strongSelf.tableView.mj_footer endRefreshing];
}
});
}]; }];
} }

View File

@@ -48,6 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 平台任务列表 /// 平台任务列表
@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*usual_tasks; @property(nonatomic,strong)NSArray <QXDayTaskListModel*>*usual_tasks;
@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*teacher_tasks;
@end @end
@@ -74,6 +75,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic,strong)NSString *from_id; @property(nonatomic,strong)NSString *from_id;
/// 0 记录次数 1 计时 /// 0 记录次数 1 计时
@property(nonatomic,strong)NSString *is_time; @property(nonatomic,strong)NSString *is_time;
/// 奖励类型 1金币 2钻石
@property(nonatomic,strong)NSString *reward_type;
@end @end

View File

@@ -28,6 +28,7 @@
@"daily_tasks" : @"QXDayTaskListModel", @"daily_tasks" : @"QXDayTaskListModel",
@"usual_tasks" : @"QXDayTaskListModel", @"usual_tasks" : @"QXDayTaskListModel",
@"daily_tasks_special": @"QXDayTaskListModel", @"daily_tasks_special": @"QXDayTaskListModel",
@"teacher_tasks": @"QXDayTaskListModel",
}; };
} }

View File

@@ -0,0 +1,92 @@
//
// QXFamilyModel.h
// QXLive
//
// Created by 启星 on 2025/11/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class QXFamilyMemberModel;
@interface QXFamilyModel : NSObject
/// 群组id
@property(nonatomic,strong)NSString *group_id;
/// 家族名称
@property(nonatomic,strong)NSString *name;
/// 族长id群主id
@property(nonatomic,strong)NSString *user_id;
/// 签约次数(群组人数)
@property(nonatomic,strong)NSString *group_members_num;
/// 总计收益
@property(nonatomic,strong)NSString *group_earnings;
/// 族长信息
@property(nonatomic,strong)QXUserModel *group_owner_info;
/// 家族成员
@property(nonatomic,strong)NSArray<QXFamilyMemberModel*> *group_members_lists;
@end
@interface QXFamilyMemberModel : NSObject
/// 身价
@property(nonatomic,strong)NSString *market_value;
/// 2离线 1 在线
@property(nonatomic,assign)NSInteger is_online;
/// 昵称
@property(nonatomic,strong)NSString *nickname;
/// 头像
@property(nonatomic,strong)NSString *avatar;
/// 用户code
@property(nonatomic,strong)NSString *user_code;
/// 用户id
@property(nonatomic,strong)NSString *user_id;
/// 剩余多少天
@property(nonatomic,strong)NSString *end_time;
/// 剩余多少天
@property(nonatomic,strong)NSString *end_day;
/// 头像框
@property(nonatomic,strong)NSString *dress;
/// 头像框
@property(nonatomic,strong)NSArray *icon;
/// 麦圈
@property(nonatomic,strong)NSString *mic_cycle;
/// 爵位
@property(nonatomic,strong)NSString *nobility_image;
/// 昵称颜色
@property(nonatomic,strong)NSString *nickname_color;
/// 免费续签次数
@property(nonatomic,strong)NSString *free_renewal;
/// 今日收礼收益
@property(nonatomic,strong)NSString *today_earnings;
/// 昨日收礼收益
@property(nonatomic,strong)NSString *yesterday_earnings;
/// 是否显示续约按钮 1显示 0不显示
@property(nonatomic,strong)NSString *is_show_sign;
/// 续约身价的百分比
@property(nonatomic,strong)NSString *sign_user_ratio;
/// 续约时长
@property(nonatomic,strong)NSString *sign_times;
/// 续约免费时长
@property(nonatomic,strong)NSString *free_re_sign_day;
@end
@interface QXFamilyEarningModel : NSObject
/// 列表 id
@property(nonatomic,strong)NSString *id;
/// 用户昵称
@property(nonatomic,strong)NSString *nickname;
/// 头像
@property(nonatomic,strong)NSString *avatar;
/// 用户code
@property(nonatomic,strong)NSString *user_code;
/// 收益
@property(nonatomic,strong)NSString *earnings;
/// 时间
@property(nonatomic,strong)NSString *createtime;
/// 礼物名称
@property(nonatomic,strong)NSString *gift_name;
/// 礼物价格
@property(nonatomic,strong)NSString *gift_price;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,31 @@
//
// QXFamilyModel.m
// QXLive
//
// Created by on 2025/11/27.
//
#import "QXFamilyModel.h"
@implementation QXFamilyModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"group_owner_info" : @"QXFamilyMemberModel",
@"group_members_lists" : @"QXFamilyMemberModel",
};
}
@end
@implementation QXFamilyMemberModel
@end
@implementation QXFamilyEarningModel
@end

View File

@@ -30,6 +30,11 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *activities_id; @property (nonatomic,strong)NSString *activities_id;
/// 活动类型 10 天空之境 11 岁月之城 12时空之巅 /// 活动类型 10 天空之境 11 岁月之城 12时空之巅
@property (nonatomic,strong)NSString *gift_bag; @property (nonatomic,strong)NSString *gift_bag;
/// 是否为爵位礼物 0 打开 1 锁住
@property (nonatomic,strong)NSString *is_lock;
/// 是否为爵位礼物 0 打开 1 锁住
@property (nonatomic,strong)NSString *is_cp;
@property (nonatomic,assign)BOOL isSelected; @property (nonatomic,assign)BOOL isSelected;
@end @end

View File

@@ -8,9 +8,10 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "QXGiftModel.h" #import "QXGiftModel.h"
#import "QXSongListModel.h" #import "QXSongListModel.h"
#import "QXUserSongListModel.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@class QXRoomInfoModel,QXRoomPitModel,QXRoomOwnerModel,QXHeadLineModel,QXRoomAuction,QXRoomAuctionUser,QXRoomCpUser,QXRoomPkInfo,QXRoomFriendInfo,QXRoomFriendHeartListModel,QXRoomActivitySubModel,QXRoomActivityModel; @class QXRoomInfoModel,QXRoomPitModel,QXRoomOwnerModel,QXHeadLineModel,QXRoomAuction,QXRoomAuctionUser,QXRoomCpUser,QXRoomPkInfo,QXRoomFriendInfo,QXRoomFriendHeartListModel,QXRoomActivitySubModel,QXRoomActivityModel,QXSingerInfo,QXRoomSignInfo;
@interface QXRoomModel : NSObject @interface QXRoomModel : NSObject
/// 房间信息 /// 房间信息
@property (nonatomic,strong)QXRoomInfoModel *room_info; @property (nonatomic,strong)QXRoomInfoModel *room_info;
@@ -20,6 +21,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXRoomOwnerModel *user_info; @property (nonatomic,strong)QXRoomOwnerModel *user_info;
/// 当前演唱者信息 /// 当前演唱者信息
@property (nonatomic,strong)QXSongListModel *song_user_info; @property (nonatomic,strong)QXSongListModel *song_user_info;
/// 点唱房演唱者信息
@property (nonatomic,strong)QXSingerInfo *singer_info;
/// 下一首歌曲信息 /// 下一首歌曲信息
@property (nonatomic,strong)QXSongListModel *nextInfo; @property (nonatomic,strong)QXSongListModel *nextInfo;
/// 拍卖房信息 /// 拍卖房信息
@@ -30,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)QXRoomPkInfo *pk_info; @property (nonatomic,strong)QXRoomPkInfo *pk_info;
/// 交友房信息 /// 交友房信息
@property (nonatomic,strong)QXRoomFriendInfo *friend_info; @property (nonatomic,strong)QXRoomFriendInfo *friend_info;
/// 签约房信息
@property (nonatomic,strong)QXRoomSignInfo *sign_info;
/// k歌麦位 /// k歌麦位
@property (nonatomic,strong)NSArray< QXRoomPitModel*> *song_pit_list; @property (nonatomic,strong)NSArray< QXRoomPitModel*> *song_pit_list;
/// 活动 /// 活动
@@ -115,6 +120,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *is_host; @property (nonatomic,strong)NSString *is_host;
/// 是否是管理 1是管理员 0不是 /// 是否是管理 1是管理员 0不是
@property (nonatomic,strong)NSString *is_management; @property (nonatomic,strong)NSString *is_management;
/// 麦圈
@property (nonatomic,strong)NSString *mic_cycle;
/// 爵位图片
@property (nonatomic,strong)NSString *nobility_image;
/// 用户昵称颜色
@property (nonatomic,strong)NSString *nickname_color;
@property (nonatomic,assign)BOOL isSelected; @property (nonatomic,assign)BOOL isSelected;
@end @end
@@ -154,6 +166,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 装扮 /// 装扮
@property (nonatomic,strong)NSString *dress; @property (nonatomic,strong)NSString *dress;
/// 麦圈
@property (nonatomic,strong)NSString *mic_cycle;
@end @end
@interface QXRoomOnlineList : NSObject @interface QXRoomOnlineList : NSObject
@@ -268,6 +283,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *base_image; @property (nonatomic,strong)NSString *base_image;
/// 礼物价值 /// 礼物价值
@property (nonatomic,strong)NSString *gift_price; @property (nonatomic,strong)NSString *gift_price;
/// 礼物名称
@property (nonatomic,strong)NSString *nobility_image;
/// 礼物图标
@property (nonatomic,strong)NSString *nickname_color;
/// 礼物价值
@property (nonatomic,strong)NSString *mic_cycle;
/// 关系拍卖时间 /// 关系拍卖时间
@property (nonatomic,strong)NSString *time_day; @property (nonatomic,strong)NSString *time_day;
/// 头像装扮 /// 头像装扮
@@ -359,4 +380,26 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *xlh_status; @property (nonatomic,strong)NSString *xlh_status;
@property (nonatomic,assign)long end_time; @property (nonatomic,assign)long end_time;
@end @end
@interface QXSingerInfo : NSObject
/// 心动值
@property (nonatomic,strong)QXUserSongListModel *song_info;
@property (nonatomic,strong)QXUserSongListModel *next_song_info;
@end
@interface QXRoomSignInfo :NSObject
/// 0 未开始 1进行中
@property (nonatomic,strong)NSString *sign_status;
/// 签约天数
@property (nonatomic,strong)NSString *sign_day;
/// 当前身价
@property (nonatomic,strong)NSString *current_body_value;
/// 倒计时 时间戳
@property (nonatomic,strong)NSString *end_time;
/// 签约场次id
@property (nonatomic,strong)NSString *sign_id;
@end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -21,6 +21,8 @@
@"song_pit_list":@"QXRoomPitModel", @"song_pit_list":@"QXRoomPitModel",
@"friend_info":@"QXRoomFriendInfo", @"friend_info":@"QXRoomFriendInfo",
@"gift_cycle":@"QXRoomActivityModel", @"gift_cycle":@"QXRoomActivityModel",
@"singer_info":@"QXSingerInfo",
@"sign_info":@"QXRoomSignInfo",
}; };
} }
@@ -143,4 +145,22 @@
@implementation QXRoomActivitySubModel @implementation QXRoomActivitySubModel
@end
@implementation QXSingerInfo
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"song_info" : @"QXUserSongListModel",
@"next_song_info" : @"QXUserSongListModel",
};
}
@end
@implementation QXRoomSignInfo
@end @end

View File

@@ -0,0 +1,21 @@
//
// QXServiceModel.h
// QXLive
//
// Created by 启星 on 2025/11/4.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXServiceModel : NSObject
/// 标题
@property (nonatomic,strong)NSString *title;
/// 类型
@property (nonatomic,assign)NSInteger type;
@property (nonatomic,strong)NSString* icon;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// QXServiceModel.m
// QXLive
//
// Created by on 2025/11/4.
//
#import "QXServiceModel.h"
@implementation QXServiceModel
@end

View File

@@ -36,6 +36,13 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, copy)NSString *dress; @property(nonatomic, copy)NSString *dress;
/// 用户魅力 /// 用户魅力
@property(nonatomic, copy)NSString *charm; @property(nonatomic, copy)NSString *charm;
/// 歌曲名称
@property(nonatomic, copy)NSString *nobility_image;
/// 演唱者
@property(nonatomic, copy)NSString *mic_cycle;
/// 歌曲封面
@property(nonatomic, copy)NSString *nickname_color;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -32,6 +32,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *type; @property (nonatomic,strong)NSString *type;
/// 剩余时间 (天) /// 剩余时间 (天)
@property (nonatomic,strong)NSString *remaining_day; @property (nonatomic,strong)NSString *remaining_day;
/// 多少个
@property (nonatomic,strong)NSString *num;
/// 降身卡
@property (nonatomic,strong)NSString *ext_value;
@end @end

View File

@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@class QXRelationshipListModel; @class QXRelationshipListModel,QXUserCpInfoModel,QXUserHeartBeatSpaceLogModel;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface QXUserModel : NSObject @interface QXUserModel : NSObject
@@ -39,12 +39,28 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *auth; @property (nonatomic,strong)NSString *auth;
/// 是否使用靓号 0未使用 1 已使用 /// 是否使用靓号 0未使用 1 已使用
@property (nonatomic,strong)NSString *is_use_code; @property (nonatomic,strong)NSString *is_use_code;
/// 在线状态 /// 爵位图片
@property (nonatomic,assign)BOOL is_online; @property (nonatomic,strong)NSString *nobility_image;
/// 昵称颜色
@property (nonatomic,strong)NSString *nickname_color;
/// 是否可以设置隐身进入的状态0-不行1-可以
@property (nonatomic,strong)NSString *is_hide;
/// 当前状态0-取消隐身1-隐身进入
@property (nonatomic,strong)NSString *hide_status;
/// 当前状态:-1 未认证歌手, 0待审核 1已认证 2被拒绝
@property (nonatomic,strong)NSString *singer_status;
/// 在线状态 1 在线 2 离线
@property (nonatomic,assign)NSInteger is_online;
/// 1 能聊天 0不能聊天 /// 1 能聊天 0不能聊天
@property (nonatomic,assign)NSInteger is_can_chat; @property (nonatomic,assign)NSInteger is_can_chat;
/// 需要充值金额 /// 需要充值金额
@property (nonatomic,strong)NSString* can_chat_money; @property (nonatomic,strong)NSString* can_chat_money;
/// 身价
@property (nonatomic,strong)NSString* market_value;
/// 身价配置 多少金币数
@property (nonatomic,strong)NSString* market_value_coin;
/// 身价配置 多少身价数
@property (nonatomic,strong)NSString* market_value_market;
@end @end
@@ -68,6 +84,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *dress; @property (nonatomic,strong)NSString *dress;
/// 聊天气泡 /// 聊天气泡
@property (nonatomic,strong)NSString *chat_bubble; @property (nonatomic,strong)NSString *chat_bubble;
/// 爵位飘屏背景图
@property (nonatomic,strong)NSString *enter_image;
/// 爵位飘屏背景图
@property (nonatomic,strong)NSString *enter_text;
/// ip /// ip
@property (nonatomic,strong)NSString *loginip; @property (nonatomic,strong)NSString *loginip;
/// 昵称 /// 昵称
@@ -82,13 +102,19 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *room_id; @property (nonatomic,strong)NSString *room_id;
/// 各种等级 爵位 。。。图片数组 /// 各种等级 爵位 。。。图片数组
@property (nonatomic,strong)NSArray *icon; @property (nonatomic,strong)NSArray *icon;
/// 爵位图片
@property (nonatomic,strong)NSString *nobility_image;
/// 昵称颜色
@property (nonatomic,strong)NSString *nickname_color;
/// 麦圈
@property (nonatomic,strong)NSString *mic_cycle;
/// 是否关注 0 未关注 1 已关注 /// 是否关注 0 未关注 1 已关注
@property (nonatomic,assign)NSInteger is_follow; @property (nonatomic,assign)NSInteger is_follow;
/// 魅力 /// 魅力
@property (nonatomic,strong)NSString* charm; @property (nonatomic,strong)NSString* charm;
/// 是否在线 /// 是否在线 1在线 2离线
@property (nonatomic,assign)NSInteger is_online; @property (nonatomic,assign)NSInteger is_online;
/// 礼物墙数量 /// 礼物墙数量
@@ -106,6 +132,10 @@ NS_ASSUME_NONNULL_BEGIN
/// 是否使用靓号 0未使用 1 已使用 /// 是否使用靓号 0未使用 1 已使用
@property (nonatomic,strong)NSString *is_use_code; @property (nonatomic,strong)NSString *is_use_code;
@property (nonatomic,strong)QXUserCpInfoModel *cp_info;
@property (nonatomic,strong)QXUserHomeModel *master;
-(instancetype)copyModel; -(instancetype)copyModel;
@end @end
@@ -181,13 +211,21 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSArray *icon; @property (nonatomic,strong)NSArray *icon;
/// 麦位 /// 麦位
@property (nonatomic,strong)NSString *pit_number; @property (nonatomic,strong)NSString *pit_number;
/// 爵位图片
@property (nonatomic,strong)NSString *nobility_image;
/// 爵位图片
@property (nonatomic,strong)NSString *nickname_color;
/// 是否拥有转币权限 0 未开启 1 已开启 /// 是否拥有转币权限 0 未开启 1 已开启
@property (nonatomic,strong)NSString *red_status; @property (nonatomic,strong)NSString *red_status;
/// 角色 1-房主 > 2-管理员 > 3主持人 >4 普通用户 排序 /// 角色 1-房主 > 2-管理员 > 3主持人 >4 普通用户 排序
@property (nonatomic,strong)NSString *role; @property (nonatomic,strong)NSString *role;
@property (nonatomic,strong)QXRelationshipListModel *qinmi; @property (nonatomic,strong)QXUserCpInfoModel *cp_info;
@property (nonatomic,strong)QXRelationshipListModel *zhenai;
@property (nonatomic,strong)QXUserHomeModel *master;
//@property (nonatomic,strong)QXRelationshipListModel *qinmi;
//@property (nonatomic,strong)QXRelationshipListModel *zhenai;
@end @end
@@ -232,7 +270,43 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)NSString *image; @property (nonatomic,strong)NSString *image;
/// 亲密拍心动值 /// 亲密拍心动值
@property (nonatomic,strong)NSString *heart_value; @property (nonatomic,strong)NSString *heart_value;
@property (nonatomic,strong)NSString *sex2;
@property (nonatomic,strong)NSString *sex1;
/// 1-置顶0-不置顶 /// 1-置顶0-不置顶
@property (nonatomic,strong)NSString *is_top; @property (nonatomic,strong)NSString *is_top;
@end @end
@interface QXUserCpInfoModel : NSObject
@property (nonatomic,strong)NSString *name;
@property (nonatomic,strong)NSString *user_id1;
@property (nonatomic,strong)NSString *user_id2;
@property (nonatomic,strong)NSString *level;
@property (nonatomic,strong)NSString *exp;
@property (nonatomic,strong)NSString *next_level_exp;
@property (nonatomic,strong)NSString *createtime;
/// 挂件(装扮)地址
@property (nonatomic,strong)NSString *pendant;
/// 挂件上的头像位置0-上1-右上2-右3-右下4-下5-左下6-左7-左上'
@property (nonatomic,strong)NSString *direction;
@property (nonatomic,strong)QXUserModel *user_info1;
@property (nonatomic,strong)QXUserModel *user_info2;
@property (nonatomic,strong)NSArray< QXUserHeartBeatSpaceLogModel *>*gift_log;
@end
@interface QXUserHeartBeatSpaceLogModel : NSObject
@property (nonatomic,strong)NSString *id;
@property (nonatomic,strong)NSString *room_id;
@property (nonatomic,strong)NSString *from_user_id;
@property (nonatomic,strong)NSString *to_user_id;
@property (nonatomic,strong)NSString *gift_id;
@property (nonatomic,strong)NSString *cp_zone_id;
@property (nonatomic,strong)NSString *exp;
@property (nonatomic,strong)NSString *exp_total;
@property (nonatomic,strong)NSString *createtime;
@property (nonatomic,strong)NSString *gift_name;
@property (nonatomic,strong)NSString *num;
@property (nonatomic,strong)NSString *remark;
@property (nonatomic,strong)QXUserModel *from_user_info;
@property (nonatomic,strong)QXUserModel *to_user_info;
@end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -16,7 +16,11 @@
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{ +(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{@"tag_list" : @"QXUserTag"}; return @{
@"tag_list" : @"QXUserTag",
@"cp_info": @"QXUserCpInfoModel",
@"master": @"QXUserHomeModel",
};
} }
@@ -56,8 +60,10 @@
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{ +(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{ return @{
@"qinmi" : @"QXRelationshipListModel", // @"qinmi" : @"QXRelationshipListModel",
@"zhenai" : @"QXRelationshipListModel" // @"zhenai" : @"QXRelationshipListModel"
@"cp_info": @"QXUserCpInfoModel",
@"master": @"QXUserHomeModel",
}; };
} }
@@ -78,4 +84,33 @@
@implementation QXRelationshipListModel @implementation QXRelationshipListModel
@end
@implementation QXUserCpInfoModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
// @"qinmi" : @"QXRelationshipListModel",
// @"zhenai" : @"QXRelationshipListModel"
@"user_info1": @"QXUserModel",
@"user_info2": @"QXUserModel",
@"gift_log" : @"QXUserHeartBeatSpaceLogModel"
};
}
@end
@implementation QXUserHeartBeatSpaceLogModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
// @"qinmi" : @"QXRelationshipListModel",
// @"zhenai" : @"QXRelationshipListModel"
@"from_user_info": @"QXUserModel",
@"to_user_info": @"QXUserModel",
};
}
@end @end

View File

@@ -0,0 +1,27 @@
//
// QXNobilityGetPriceModel.h
// QXLive
//
// Created by 启星 on 2025/11/8.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class QXNobilityGetPricePowerList;
@interface QXNobilityGetPriceModel : NSObject
@property (nonatomic,strong)NSString *lid;
@property (nonatomic,strong)NSString *nobility_name;
@property (nonatomic,strong)NSString *nobility_image;
@property (nonatomic,strong)NSString *price;
@property (nonatomic,strong)NSString *pay_price;
@property (nonatomic,strong)NSString *day;
@property (nonatomic,strong)NSArray<QXNobilityGetPricePowerList*> *power_list;
@end
@interface QXNobilityGetPricePowerList : NSObject
@property (nonatomic,strong)NSString *id;
@property (nonatomic,strong)NSString *content;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,23 @@
//
// QXNobilityGetPriceModel.m
// QXLive
//
// Created by on 2025/11/8.
//
#import "QXNobilityGetPriceModel.h"
@implementation QXNobilityGetPriceModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"power_list" : @"QXNobilityGetPricePowerList",
};
}
@end
@implementation QXNobilityGetPricePowerList
@end

View File

@@ -0,0 +1,37 @@
//
// QXNobilityListModel.h
// QXLive
//
// Created by 启星 on 2025/11/8.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class QXNobilityPower,QXNobilityPowerList;
@interface QXNobilityListModel : NSObject
@property (nonatomic,strong)NSString *name;
@property (nonatomic,strong)NSString *image;
@property (nonatomic,strong)NSString *pay_price;
@property (nonatomic,strong)NSString *lid;
@property (nonatomic,strong)NSString *day;
@property (nonatomic,strong)QXNobilityPower *power;
@end
@interface QXNobilityPower : NSObject
@property (nonatomic,strong)NSString *power_count;
@property (nonatomic,strong)NSString *this_power_count;
@property (nonatomic,strong)NSString *count_str;
@property (nonatomic,strong)NSArray<QXNobilityPowerList*>*list;
@end
@interface QXNobilityPowerList :NSObject
@property (nonatomic,strong)NSString *id;
@property (nonatomic,strong)NSString *name;
@property (nonatomic,strong)NSString *content;
@property (nonatomic,strong)NSString *image;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,32 @@
//
// QXNobilityListModel.m
// QXLive
//
// Created by on 2025/11/8.
//
#import "QXNobilityListModel.h"
@implementation QXNobilityListModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"power" : @"QXNobilityPower",
};
}
@end
@implementation QXNobilityPower
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"list" : @"QXNobilityPowerList",
};
}
@end
@implementation QXNobilityPowerList
@end

View File

@@ -0,0 +1,61 @@
//
// QXNobilityModel.h
// QXLive
//
// Created by 启星 on 2025/11/7.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class QXUserNobility,QXNobilityLevel,QXNobilityInfo;
@interface QXNobilityModel : NSObject
/// 爵位信息
@property (nonatomic,strong)QXUserModel *user_info;
@property (nonatomic,strong)QXUserNobility *nobility_info;
@property (nonatomic,strong)NSArray<QXNobilityLevel *>* nobility_power_list;
@end
@interface QXUserNobility : NSObject
///状态: 0去开通 1去续费
@property (nonatomic,strong)NSString *status;
///权限ID
@property (nonatomic,strong)NSString *lid;
///爵位ID
@property (nonatomic,strong)NSString *id;
/// 爵位名称
@property (nonatomic,strong)NSString *name;
///爵位图片
@property (nonatomic,strong)NSString *image;
///结束时间
@property (nonatomic,strong)NSString *end_time;
///显示类型 1状态 2文字
@property (nonatomic,strong)NSString *type;
///昵称颜色名称
@property (nonatomic,strong)NSString *nick_name_color_name;
///昵称颜色
@property (nonatomic,strong)NSString *nick_name_color;
@end
@interface QXNobilityLevel : NSObject
///爵位ID
@property (nonatomic,strong)NSString *lid;
///爵位名称
@property (nonatomic,strong)NSString *name;
///权限ID
@property (nonatomic,strong)NSString *power_ids;
///昵称颜色
@property (nonatomic,strong)NSString *nick_name_color;
///昵称颜色名称
@property (nonatomic,strong)NSString *nick_name_color_name;
///爵位名称
@property (nonatomic,strong)NSArray<QXUserNobility*> *nobility_list;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,38 @@
//
// QXNobilityModel.m
// QXLive
//
// Created by on 2025/11/7.
//
#import "QXNobilityModel.h"
@implementation QXNobilityModel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"user_info" : @"QXUserModel",
@"nobility_info" : @"QXUserNobility",
@"nobility_power_list": @"QXNobilityLevel",
};
}
@end
@implementation QXUserNobility
@end
@implementation QXNobilityLevel
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
return @{
@"nobility_list" : @"QXUserNobility",
};
}
@end

View File

@@ -25,6 +25,12 @@
#import "QXRoomHourRankModel.h" #import "QXRoomHourRankModel.h"
#import "QXRedPacketModel.h" #import "QXRedPacketModel.h"
#import "QXEmojiTypeModel.h" #import "QXEmojiTypeModel.h"
#import "QXNobilityModel.h"
#import "QXNobilityListModel.h"
#import "QXNobilityGetPriceModel.h"
#import "QXUserSongListModel.h"
#import "QXRoomBestFriendModel.h"
#import "QXFamilyModel.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@@ -289,6 +295,7 @@ NS_ASSUME_NONNULL_BEGIN
*/ */
+(void)joinRoomWithRoomId:(NSString*)room_id +(void)joinRoomWithRoomId:(NSString*)room_id
successBlock:(void (^)(QXRoomModel* roomModel))successBlock successBlock:(void (^)(QXRoomModel* roomModel))successBlock
roomErrorBlock:(void (^)(NSString * roomId, NSString * msg))roomErrorBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock; failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@@ -846,6 +853,7 @@ NS_ASSUME_NONNULL_BEGIN
type:(NSString*)type type:(NSString*)type
userId:(NSString*)userId userId:(NSString*)userId
typeId:(NSString*)typeId typeId:(NSString*)typeId
nobility_id:(NSString*)nobility_id
successBlock:(void (^)(NSDictionary* dict))successBlock successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock; failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
@@ -1155,6 +1163,238 @@ NS_ASSUME_NONNULL_BEGIN
successBlock:(void (^)(NSArray <QXEmojiModel*>* list))successBlock successBlock:(void (^)(NSArray <QXEmojiModel*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock; failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
获取爵位
*/
+(void)getUserNobilitSuccessBlock:(void (^)(QXNobilityModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
获取爵位列表
*/
+(void)getNobilityListSuccessBlock:(void (^)(NSArray<QXNobilityListModel*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
购买爵位
*/
+(void)getNobilityPriceWithId:(NSString*)Id
successBlock:(void (^)(QXNobilityGetPriceModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
开启隐身
*/
+(void)getNobilityPriceWithHideStatus:(NSString*)hide_status
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
歌手认证
*/
+(void)singerAuthWithSong:(NSString*)song
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
用户歌单
*/
+(void)getUserSongListWithRoomId:(NSString*)room_id
user_id:(NSString*)user_id
page:(NSInteger)page
SuccessBlock:(void (^)(NSArray<QXUserSongListModel*>* list,NSString*count))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
用户添加/修改/删除歌曲
type 0 添加 1 修改 2 删除
*/
+(void)mineUserAddAndDeleteAndEditWithType:(NSInteger)type
Id:(NSString*)Id
songName:(NSString*)songName
giftId:(NSString*)giftId
giftNum:(NSString*)giftNum
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
点歌
*/
+(void)requestSongWithSongId:(NSString*)songId
roomId:(NSString*)roomId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
点歌列表
*/
+(void)requestSongWithRoomId:(NSString*)roomId
type:(NSInteger)type
page:(NSInteger)page
successBlock:(void (^)(NSArray<QXUserSongListModel*>* list,NSString*count))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
歌曲置顶
*/
+(void)requestSongToTopWithId:(NSString*)Id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
获取点歌房歌曲数量
*/
+(void)requestSongCountWithRoomId:(NSString*)roomId
successBlock:(void (^)(QXUserSongListCount*model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
点唱房切歌
*/
+(void)requsetSongNextActionWithId:(NSString*)Id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
cp礼物回赠
*/
+(void)userCpReSendWithGiftId:(NSString *)giftId
userId:(NSString*)userId
roomId:(NSString*)roomId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
获取挚友列表
*/
+(void)userBestFriendsListWithUserId:(NSString*)userId
page:(NSInteger)page
successBlock:(void (^)(QXRoomBestFriendModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
更多挚友列表
*/
+(void)userBestFriendsMoreListWithUserId:(NSString*)userId
relation_id:(NSString*)relation_id
successBlock:(void (^)(NSArray< QXRelationshipListModel*>* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
亲密空间
*/
+(void)heartBeatUserInfoWithUserId:(NSString*)userId
page:(NSInteger)page
successBlock:(void (^)(QXUserCpInfoModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
我的家族|我加入的家族
*/
+(void)getMyFamilyIsJoin:(BOOL)isJoin
successBlock:(void (^)(QXFamilyModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
家族收益详情
*/
+(void)getFamilyEarningWithUserId:(NSString*)userId
page:(NSInteger)page
start_time:(NSString*)start_time
end_time:(NSString*)end_time
successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
签约出价价格列表
userId 当前在签约麦位的用户ID
*/
+(void)signCoinListWithSignId:(NSString*)signId
successBlock:(void (^)(NSArray<NSString*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
签约出价
userId 当前在签约麦位的用户ID
sign_value 出价价格
sign_id 场次id
*/
+(void)signCoinWithSign_value:(NSString*)sign_value
sign_id:(NSString*)sign_id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
签约开始
userId 当前在签约麦位的用户ID
*/
+(void)signStartWithRoomId:(NSString*)roomId
userId:(NSString*)userId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
签约结束
userId 当前在签约麦位的用户ID
signId 场次id
*/
+(void)signEndWithSignId:(NSString*)signId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
签约延时
userId 当前在签约麦位的用户ID
signId 场次id
*/
+(void)signDelayWithSignId:(NSString*)signId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
才艺列表
*/
+(void)signGeyPlayListSuccessBlock:(void (^)(NSArray* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
免费续约
userId 当前在签约麦位的用户ID
*/
+(void)signFreeResignWithUserId:(NSString*)userId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
续签
userId 当前在签约麦位的用户ID
*/
+(void)signCoinResignWithUserId:(NSString*)userId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
申请加入公会
*/
+(void)joinGuildWithGuildId:(NSString*)guild_id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
/**
在线
*/
+(void)appKeepAliveWithRoomId:(NSString*)room_id;
@end @end

View File

@@ -18,6 +18,11 @@
[QXGlobal shareGlobal].loginModel.dress = userModel.dress; [QXGlobal shareGlobal].loginModel.dress = userModel.dress;
[QXGlobal shareGlobal].loginModel.auth = userModel.auth.intValue; [QXGlobal shareGlobal].loginModel.auth = userModel.auth.intValue;
[QXGlobal shareGlobal].loginModel.chat_bubble = userModel.chat_bubble; [QXGlobal shareGlobal].loginModel.chat_bubble = userModel.chat_bubble;
[QXGlobal shareGlobal].loginModel.nobility_image = userModel.nobility_image;
[QXGlobal shareGlobal].loginModel.nickname_color = userModel.nickname_color;
[QXGlobal shareGlobal].loginModel.is_hide = userModel.is_hide;
[QXGlobal shareGlobal].loginModel.hide_status = userModel.hide_status;
[QXGlobal shareGlobal].loginModel.singer_status = userModel.singer_status;
[[QXGlobal shareGlobal] updateUserInfoWithMolde:[QXGlobal shareGlobal].loginModel]; [[QXGlobal shareGlobal] updateUserInfoWithMolde:[QXGlobal shareGlobal].loginModel];
BOOL api_version = [responseObject[@"api_version"] boolValue]; BOOL api_version = [responseObject[@"api_version"] boolValue];
[QXGlobal shareGlobal].isAppStore = api_version; [QXGlobal shareGlobal].isAppStore = api_version;
@@ -68,7 +73,7 @@
successBlock:(void (^)(QXUserHomeModel * _Nonnull))successBlock successBlock:(void (^)(QXUserHomeModel * _Nonnull))successBlock
failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{ failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{ NSDictionary *parameters =@{
@"user_id":user_id, @"user_id":user_id?:@"",
}; };
[[QXRequset shareInstance] postWithUrl:QXGetUserInfo parameters:parameters needCache:NO success:^(id responseObject) { [[QXRequset shareInstance] postWithUrl:QXGetUserInfo parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) { if (successBlock) {
@@ -280,7 +285,7 @@
successBlock:(void (^)(NSArray<QXDynamicModel *> * _Nonnull))successBlock successBlock:(void (^)(NSArray<QXDynamicModel *> * _Nonnull))successBlock
failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{ failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{ NSDictionary *parameters =@{
@"user_id":user_id, @"user_id":user_id?:@"",
@"page":[NSNumber numberWithInteger:page] @"page":[NSNumber numberWithInteger:page]
}; };
[[QXRequset shareInstance] postWithUrl:QXUserDynamic parameters:parameters needCache:NO success:^(id responseObject) { [[QXRequset shareInstance] postWithUrl:QXUserDynamic parameters:parameters needCache:NO success:^(id responseObject) {
@@ -583,15 +588,30 @@
}]; }];
} }
+(void)joinRoomWithRoomId:(NSString *)room_id successBlock:(void (^)(QXRoomModel * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{ +(void)joinRoomWithRoomId:(NSString *)room_id successBlock:(nonnull void (^)(QXRoomModel * _Nonnull))successBlock roomErrorBlock:(nonnull void (^)(NSString * _Nonnull, NSString * _Nonnull))roomErrorBlock failBlock:(nonnull void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{ NSDictionary *parameters =@{
@"room_id":room_id @"room_id":room_id
}; };
[[QXRequset shareInstance] postWithUrl:QXJoinRoom parameters:parameters needCache:NO success:^(id responseObject) { [[QXRequset shareInstance] postWithUrl:QXJoinRoom parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) { int code = [responseObject[@"code"] intValue];
QXRoomModel *model = [QXRoomModel yy_modelWithJSON:responseObject[@"data"]]; if(code == 202){
successBlock(model); id object = responseObject[@"data"];
NSString *roomId = @"";
NSString*content = @"";
if ([object isKindOfClass:[NSDictionary class]]) {
roomId = [NSString stringWithFormat:@"%@",object[@"room_id"]];
content = [NSString stringWithFormat:@"%@",object[@"msg"]];
}
if (roomErrorBlock) {
roomErrorBlock(roomId,content);
}
}else{
if (successBlock) {
QXRoomModel *model = [QXRoomModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model);
}
} }
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg); failBlock(error,msg);
}]; }];
@@ -683,10 +703,30 @@
@"pit_number":pit_number?pit_number:@"", @"pit_number":pit_number?pit_number:@"",
@"heart_id":heart_id?heart_id:@"" @"heart_id":heart_id?heart_id:@""
}; };
__block NSString *userId = to_uid;
[[QXRequset shareInstance] postWithUrl:QXSendGift parameters:parameters needCache:NO success:^(id responseObject) { [[QXRequset shareInstance] postWithUrl:QXSendGift parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) { if (successBlock) {
successBlock(responseObject[@"data"]); successBlock(responseObject[@"data"]);
} }
// NSDictionary *cp_type = [NSDictionary stringWithFormat:@"%@",responseObject[@"data"][@"cp_type"]];
id object = responseObject[@"data"][@"cp_type"];
if ([object isKindOfClass:[NSDictionary class]]) {
NSDictionary *cpDict = (NSDictionary *)object;
NSString *cp_type = [NSString stringWithFormat:@"%@",cpDict[@"cp_type"]];
if (cp_type.intValue == 1) {
/// cp
NSString *jsonStr = [cpDict jsonStringEncoded];
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:(QXRoomMessageTypeSendAndRecieveCpHeartSignal) userId:userId];
}else if (cp_type.intValue == 2){
/// cp
NSString *jsonStr = [cpDict jsonStringEncoded];
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:(QXRoomMessageTypeCpHeartFinished) userId:userId];
[[QXRoomMessageManager shared] showCpFinishedAlertViewWithText:[NSString stringWithFormat:@"%@",cpDict[@"text"]]];
}else{
}
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg); failBlock(error,msg);
}]; }];
@@ -1630,13 +1670,20 @@
}]; }];
} }
+(void)rechargePayWithMoney:(NSString *)money coin:(NSString *)coin type:(NSString *)type userId:(NSString*)userId typeId:(NSString*)typeId successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{ +(void)rechargePayWithMoney:(NSString *)money
coin:(NSString *)coin
type:(NSString *)type
userId:(NSString*)userId
typeId:(NSString*)typeId
nobility_id:(NSString*)nobility_id
successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{ NSDictionary *parameters =@{
@"coin":coin?coin:@"", @"coin":coin?coin:@"",
@"money":money?money:@"", @"money":money?money:@"",
@"type":type?type:@"", @"type":type?type:@"",
@"user_id":userId?userId:@"", @"user_id":userId?userId:@"",
@"type_id":typeId?typeId:@"" @"type_id":typeId?typeId:@"",
@"nobility_id":nobility_id?:@""
}; };
[[QXRequset shareInstance] postWithUrl:QXRechargePay parameters:parameters needCache:NO success:^(id responseObject) { [[QXRequset shareInstance] postWithUrl:QXRechargePay parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) { if (successBlock) {
@@ -2250,4 +2297,514 @@
failBlock(error,msg); failBlock(error,msg);
}]; }];
} }
+(void)getUserNobilitSuccessBlock:(void (^)(QXNobilityModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
[[QXRequset shareInstance] getWithUrl:QXGetUserNobility parameters:@{} needCache:NO success:^(id responseObject) {
if (successBlock) {
QXNobilityModel*model = [QXNobilityModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)getNobilityListSuccessBlock:(void (^)(NSArray<QXNobilityListModel*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
[[QXRequset shareInstance] getWithUrl:QXGetNobilityList parameters:@{} needCache:NO success:^(id responseObject) {
if (successBlock) {
NSArray *list = [NSArray yy_modelArrayWithClass:[QXNobilityListModel class] json:responseObject[@"data"]];
successBlock(list);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)getNobilityPriceWithId:(NSString*)Id
successBlock:(void (^)(QXNobilityGetPriceModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
[[QXRequset shareInstance] getWithUrl:QXNobilityBuy parameters:@{@"id":Id?:@""} needCache:NO success:^(id responseObject) {
if (successBlock) {
QXNobilityGetPriceModel *model = [QXNobilityGetPriceModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)getNobilityPriceWithHideStatus:(NSString *)hide_status successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{
@"hide_status":hide_status?hide_status:@"",
};
[[QXRequset shareInstance] postWithUrl:QXNobilityHideJoinRoom parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)singerAuthWithSong:(NSString*)song
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"song":song?song:@"",
};
[[QXRequset shareInstance] postWithUrl:QXMineSingerAuth parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)getUserSongListWithRoomId:(NSString *)room_id
user_id:(NSString *)user_id
page:(NSInteger)page
SuccessBlock:(void (^)(NSArray<QXUserSongListModel*>* list,NSString*count))successBlock
failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{
@"room_id":room_id?room_id:@"",
@"user_id":user_id?user_id:@"",
@"page":[NSNumber numberWithInteger:page]
};
[[QXRequset shareInstance] postWithUrl:QXMineGetSingerSongList parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
NSArray*list = [NSArray yy_modelArrayWithClass:[QXUserSongListModel class] json:responseObject[@"data"][@"lists"]];
NSString*count = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"count"]];
successBlock(list,count);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)mineUserAddAndDeleteAndEditWithType:(NSInteger)type
Id:(NSString*)Id
songName:(NSString*)songName
giftId:(NSString*)giftId
giftNum:(NSString*)giftNum
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSString *url = QXMineSingerAddSong;
if (type == 0) {
url = QXMineSingerAddSong;
}else if(type == 1){
url = QXMineSingerEidtSong;
}else{
url = QXMineSingerDeleteSong;
}
NSDictionary *parameters =@{
@"id":Id?:@"",
@"song_name":songName?:@"",
@"gift_id":giftId?:@"",
@"gift_num":giftNum?:@"",
};
[[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
*/
+(void)requestSongWithSongId:(NSString*)songId
roomId:(NSString*)roomId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"song_id":songId?:@"",
@"room_id":roomId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXRoomRequestSong parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
*/
+(void)requestSongWithRoomId:(NSString*)roomId
type:(NSInteger)type
page:(NSInteger)page
successBlock:(void (^)(NSArray<QXUserSongListModel*>* list,NSString*count))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"type":[NSNumber numberWithInteger:type],
@"room_id":roomId?:@"",
@"page":[NSNumber numberWithInteger:page]
};
[[QXRequset shareInstance] postWithUrl:QXRoomAllSongList parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
NSArray*list = [NSArray yy_modelArrayWithClass:[QXUserSongListModel class] json:responseObject[@"data"][@"lists"]];
NSString*count = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"count"]];
successBlock(list,count);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
*/
+(void)requestSongToTopWithId:(NSString*)Id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"id":Id?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXRoomRequestSongTop parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)requestSongCountWithRoomId:(NSString*)roomId
successBlock:(void (^)(QXUserSongListCount*model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"room_id":roomId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXRoomRequestSongCount parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
QXUserSongListCount *countModel = [QXUserSongListCount yy_modelWithJSON:responseObject[@"data"]];
successBlock(countModel);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)requsetSongNextActionWithId:(NSString *)Id successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{
@"id":Id?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXRoomRequestSongNext parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)userCpReSendWithGiftId:(NSString *)giftId userId:(NSString*)userId roomId:(NSString*)roomId successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{
@"gift_id":giftId?:@"",
@"user_id":userId?:@"",
@"room_id":roomId?:@""
};
[[QXRequset shareInstance] postWithUrl:QXUserCpResend parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)userBestFriendsListWithUserId:(NSString*)userId
page:(NSInteger)page
successBlock:(void (^)(QXRoomBestFriendModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"user_id":userId?:@"",
@"page":[NSNumber numberWithInteger:page]
};
[[QXRequset shareInstance] postWithUrl:QXBestFriendsList parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
QXRoomBestFriendModel *model = [QXRoomBestFriendModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)userBestFriendsMoreListWithUserId:(NSString*)userId
relation_id:(NSString*)relation_id
successBlock:(void (^)(NSArray< QXRelationshipListModel*>* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"user_id":userId?:@"",
@"relation_id":relation_id?:@""
};
[[QXRequset shareInstance] postWithUrl:QXBestFriendsMoreList parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
NSArray *list = [NSArray yy_modelArrayWithClass:[QXRelationshipListModel class] json:responseObject[@"data"]];
successBlock(list);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
*/
+(void)heartBeatUserInfoWithUserId:(NSString*)userId
page:(NSInteger)page
successBlock:(void (^)(QXUserCpInfoModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"user_id":userId?:@"",
@"page":[NSNumber numberWithInteger:page]
};
[[QXRequset shareInstance] postWithUrl:QXHeartBeatSpace parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
QXUserCpInfoModel *model = [QXUserCpInfoModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
|
*/
+(void)getMyFamilyIsJoin:(BOOL)isJoin
successBlock:(void (^)(QXFamilyModel* model))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSString *urlString = isJoin?QXMyJoinFamily:QXMyFamily;
[[QXRequset shareInstance] getWithUrl:urlString parameters:@{} needCache:NO success:^(id responseObject) {
if (successBlock) {
QXFamilyModel *model = [QXFamilyModel yy_modelWithJSON:responseObject[@"data"]];
successBlock(model);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
*/
+(void)getFamilyEarningWithUserId:(NSString*)userId
page:(NSInteger)page
start_time:(NSString*)start_time
end_time:(NSString*)end_time
successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"user_id":userId?:@"",
@"page":[NSNumber numberWithInteger:page]
};
[[QXRequset shareInstance] postWithUrl:QXMyFamilyEarnings parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
NSArray *list = [NSArray yy_modelArrayWithClass:[QXFamilyEarningModel class] json:responseObject[@"data"]];
successBlock(list);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
userId ID
*/
+(void)signCoinListWithSignId:(NSString *)signId successBlock:(void (^)(NSArray<NSString *> * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
NSDictionary *parameters =@{
@"sign_id":signId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXSignCoinList parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
id object = responseObject[@"data"];
if ([object isKindOfClass:[NSArray class]]) {
successBlock(object);
}else{
successBlock([NSArray array]);
}
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
userId ID
sign_value
sign_id id
*/
+(void)signCoinWithSign_value:(NSString*)sign_value
sign_id:(NSString*)sign_id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"sign_value":sign_value?:@"",
@"sign_id":sign_id?:@""
};
[[QXRequset shareInstance] postWithUrl:QXSignSignCoin parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
userId ID
*/
+(void)signStartWithRoomId:(NSString*)roomId
userId:(NSString*)userId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"room_id":roomId?:@"",
@"user_id":userId?:@""
};
[[QXRequset shareInstance] postWithUrl:QXSignStartSign parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
userId ID
signId id
*/
+(void)signEndWithSignId:(NSString*)signId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"sign_id":signId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXSignEndSign parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
userId ID
signId id
*/
+(void)signDelayWithSignId:(NSString*)signId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"sign_id":signId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXSignDelaySign parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
*/
+(void)signGeyPlayListSuccessBlock:(void (^)(NSArray* list))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
[[QXRequset shareInstance] getWithUrl:QXSignPlayList parameters:@{} needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
userId ID
*/
+(void)signFreeResignWithUserId:(NSString*)userId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"user_id":userId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXSignFreeResign parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
userId ID
*/
+(void)signCoinResignWithUserId:(NSString*)userId
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"user_id":userId?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXSignCoinResign parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
/**
*/
+(void)joinGuildWithGuildId:(NSString*)guild_id
successBlock:(void (^)(NSDictionary* dict))successBlock
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
NSDictionary *parameters =@{
@"guild_id":guild_id?:@"",
};
[[QXRequset shareInstance] postWithUrl:QXApplyJoinGuild parameters:parameters needCache:NO success:^(id responseObject) {
if (successBlock) {
successBlock(responseObject[@"data"]);
}
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
failBlock(error,msg);
}];
}
+(void)appKeepAliveWithRoomId:(NSString *)room_id{
[[QXRequset shareInstance] getWithUrl:QXKeepAlive parameters:@{@"room_id":room_id?:@""} needCache:NO success:^(id responseObject) {
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
}];
}
@end @end

View File

@@ -0,0 +1,24 @@
//
// QXBodyPriceRuleView.h
// QXLive
//
// Created by 启星 on 2025/11/25.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface QXBodyPriceRuleView : UIView
@property (weak, nonatomic) IBOutlet UILabel *currentPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *beyoundPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *recievePriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *realPriceLabel;
@property (weak, nonatomic) IBOutlet UIButton *commitBtn;
@property (weak, nonatomic) IBOutlet UIButton *closeBtn;
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *bodyPriceLabel;
+(void)showInView:(UIView*)view currentBodyValue:(NSString*)currentBodyValue coin:(NSString*)coin bodyValue:(NSString*)bodyValue;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,45 @@
//
// QXBodyPriceRuleView.m
// QXLive
//
// Created by on 2025/11/25.
//
#import "QXBodyPriceRuleView.h"
@implementation QXBodyPriceRuleView
+(void)showInView:(UIView *)view currentBodyValue:(NSString *)currentBodyValue coin:(NSString *)coin bodyValue:(NSString *)bodyValue{
UINib *nib = [UINib nibWithNibName:@"QXBodyPriceRuleView" bundle:[NSBundle mainBundle]];
QXBodyPriceRuleView *ruleView = [nib instantiateWithOwner:nil options:nil].firstObject;
ruleView.frame = UIScreen.mainScreen.bounds;
ruleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
ruleView.bgView.alpha = 0;
ruleView.currentPriceLabel.text = currentBodyValue;
ruleView.bodyPriceLabel.text = [NSString stringWithFormat:@"收礼身价,等于通过累计收礼的价值,每%@个金币等于%@身价",coin,bodyValue];
[view addSubview:ruleView];
[UIView animateWithDuration:0.2 animations:^{
ruleView.bgView.alpha = 1;
}completion:^(BOOL finished) {
}];
}
- (IBAction)closeAction:(id)sender {
[UIView animateWithDuration:0.2 animations:^{
self.bgView.alpha = 0;
}completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
- (IBAction)commitAction:(id)sender {
[UIView animateWithDuration:0.3 animations:^{
self.bgView.alpha = 0;
}completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
@end

View File

@@ -0,0 +1,387 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="QXBodyPriceRuleView">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bjS-Eu-Wht">
<rect key="frame" x="40.666666666666657" y="203.66666666666663" width="312" height="470"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="body_price_rule_bg" translatesAutoresizingMaskIntoConstraints="NO" id="0pu-br-WLc">
<rect key="frame" x="0.0" y="0.0" width="312" height="470"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="身价详情" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cey-rm-4VM">
<rect key="frame" x="124.00000000000001" y="11" width="63.666666666666671" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="QMU-XW-UiY"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ag3-iq-BzI">
<rect key="frame" x="272" y="2" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="1RM-bw-F5f"/>
<constraint firstAttribute="height" constant="40" id="jXb-VG-MeW"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="wallet_close"/>
<connections>
<action selector="closeAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Kn0-Ed-x94"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="r7a-Qi-IKE">
<rect key="frame" x="16" y="46" width="280" height="113"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前身价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zaH-Pt-FkB">
<rect key="frame" x="112" y="10.000000000000028" width="56" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="c6c-Ff-k6z"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="1" green="0.46666666666666667" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yoB-8g-xXJ">
<rect key="frame" x="126.33333333333333" y="34.000000000000028" width="9.3333333333333286" height="28"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="ZUT-FY-fDo"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="room_upseat_coin" translatesAutoresizingMaskIntoConstraints="NO" id="yiz-ZZ-xxm">
<rect key="frame" x="137.66666666666669" y="39.000000000000028" width="18" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="AN3-EC-ehA"/>
<constraint firstAttribute="width" constant="18" id="wI0-ag-JJ4"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注每个用户默认身价是1金币收到礼物后按照比例进行换算身价" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WwA-Jn-1rz">
<rect key="frame" x="16" y="68.000000000000028" width="248" height="39"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.81176470588235294" green="0.61568627450980395" blue="0.25098039215686274" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="zaH-Pt-FkB" firstAttribute="centerX" secondItem="r7a-Qi-IKE" secondAttribute="centerX" id="0oM-i5-9OG"/>
<constraint firstAttribute="bottom" secondItem="WwA-Jn-1rz" secondAttribute="bottom" constant="6" id="71t-4W-LuP"/>
<constraint firstItem="yiz-ZZ-xxm" firstAttribute="leading" secondItem="yoB-8g-xXJ" secondAttribute="trailing" constant="2" id="Ggm-C5-Wcb"/>
<constraint firstAttribute="height" constant="113" id="MH5-pp-kd7"/>
<constraint firstItem="yoB-8g-xXJ" firstAttribute="centerX" secondItem="r7a-Qi-IKE" secondAttribute="centerX" constant="-9" id="Saa-J0-KwU"/>
<constraint firstAttribute="trailing" secondItem="WwA-Jn-1rz" secondAttribute="trailing" constant="16" id="YcU-Q9-sKB"/>
<constraint firstItem="WwA-Jn-1rz" firstAttribute="leading" secondItem="r7a-Qi-IKE" secondAttribute="leading" constant="16" id="auv-o8-JaK"/>
<constraint firstItem="WwA-Jn-1rz" firstAttribute="top" secondItem="yoB-8g-xXJ" secondAttribute="bottom" constant="6" id="m3G-Qk-pBp"/>
<constraint firstItem="zaH-Pt-FkB" firstAttribute="top" secondItem="r7a-Qi-IKE" secondAttribute="top" constant="10" id="maZ-g1-7I4"/>
<constraint firstItem="yiz-ZZ-xxm" firstAttribute="centerY" secondItem="yoB-8g-xXJ" secondAttribute="centerY" id="rIl-iA-pcw"/>
<constraint firstItem="yoB-8g-xXJ" firstAttribute="top" secondItem="zaH-Pt-FkB" secondAttribute="bottom" constant="6" id="ywl-ba-UsO"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="22W-Pg-BGs">
<rect key="frame" x="16" y="167" width="280" height="229"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1qh-1U-0g1">
<rect key="frame" x="19.000000000000007" y="25" width="47.999999999999993" height="48"/>
<color key="backgroundColor" red="0.72156862745098038" green="0.92156862745098034" blue="0.97647058823529409" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="Bvl-n0-GY5"/>
<constraint firstAttribute="width" constant="48" id="e9Z-Jy-yV7"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="24"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="竞拍溢价" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R5s-ew-2ma">
<rect key="frame" x="23.000000000000007" y="31.999999999999996" width="40" height="33.666666666666657"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="55m-tS-xSt"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" red="0.20392156862745098" green="0.54117647058823526" blue="0.83529411764705885" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1nL-zB-s12">
<rect key="frame" x="79" y="35" width="12.666666666666671" height="28"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="Npx-zw-09W"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="pvx-IE-jQQ">
<rect key="frame" x="103.66666666666669" y="25" width="48" height="48"/>
<color key="backgroundColor" red="0.97254901960784312" green="0.90980392156862744" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="9wK-lu-5ww"/>
<constraint firstAttribute="width" constant="48" id="oXU-Bh-nt7"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="24"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="=" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Ef-wH-HNE">
<rect key="frame" x="163.66666666666669" y="34" width="12.666666666666657" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FDt-UE-yKg">
<rect key="frame" x="107.66666666666669" y="31.999999999999996" width="40" height="33.666666666666657"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="md1-1F-BXo"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" red="0.92941176470588238" green="0.66666666666666663" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TCX-JN-r9B">
<rect key="frame" x="189" y="13" width="72" height="72"/>
<color key="backgroundColor" red="0.6470588235294118" green="1" blue="0.76078431372549016" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="72" id="UFB-82-XSq"/>
<constraint firstAttribute="height" constant="72" id="h6t-2i-vCw"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="36"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="实际身价" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TJG-ml-Bip">
<rect key="frame" x="200.00000000000003" y="27.333333333333314" width="50" height="43"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="Kof-yq-JSa"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" red="0.0" green="0.53725490196078429" blue="0.15294117647058825" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dJ6-LR-vgw">
<rect key="frame" x="16" y="98" width="117" height="119"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1RH-Mf-SWP">
<rect key="frame" x="0.0" y="0.0" width="117" height="24"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="竞拍溢价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uK0-7X-IBc">
<rect key="frame" x="34.333333333333329" y="4.3333333333333144" width="48" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.20392156862745098" green="0.54117647058823526" blue="0.83529411764705885" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.68235294117647061" green="0.92941176470588238" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="8em-ee-gLY"/>
<constraint firstItem="uK0-7X-IBc" firstAttribute="centerY" secondItem="1RH-Mf-SWP" secondAttribute="centerY" id="Q5j-gJ-Sxm"/>
<constraint firstItem="uK0-7X-IBc" firstAttribute="centerX" secondItem="1RH-Mf-SWP" secondAttribute="centerX" id="cha-7w-LSq"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签约竞拍次数越多,签约成交比签约时身价更高,则竞拍溢价就越高" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NRs-fX-FIN">
<rect key="frame" x="8" y="32" width="101" height="79"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.29411764705882354" green="0.66274509803921566" blue="0.76862745098039209" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.89803921568627454" green="0.96862745098039216" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="117" id="4rA-dE-Rhv"/>
<constraint firstAttribute="trailing" secondItem="1RH-Mf-SWP" secondAttribute="trailing" id="5da-35-QcR"/>
<constraint firstItem="NRs-fX-FIN" firstAttribute="top" secondItem="1RH-Mf-SWP" secondAttribute="bottom" constant="8" id="QTq-Mw-KUH"/>
<constraint firstItem="NRs-fX-FIN" firstAttribute="leading" secondItem="dJ6-LR-vgw" secondAttribute="leading" constant="8" id="Wtk-ZE-Iu3"/>
<constraint firstAttribute="bottom" secondItem="NRs-fX-FIN" secondAttribute="bottom" constant="8" id="YMJ-9a-hmC"/>
<constraint firstItem="1RH-Mf-SWP" firstAttribute="top" secondItem="dJ6-LR-vgw" secondAttribute="top" id="Z3L-1R-FJy"/>
<constraint firstAttribute="trailing" secondItem="NRs-fX-FIN" secondAttribute="trailing" constant="8" id="kfY-Vy-yGv"/>
<constraint firstItem="1RH-Mf-SWP" firstAttribute="leading" secondItem="dJ6-LR-vgw" secondAttribute="leading" id="lmc-Ys-kzq"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5QI-g5-Etm">
<rect key="frame" x="144" y="98" width="117" height="119"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="16p-zb-VAB">
<rect key="frame" x="0.0" y="0.0" width="117" height="24"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DfF-lh-oXh">
<rect key="frame" x="34.333333333333343" y="4.3333333333333144" width="48" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.72549019607843135" green="0.57647058823529407" blue="0.11372549019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="0.90196078431372551" blue="0.59215686274509804" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="DfF-lh-oXh" firstAttribute="centerY" secondItem="16p-zb-VAB" secondAttribute="centerY" id="6If-AV-pYD"/>
<constraint firstItem="DfF-lh-oXh" firstAttribute="centerX" secondItem="16p-zb-VAB" secondAttribute="centerX" id="8Eb-hb-bCP"/>
<constraint firstAttribute="height" constant="24" id="Oeu-V9-5eq"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价,等于 通过累计收礼的价值每1000个金币等于1身价" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4h-lx-wJ4">
<rect key="frame" x="8" y="32" width="101" height="79"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.92941176470588238" green="0.66666666666666663" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.96470588235294119" green="0.97254901960784312" blue="0.89803921568627454" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="16p-zb-VAB" firstAttribute="leading" secondItem="5QI-g5-Etm" secondAttribute="leading" id="Bbm-E2-7J9"/>
<constraint firstAttribute="bottom" secondItem="M4h-lx-wJ4" secondAttribute="bottom" constant="8" id="GGC-6Y-cpC"/>
<constraint firstItem="M4h-lx-wJ4" firstAttribute="leading" secondItem="5QI-g5-Etm" secondAttribute="leading" constant="8" id="OLC-Xu-jcE"/>
<constraint firstItem="16p-zb-VAB" firstAttribute="top" secondItem="5QI-g5-Etm" secondAttribute="top" id="PQm-S7-LCt"/>
<constraint firstItem="M4h-lx-wJ4" firstAttribute="top" secondItem="16p-zb-VAB" secondAttribute="bottom" constant="8" id="bhY-eL-Te3"/>
<constraint firstAttribute="width" constant="117" id="fPg-ws-iOS"/>
<constraint firstAttribute="trailing" secondItem="16p-zb-VAB" secondAttribute="trailing" id="haZ-oi-Jfa"/>
<constraint firstAttribute="trailing" secondItem="M4h-lx-wJ4" secondAttribute="trailing" constant="8" id="wDq-f5-2aI"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="1qh-1U-0g1" firstAttribute="top" secondItem="22W-Pg-BGs" secondAttribute="top" constant="25" id="5aA-MU-VhR"/>
<constraint firstItem="FDt-UE-yKg" firstAttribute="centerY" secondItem="pvx-IE-jQQ" secondAttribute="centerY" id="729-Vm-24r"/>
<constraint firstAttribute="trailing" secondItem="TCX-JN-r9B" secondAttribute="trailing" constant="19" id="DIH-n9-8BY"/>
<constraint firstItem="TCX-JN-r9B" firstAttribute="centerY" secondItem="1qh-1U-0g1" secondAttribute="centerY" id="IFW-2s-j7V"/>
<constraint firstItem="R5s-ew-2ma" firstAttribute="centerY" secondItem="1qh-1U-0g1" secondAttribute="centerY" id="N9g-k4-GdM"/>
<constraint firstItem="pvx-IE-jQQ" firstAttribute="centerY" secondItem="1qh-1U-0g1" secondAttribute="centerY" id="PI4-ui-iG5"/>
<constraint firstItem="FDt-UE-yKg" firstAttribute="centerX" secondItem="pvx-IE-jQQ" secondAttribute="centerX" id="TPS-17-unD"/>
<constraint firstItem="5QI-g5-Etm" firstAttribute="top" secondItem="dJ6-LR-vgw" secondAttribute="top" id="VnE-Yk-Fs5"/>
<constraint firstItem="dJ6-LR-vgw" firstAttribute="leading" secondItem="22W-Pg-BGs" secondAttribute="leading" constant="16" id="afz-KP-jxq"/>
<constraint firstItem="5QI-g5-Etm" firstAttribute="bottom" secondItem="dJ6-LR-vgw" secondAttribute="bottom" id="cE5-G9-ELY"/>
<constraint firstAttribute="bottom" secondItem="dJ6-LR-vgw" secondAttribute="bottom" constant="12" id="cu7-kg-F1S"/>
<constraint firstItem="TJG-ml-Bip" firstAttribute="centerX" secondItem="TCX-JN-r9B" secondAttribute="centerX" id="dyH-i4-I9s"/>
<constraint firstItem="dJ6-LR-vgw" firstAttribute="top" secondItem="1qh-1U-0g1" secondAttribute="bottom" constant="25" id="e3D-aw-dQb"/>
<constraint firstItem="TJG-ml-Bip" firstAttribute="centerY" secondItem="TCX-JN-r9B" secondAttribute="centerY" id="fAq-7E-JQR"/>
<constraint firstItem="pvx-IE-jQQ" firstAttribute="leading" secondItem="1nL-zB-s12" secondAttribute="trailing" constant="12" id="gvw-jh-Rfk"/>
<constraint firstItem="1qh-1U-0g1" firstAttribute="leading" secondItem="22W-Pg-BGs" secondAttribute="leading" constant="19" id="h6D-gY-uge"/>
<constraint firstItem="1nL-zB-s12" firstAttribute="leading" secondItem="1qh-1U-0g1" secondAttribute="trailing" constant="12" id="tfl-1O-cAo"/>
<constraint firstAttribute="trailing" secondItem="5QI-g5-Etm" secondAttribute="trailing" constant="19" id="tt7-w6-uG8"/>
<constraint firstItem="1nL-zB-s12" firstAttribute="centerY" secondItem="1qh-1U-0g1" secondAttribute="centerY" id="vIW-PX-cda"/>
<constraint firstItem="R5s-ew-2ma" firstAttribute="centerX" secondItem="1qh-1U-0g1" secondAttribute="centerX" id="xP7-mU-bAf"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PHh-tS-kNh">
<rect key="frame" x="27" y="412" width="258" height="42"/>
<color key="backgroundColor" red="0.22745098039215686" green="0.73725490196078436" blue="0.42745098039215684" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="4KY-On-BUi"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="确认">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="21"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="commitAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="mL0-U7-wQJ"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="22W-Pg-BGs" firstAttribute="top" secondItem="r7a-Qi-IKE" secondAttribute="bottom" constant="8" id="33m-VS-2sZ"/>
<constraint firstAttribute="bottom" secondItem="0pu-br-WLc" secondAttribute="bottom" id="4e3-Y4-Tac"/>
<constraint firstAttribute="trailing" secondItem="PHh-tS-kNh" secondAttribute="trailing" constant="27" id="6W3-Sf-nfN"/>
<constraint firstItem="Cey-rm-4VM" firstAttribute="centerX" secondItem="bjS-Eu-Wht" secondAttribute="centerX" id="8p7-Yq-Bsl"/>
<constraint firstItem="22W-Pg-BGs" firstAttribute="trailing" secondItem="r7a-Qi-IKE" secondAttribute="trailing" id="9hR-zr-C7I"/>
<constraint firstItem="0pu-br-WLc" firstAttribute="top" secondItem="bjS-Eu-Wht" secondAttribute="top" id="CAS-bj-ppe"/>
<constraint firstItem="PHh-tS-kNh" firstAttribute="leading" secondItem="bjS-Eu-Wht" secondAttribute="leading" constant="27" id="F9D-GW-pPi"/>
<constraint firstAttribute="trailing" secondItem="r7a-Qi-IKE" secondAttribute="trailing" constant="16" id="Irf-7a-IAZ"/>
<constraint firstAttribute="width" constant="312" id="KlA-b8-6yJ"/>
<constraint firstItem="Cey-rm-4VM" firstAttribute="top" secondItem="bjS-Eu-Wht" secondAttribute="top" constant="11" id="MZ1-ir-rFg"/>
<constraint firstAttribute="bottom" secondItem="PHh-tS-kNh" secondAttribute="bottom" constant="16" id="RnS-Jh-Wrf"/>
<constraint firstItem="r7a-Qi-IKE" firstAttribute="leading" secondItem="bjS-Eu-Wht" secondAttribute="leading" constant="16" id="U7n-mt-ov1"/>
<constraint firstItem="PHh-tS-kNh" firstAttribute="top" secondItem="22W-Pg-BGs" secondAttribute="bottom" constant="16" id="Uie-am-bsR"/>
<constraint firstItem="ag3-iq-BzI" firstAttribute="top" secondItem="bjS-Eu-Wht" secondAttribute="top" constant="2" id="Vyo-LV-CcW"/>
<constraint firstItem="0pu-br-WLc" firstAttribute="leading" secondItem="bjS-Eu-Wht" secondAttribute="leading" id="aL1-WV-fhl"/>
<constraint firstItem="22W-Pg-BGs" firstAttribute="leading" secondItem="r7a-Qi-IKE" secondAttribute="leading" id="hEM-xo-DUO"/>
<constraint firstAttribute="trailing" secondItem="ag3-iq-BzI" secondAttribute="trailing" id="oMO-jd-Kff"/>
<constraint firstAttribute="trailing" secondItem="0pu-br-WLc" secondAttribute="trailing" id="tGt-Bl-B7G"/>
<constraint firstAttribute="height" constant="470" id="tsx-66-top"/>
<constraint firstItem="r7a-Qi-IKE" firstAttribute="top" secondItem="Cey-rm-4VM" secondAttribute="bottom" constant="11" id="wJM-pt-KcG"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="bjS-Eu-Wht" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="XT7-vk-EsU"/>
<constraint firstItem="bjS-Eu-Wht" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="h5o-I1-Iu2"/>
</constraints>
<connections>
<outlet property="bgView" destination="bjS-Eu-Wht" id="7GC-AR-cpg"/>
<outlet property="bodyPriceLabel" destination="M4h-lx-wJ4" id="jHS-JF-ix4"/>
<outlet property="closeBtn" destination="ag3-iq-BzI" id="a0h-Fk-P2z"/>
<outlet property="commitBtn" destination="PHh-tS-kNh" id="iOS-08-gnl"/>
<outlet property="currentPriceLabel" destination="yoB-8g-xXJ" id="ZmR-gN-kho"/>
</connections>
<point key="canvasLocation" x="139.69465648854961" y="19.718309859154932"/>
</view>
</objects>
<resources>
<image name="body_price_rule_bg" width="312" height="470"/>
<image name="room_upseat_coin" width="16" height="16"/>
<image name="wallet_close" width="11" height="11"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@@ -11,21 +11,11 @@ NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger) { typedef NS_ENUM(NSInteger) {
/// 个人主页 /// 个人主页
QXMainHeaderOptionTypeGotoHome = 0, QXMainHeaderOptionTypeGotoHome = 0,
/// 实名认证
QXMainHeaderOptionTypeRealName = 1,
/// 主播中心
QXMainHeaderOptionTypeAnchorCenter = 2,
/// 开启直播
QXMainHeaderOptionTypeStartLive = 3,
/// 编辑 /// 编辑
QXMainHeaderOptionTypeGotoEdit = 4, QXMainHeaderOptionTypeGotoEdit = 1,
/// 贵族
QXMainHeaderOptionTypeNobility = 2,
/// 房间
QXMainHeaderOptionTypeRoom = 5,
/// 关注 /// 关注
QXMainHeaderOptionTypeFocus = 20, QXMainHeaderOptionTypeFocus = 20,
@@ -36,10 +26,27 @@ typedef NS_ENUM(NSInteger) {
/// 访客 /// 访客
QXMainHeaderOptionTypeVisitor = 22, QXMainHeaderOptionTypeVisitor = 22,
/// 好友
QXMainHeaderOptionTypeFriend = 23,
/// 充值
QXMainHeaderOptionTypeRecharge = 30,
/// 商城
QXMainHeaderOptionTypeShop = 31,
/// 公会
QXMainHeaderOptionTypeGuild = 32,
/// 挚友
QXMainHeaderOptionTypeFriend = 33,
/// 房间
QXMainHeaderOptionTypeRoom = 34,
/// 钱包
QXMainHeaderOptionTypeWallet = 35,
/// 礼物墙
QXMainHeaderOptionTypeGiftWall = 36,
/// 身价
QXMainHeaderOptionTypeBodyPrice = 37,
}QXMainHeaderOptionType; }QXMainHeaderOptionType;
@protocol QXMainHeaderViewDelegate <NSObject> @protocol QXMainHeaderViewDelegate <NSObject>
@@ -50,6 +57,11 @@ typedef NS_ENUM(NSInteger) {
@interface QXMainHeaderView : UIView @interface QXMainHeaderView : UIView
@property (nonatomic,weak)id<QXMainHeaderViewDelegate>delegate; @property (nonatomic,weak)id<QXMainHeaderViewDelegate>delegate;
@property (nonatomic,strong)QXUserModel *userModel; @property (nonatomic,strong)QXUserModel *userModel;
@property (nonatomic,strong)NSArray *bannerArray;
@property (nonatomic,strong)NSString *earnings;
@property (nonatomic,strong)NSString *coin;
-(void)reloadData;
-(CGFloat)getHeight;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -8,27 +8,63 @@
#import "QXMainHeaderView.h" #import "QXMainHeaderView.h"
#import "QXSeatHeaderView.h" #import "QXSeatHeaderView.h"
#import "CKShimmerLabel.h" #import "CKShimmerLabel.h"
#import "QXMineHomeToolsCell.h"
#import "QXServiceModel.h"
#import "QXBanner.h"
#import <SDCycleScrollView/SDCycleScrollView.h>
#import "QXUserHomePageViewController.h"
@interface QXMainHeaderView() @interface QXMainHeaderView()<UICollectionViewDelegate,UICollectionViewDataSource,SDCycleScrollViewDelegate>
@property (nonatomic, strong) QXSeatHeaderView *userHeaderView; @property (nonatomic, strong) QXSeatHeaderView *userHeaderView;
@property (nonatomic, strong) UIImageView *sexImageView; @property (nonatomic, strong) UIImageView *sexImageView;
//@property (nonatomic, strong) UILabel *nameLabel; //@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) CKShimmerLabel *nameLabel; @property (nonatomic, strong) CKShimmerLabel *nameLabel;
@property (nonatomic, strong) UILabel *idLabel; @property (nonatomic, strong) UILabel *idLabel;
@property (nonatomic, strong) UIButton *idCopyBtn; @property (nonatomic, strong) UIButton *idCopyBtn;
@property (nonatomic, strong) UIView *userTagView;
//
@property (nonatomic, strong) UIView *nobilityBgView;
@property (nonatomic, strong) UIImageView *nobilityImageView;
@property (nonatomic, strong) UIView *userHomeView; @property (nonatomic, strong) UIView *userHomeView;
@property (nonatomic, strong) UILabel *userHomeTitleLabel; @property (nonatomic, strong) UILabel *userNobilityTitleLabel;
@property (nonatomic, strong) UIImageView *userHomeImageView; @property (nonatomic, strong) UIImageView *userNobilityImageView;
@property (nonatomic, strong) UIButton *userHomeBtn; @property (nonatomic, strong) UIButton *userHomeBtn;
@property (nonatomic, strong) UIImageView *useCodeImageView; @property (nonatomic, strong) UIImageView *useCodeImageView;
//@property (nonatomic, strong) UIButton *leftBtn; ///
//@property (nonatomic, strong) UIButton *rightBtn; @property (nonatomic, strong) UIView *topBgView;
@property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) UIButton *roomBtn; @property (nonatomic, strong) UIButton *roomBtn;
/// ///
@property (nonatomic, strong) NSMutableArray *iconArray; @property (nonatomic, strong) NSMutableArray *iconArray;
///
@property (nonatomic, strong) NSMutableArray *toolsArray;
@property (nonatomic, strong)QXServiceModel *rechargeModel;
@property (nonatomic, strong)SDCycleScrollView *cycleScrollView;
@property (nonatomic, strong)UIView *walletBgView;
@property (nonatomic, strong)UILabel *walletTitleLabel;
@property (nonatomic, strong)UIImageView *walletBgImageView;
@property (nonatomic, strong)UILabel *walletBottomLabel;
@property (nonatomic, strong)UILabel *walletMoneyLabel;
@property (nonatomic, strong)UIButton *walletBtn;
@property (nonatomic, strong)UIImageView *bodyPriceBgImageView;
@property (nonatomic, strong)UILabel *bodyPriceBottomLabel;
@property (nonatomic, strong)UILabel *bodyPriceMoneyLabel;
@property (nonatomic, strong)UIButton *bodyPriceBtn;
@property (nonatomic, strong)UIImageView *giftWallBgImageView;
@property (nonatomic, strong)UILabel *giftWallTitleLabel;
@property (nonatomic, strong)UIButton *giftWallBtn;
@property (nonatomic, strong)NSMutableArray *bannerImages;
@end @end
@implementation QXMainHeaderView @implementation QXMainHeaderView
@@ -42,7 +78,7 @@
} }
-(void)initSubviews{ -(void)initSubviews{
MJWeakSelf MJWeakSelf
self.userHeaderView = [[QXSeatHeaderView alloc] initWithFrame:CGRectMake(16, 40, 68, 68)]; self.userHeaderView = [[QXSeatHeaderView alloc] initWithFrame:CGRectMake(16, 18, 76, 91)];
[self.userHeaderView addTapBlock:^(id _Nonnull obj) { [self.userHeaderView addTapBlock:^(id _Nonnull obj) {
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickOptionType:)]) { if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[weakSelf.delegate didClickOptionType:QXMainHeaderOptionTypeGotoHome]; [weakSelf.delegate didClickOptionType:QXMainHeaderOptionTypeGotoHome];
@@ -50,25 +86,29 @@
}]; }];
[self addSubview:self.userHeaderView]; [self addSubview:self.userHeaderView];
self.sexImageView = [[UIImageView alloc] init];
[self addSubview:self.sexImageView];
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.bottom.equalTo(self.userHeaderView);
make.height.width.mas_equalTo(16);
}];
// self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.userHeaderView.right+6, self.userHeaderView.top, self.width-self.userHeaderView.right-16-6, 23)]; // self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.userHeaderView.right+6, self.userHeaderView.top, self.width-self.userHeaderView.right-16-6, 23)];
self.nameLabel = [[CKShimmerLabel alloc] initWithFrame:CGRectMake(self.userHeaderView.right+6, self.userHeaderView.top, self.width-self.userHeaderView.right-16-6, 23)]; self.nameLabel = [[CKShimmerLabel alloc] initWithFrame:CGRectMake(self.userHeaderView.right+6, self.userHeaderView.top+5, self.width-self.userHeaderView.right-16-6, 22)];
self.nameLabel.shimmerWidth = 20; self.nameLabel.shimmerWidth = 20;
self.nameLabel.shimmerRadius = 20; self.nameLabel.shimmerRadius = 20;
self.nameLabel.shimmerColor = [UIColor yellowColor]; self.nameLabel.durationTime = 1;
self.nameLabel.text = @"羽声语音";
// self.nameLabel.shimmerColor = [UIColor yellowColor];
self.nameLabel.repeat = YES; self.nameLabel.repeat = YES;
self.nameLabel.textColor = QXConfig.textColor; self.nameLabel.textColor = RGB16A(0xffffff,0.85);
self.nameLabel.font = [UIFont boldSystemFontOfSize:18]; self.nameLabel.font = [UIFont boldSystemFontOfSize:18];
// [self.nameLabel startShimmer]; // [self.nameLabel startShimmer];
[self addSubview:self.nameLabel]; [self addSubview:self.nameLabel];
self.idLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.userHeaderView.right+6, self.nameLabel.bottom+5, 80, 17)]; self.sexImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.userHeaderView.right+6, self.nameLabel.bottom+4, 17, 17)];
[self addSubview:self.sexImageView];
// [self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.right.bottom.equalTo(self.userHeaderView);
// make.height.width.mas_equalTo(16);
// }];
self.idLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.sexImageView.right+6, self.nameLabel.bottom+6, 80, 17)];
self.idLabel.textColor = RGB16(0x666666); self.idLabel.textColor = RGB16(0x666666);
self.idLabel.font = [UIFont systemFontOfSize:12]; self.idLabel.font = [UIFont systemFontOfSize:12];
self.idLabel.text = @"ID:"; self.idLabel.text = @"ID:";
@@ -86,7 +126,7 @@
[self addSubview:self.idCopyBtn]; [self addSubview:self.idCopyBtn];
self.userHomeView = [[UIView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-60-16, 0, 60, 23)]; self.userHomeView = [[UIView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-60-16, 0, 54, 23)];
self.userHomeView.layer.cornerRadius = self.userHomeView.height/2.0; self.userHomeView.layer.cornerRadius = self.userHomeView.height/2.0;
self.userHomeView.layer.shadowColor = [UIColor grayColor].CGColor; self.userHomeView.layer.shadowColor = [UIColor grayColor].CGColor;
self.userHomeView.layer.shadowOpacity = 0.3; self.userHomeView.layer.shadowOpacity = 0.3;
@@ -98,20 +138,10 @@
self.userHomeView.backgroundColor = [UIColor whiteColor]; self.userHomeView.backgroundColor = [UIColor whiteColor];
[self addSubview:self.userHomeView]; [self addSubview:self.userHomeView];
self.userHomeImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"arrowRight"]];
self.userHomeImageView.frame = CGRectMake(self.userHomeView.width-10-16, (23-16)/2.0, 16, 16);
[self.userHomeView addSubview:self.userHomeImageView];
self.userHomeTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 20, 20)];
self.userHomeTitleLabel.text = QXText(@"编辑");
self.userHomeTitleLabel.font = [UIFont systemFontOfSize:12];
self.userHomeTitleLabel.textColor = [UIColor colorWithHexString:@"#333333"];
[self.userHomeTitleLabel sizeToFit];
self.userHomeTitleLabel.x = 10;
self.userHomeTitleLabel.y =( self.userHomeView.height - self.userHomeTitleLabel.height)/2.0;
[self.userHomeView addSubview:self.userHomeTitleLabel];
self.userHomeBtn = [[UIButton alloc] initWithFrame:self.userHomeView.bounds]; self.userHomeBtn = [[UIButton alloc] initWithFrame:self.userHomeView.bounds];
[self.userHomeBtn setBackgroundImage:[UIImage imageNamed:@"mine_edit_btn"] forState:(UIControlStateNormal)];
[self.userHomeBtn addTarget:self action:@selector(gotoUserHomePageClick) forControlEvents:(UIControlEventTouchUpInside)]; [self.userHomeBtn addTarget:self action:@selector(gotoUserHomePageClick) forControlEvents:(UIControlEventTouchUpInside)];
[self.userHomeView addSubview:self.userHomeBtn]; [self.userHomeView addSubview:self.userHomeBtn];
@@ -122,73 +152,255 @@
NSArray* nameArr = @[ NSArray* nameArr = @[
QXText(@"关注"), QXText(@"粉丝"),QXText(@"访客") QXText(@"关注"), QXText(@"粉丝"),QXText(@"访客")
]; ];
CGFloat width = (SCREEN_WIDTH-32)/4; CGFloat width = (SCREEN_WIDTH-60)/3;
for (int i = 0; i < nameArr.count; i ++) { for (int i = 0; i < nameArr.count; i ++) {
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16+width*i, self.userHeaderView.bottom+19, width, 22)]; UILabel *countLabel = [[UILabel alloc] initWithFrame:CGRectMake(30+width*i, self.userHeaderView.bottom+10, width, 25)];
titleLabel.textColor = RGB16(0x666666); countLabel.textAlignment = NSTextAlignmentCenter;
countLabel.textColor = RGB16(0xCCCDC8);
countLabel.tag = 10 + i;
countLabel.font = [UIFont fontWithName:@"DIN Condensed" size:22];
countLabel.text = @"0";
[self addSubview:countLabel];
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(countLabel.left, countLabel.bottom+5, width, 18)];
titleLabel.textColor = RGB16(0XCCCDC8);
titleLabel.font = [UIFont systemFontOfSize:12]; titleLabel.font = [UIFont systemFontOfSize:12];
titleLabel.textAlignment = NSTextAlignmentCenter; titleLabel.textAlignment = NSTextAlignmentCenter;
titleLabel.text = nameArr[i]; titleLabel.text = nameArr[i];
[titleLabel sizeToFit];
titleLabel.x = 16+width*i;
titleLabel.y = self.userHeaderView.bottom+16;
titleLabel.height = 22;
[self addSubview:titleLabel]; [self addSubview:titleLabel];
UILabel *countLabel = [[UILabel alloc] initWithFrame:CGRectMake(titleLabel.right+5, titleLabel.top, width-10-titleLabel.width, 22)];
countLabel.textAlignment = NSTextAlignmentCenter;
countLabel.textColor = QXConfig.textColor;
countLabel.tag = 10 + i;
countLabel.font = [UIFont boldSystemFontOfSize:16];
countLabel.text = @"0";
countLabel.centerY = titleLabel.centerY;
[self addSubview:countLabel];
UIControl *c = [[UIControl alloc] initWithFrame:CGRectMake(titleLabel.left, titleLabel.top-10, width, titleLabel.height+20)];
UIControl *c = [[UIControl alloc] initWithFrame:CGRectMake(countLabel.left, countLabel.top, width, countLabel.height+titleLabel.height+5)];
c.tag = 20 + i; c.tag = 20 + i;
[c addTarget:self action:@selector(viewClick:) forControlEvents:UIControlEventTouchUpInside]; [c addTarget:self action:@selector(viewClick:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:c]; [self addSubview:c];
} }
// self.leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(16, self.userHeaderView.bottom+54, width*2-7.5, 67)];
// [self.leftBtn setBackgroundImage:[UIImage imageNamed:@"start_live"] forState:(UIControlStateNormal)];
// [self.leftBtn addTarget:self action:@selector(leftAction) forControlEvents:(UIControlEventTouchUpInside)];
// [self addSubview:self.leftBtn];
//
// self.rightBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.leftBtn.right+7.5, self.userHeaderView.bottom+54, self.leftBtn.width, 67)];
// [self.rightBtn setBackgroundImage:[UIImage imageNamed:@"become_anchor"] forState:(UIControlStateNormal)];
// [self.rightBtn addTarget:self action:@selector(rightAction) forControlEvents:(UIControlEventTouchUpInside)];
// [self addSubview:self.rightBtn];
self.roomBtn = [[UIButton alloc] initWithFrame:CGRectMake(16, self.userHeaderView.bottom+54, self.width-32, ScaleWidth(67))]; self.nobilityBgView = [[UIView alloc] initWithFrame:CGRectMake(30, self.userHeaderView.bottom+80, SCREEN_WIDTH-60, ScaleWidth(40))];
[self.roomBtn setBackgroundImage:[UIImage imageNamed:@"mine_header_room"] forState:(UIControlStateNormal)]; [self.nobilityBgView addTapBlock:^(id _Nonnull obj) {
[self.roomBtn addTarget:self action:@selector(roomAction) forControlEvents:(UIControlEventTouchUpInside)]; if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[self addSubview:self.roomBtn]; [weakSelf.delegate didClickOptionType:QXMainHeaderOptionTypeNobility];
}
}];
self.nobilityBgView.hidden = YES;
[self addSubview:self.nobilityBgView];
self.nobilityImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_nobility_bg"]];
self.nobilityImageView.frame = self.nobilityBgView.bounds;
self.nobilityImageView.contentMode = UIViewContentModeScaleToFill;
[self.nobilityBgView addSubview:self.nobilityImageView];
self.userNobilityImageView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"arrowRight"] imageByTintColor:RGB16(0xEECE72)]];
self.userNobilityImageView.frame = CGRectMake(self.nobilityImageView.width-10-16, (self.nobilityBgView.height-16)/2.0, 16, 16);
[self.nobilityBgView addSubview:self.userNobilityImageView];
self.userNobilityTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.userNobilityImageView.left-32, (self.nobilityBgView.height-20)/2, 32, 20)];
self.userNobilityTitleLabel.text = QXText(@"更多");
self.userNobilityTitleLabel.font = [UIFont systemFontOfSize:14];
self.userNobilityTitleLabel.textColor = [UIColor colorWithHexString:@"#EECE72"];
[self.nobilityBgView addSubview:self.userNobilityTitleLabel];
self.topBgView = [[UIView alloc] initWithFrame:CGRectMake(16, self.nobilityBgView.bottom, SCREEN_WIDTH-32, 90)];
[self.topBgView addRoundedCornersWithRadius:8];
self.topBgView.backgroundColor = RGB16A(0xffffff, 0.06);
[self addSubview:self.topBgView];
NSInteger maxCount = 5;
CGFloat btnWith = (int)(SCREEN_WIDTH-32-1)/maxCount;
CGFloat btnHeight = self.topBgView.height;
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(btnWith, btnHeight);
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[self.collectionView registerNib:[UINib nibWithNibName:@"QXMineHomeToolsCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"QXMineHomeToolsCell"];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.collectionView.showsHorizontalScrollIndicator = NO;
self.collectionView.bounces = NO;
self.collectionView.backgroundColor = UIColor.clearColor;
[self.topBgView addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.right.equalTo(self.topBgView);
}];
self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(self.topBgView.left, self.topBgView.bottom+12, self.topBgView.width, 64) delegate:self placeholderImage:nil];
self.cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
self.cycleScrollView.backgroundColor = UIColor.clearColor;
[self.cycleScrollView addRoundedCornersWithRadius:8];
[self addSubview:self.cycleScrollView];
self.walletBgView = [[UIView alloc] initWithFrame:CGRectMake(self.topBgView.left, self.cycleScrollView.bottom+12, self.topBgView.width, 108)];
self.walletBgView.backgroundColor = RGB16(0x231F2C);
[self.walletBgView addRoundedCornersWithRadius:8];
[self addSubview:self.walletBgView];
self.walletTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, 200, 16)];
self.walletTitleLabel.text = @"我的钱包";
self.walletTitleLabel.font = [UIFont systemFontOfSize:14];
self.walletTitleLabel.textColor = RGB16(0x929196);
[self.walletBgView addSubview:self.walletTitleLabel];
CGFloat walletWidth = (self.topBgView.width - 16*4) / 3;
self.walletBgImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.topBgView.left, self.walletTitleLabel.bottom+8, walletWidth, 60)];
self.walletBgImageView.backgroundColor = RGB16(0xFFE38E);
[self.walletBgImageView addRoundedCornersWithRadius:8];
[self.walletBgView addSubview:self.walletBgImageView];
self.walletBottomLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.walletBgImageView.left, self.walletBgImageView.bottom-14-11, walletWidth, 14)];
self.walletBottomLabel.text = @"钱包";
self.walletBottomLabel.textAlignment = NSTextAlignmentCenter;
self.walletBottomLabel.font = [UIFont systemFontOfSize:12];
self.walletBottomLabel.textColor = RGB16(0x333333);
[self.walletBgView addSubview:self.walletBottomLabel];
self.walletMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.walletBgImageView.left, self.walletBgImageView.top+11, walletWidth, 27)];
self.walletMoneyLabel.text = @"0";
self.walletMoneyLabel.textAlignment = NSTextAlignmentCenter;
self.walletMoneyLabel.font = [UIFont fontWithName:@"DIN Condensed" size:25];
self.walletMoneyLabel.textColor = RGB16(0x222222);
[self.walletBgView addSubview:self.walletMoneyLabel];
self.bodyPriceBgImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.walletBgImageView.right+16, self.walletBgImageView.top, walletWidth, self.walletBgImageView.height)];
self.bodyPriceBgImageView.backgroundColor = RGB16(0xFFB68F);
[self.bodyPriceBgImageView addRoundedCornersWithRadius:8];
[self.walletBgView addSubview:self.bodyPriceBgImageView];
self.bodyPriceBottomLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.bodyPriceBgImageView.left, self.bodyPriceBgImageView.bottom-14-11, walletWidth, 14)];
self.bodyPriceBottomLabel.text = @"身价";
self.bodyPriceBottomLabel.textAlignment = NSTextAlignmentCenter;
self.bodyPriceBottomLabel.font = [UIFont systemFontOfSize:12];
self.bodyPriceBottomLabel.textColor = RGB16(0x333333);
[self.walletBgView addSubview:self.bodyPriceBottomLabel];
self.bodyPriceMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.bodyPriceBgImageView.left, self.walletBgImageView.top+11, walletWidth, 27)];
self.bodyPriceMoneyLabel.text = @"1";
self.bodyPriceMoneyLabel.textAlignment = NSTextAlignmentCenter;
self.bodyPriceMoneyLabel.font = [UIFont fontWithName:@"DIN Condensed" size:25];
self.bodyPriceMoneyLabel.textColor = RGB16(0x222222);
[self.walletBgView addSubview:self.bodyPriceMoneyLabel];
self.giftWallBgImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.bodyPriceBgImageView.right+16, self.walletBgImageView.top, walletWidth, self.walletBgImageView.height)];
self.giftWallBgImageView.backgroundColor = RGB16(0xF1B3FF);
[self.giftWallBgImageView addRoundedCornersWithRadius:8];
[self.walletBgView addSubview:self.giftWallBgImageView];
self.giftWallTitleLabel = [[UILabel alloc] initWithFrame:self.giftWallBgImageView.frame];
self.giftWallTitleLabel.text = @"礼物墙";
self.giftWallTitleLabel.textAlignment = NSTextAlignmentCenter;
self.giftWallTitleLabel.font = [UIFont fontWithName:@"DIN Condensed" size:20];
self.giftWallTitleLabel.textColor = RGB16(0x222222);
[self.walletBgView addSubview:self.giftWallTitleLabel];
self.walletBtn = [[UIButton alloc] initWithFrame:self.walletBgImageView.frame];
[self.walletBtn addTarget:self action:@selector(walletAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.walletBgView addSubview:self.walletBtn];
self.giftWallBtn = [[UIButton alloc] initWithFrame:self.giftWallBgImageView.frame];
[self.giftWallBtn addTarget:self action:@selector(giftWalltAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.walletBgView addSubview:self.giftWallBtn];
self.bodyPriceBtn = [[UIButton alloc] initWithFrame:self.bodyPriceBgImageView.frame];
[self.bodyPriceBtn addTarget:self action:@selector(bodyPriceAction) forControlEvents:(UIControlEventTouchUpInside)];
[self.walletBgView addSubview:self.bodyPriceBtn];
}
-(CGFloat)getHeight{
return self.walletBgView.bottom+6;
}
-(void)setCoin:(NSString *)coin{
_coin = coin;
self.walletMoneyLabel.text = [NSString stringWithFormat:@"%.2f",coin.doubleValue];
}
-(void)setBannerArray:(NSArray *)bannerArray{
_bannerArray = bannerArray;
[self.bannerImages removeAllObjects];
for (QXBanner *banner in bannerArray) {
[self.bannerImages addObject:banner.image];
}
self.cycleScrollView.imageURLStringsGroup = self.bannerImages;
}
-(void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index{
if (!QXGlobal.shareGlobal.isLogin) {
[[QXGlobal shareGlobal] logOut];
return;
}
QXBanner *banner = self.bannerArray[index];
if ([banner.type isEqualToString:@"2"]) {
QXBaseWebViewController *webVc = [[QXBaseWebViewController alloc] init];
webVc.urlStr = banner.url;
[self.navigationController pushViewController:webVc animated:YES];
}else if ([banner.type isEqualToString:@"3"]){
[[QXGlobal shareGlobal] joinRoomWithRoomId:banner.aid isRejoin:NO navagationController:self.navigationController];
}else if ([banner.type isEqualToString:@"4"]){
QXUserHomePageViewController *userHomePage = [[QXUserHomePageViewController alloc] init];
userHomePage.user_id = banner.aid;
[self.viewController.navigationController pushViewController:userHomePage animated:YES];
}
}
-(void)reloadData{
if (QXGlobal.shareGlobal.isOpenRecharge) {
self.nobilityBgView.hidden = NO;
if ([self.toolsArray containsObject:self.rechargeModel]) {
return;
}
[self.toolsArray insertObject:self.rechargeModel atIndex:0];
[self.collectionView reloadData];
}else{
self.nobilityBgView.hidden = YES;
}
} }
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.toolsArray.count;
}
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
QXMineHomeToolsCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXMineHomeToolsCell" forIndexPath:indexPath];
cell.model = self.toolsArray[indexPath.row];
return cell;
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) {
QXServiceModel *model = self.toolsArray[indexPath.row];
[self.delegate didClickOptionType:model.type];
}
}
-(void)viewClick:(UIControl*)sender{ -(void)viewClick:(UIControl*)sender{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[self.delegate didClickOptionType:sender.tag]; [self.delegate didClickOptionType:sender.tag];
} }
} }
-(void)roomAction{
-(void)walletAction{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[self.delegate didClickOptionType:QXMainHeaderOptionTypeRoom]; [self.delegate didClickOptionType:QXMainHeaderOptionTypeWallet];
}
}
-(void)giftWalltAction{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[self.delegate didClickOptionType:QXMainHeaderOptionTypeGiftWall];
} }
} }
-(void)leftAction{ -(void)bodyPriceAction{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[self.delegate didClickOptionType:QXMainHeaderOptionTypeStartLive]; [self.delegate didClickOptionType:QXMainHeaderOptionTypeBodyPrice];
} }
} }
-(void)rightAction{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[self.delegate didClickOptionType:QXMainHeaderOptionTypeRealName];
}
}
-(void)gotoUserHomePageClick{ -(void)gotoUserHomePageClick{
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didClickOptionType:)]) {
[self.delegate didClickOptionType:QXMainHeaderOptionTypeGotoEdit]; [self.delegate didClickOptionType:QXMainHeaderOptionTypeGotoEdit];
@@ -196,7 +408,16 @@
} }
-(void)setUserModel:(QXUserModel *)userModel{ -(void)setUserModel:(QXUserModel *)userModel{
_userModel = userModel; _userModel = userModel;
self.nameLabel.text = userModel.market_value;
[self.userHeaderView setHeadIcon:userModel.avatar dress:userModel.dress]; [self.userHeaderView setHeadIcon:userModel.avatar dress:userModel.dress];
[self.userHeaderView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:userModel.nobility_image]];
if ([userModel.nickname_color isExist]) {
self.nameLabel.shimmerColor = [UIColor colorWithHexString:userModel.nickname_color];
[self.nameLabel startShimmer];
}else{
self.nameLabel.shimmerColor = [UIColor clearColor];
[self.nameLabel stopShimmer];
}
self.nameLabel.text = userModel.nickname; self.nameLabel.text = userModel.nickname;
self.idLabel.text = [NSString stringWithFormat:@"ID:%@",userModel.user_code]; self.idLabel.text = [NSString stringWithFormat:@"ID:%@",userModel.user_code];
UILabel *followLabel = [self viewWithTag:10]; UILabel *followLabel = [self viewWithTag:10];
@@ -210,7 +431,7 @@
} }
for (int i = 0;i<userModel.icon.count;i++) { for (int i = 0;i<userModel.icon.count;i++) {
NSString*icon = userModel.icon[i]; NSString*icon = userModel.icon[i];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*UserIconWidth, self.idLabel.bottom+5, UserIconWidth, UserIconHeight)]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*UserIconWidth, self.idLabel.bottom+9, UserIconWidth, UserIconHeight)];
[imageView sd_setImageWithURL:[NSURL URLWithString:icon]]; [imageView sd_setImageWithURL:[NSURL URLWithString:icon]];
[self addSubview:imageView]; [self addSubview:imageView];
[self.iconArray addObject:imageView]; [self.iconArray addObject:imageView];
@@ -239,4 +460,50 @@
} }
return _iconArray; return _iconArray;
} }
-(NSMutableArray *)toolsArray{
if (!_toolsArray) {
QXServiceModel *md2 = [[QXServiceModel alloc] init];
md2.title = @"商城";
md2.icon = @"mine_tools_shop";
md2.type = QXMainHeaderOptionTypeShop;
QXServiceModel *md3 = [[QXServiceModel alloc] init];
md3.title = @"公会";
md3.icon = @"mine_tools_guild";
md3.type = QXMainHeaderOptionTypeGuild;
QXServiceModel *md4 = [[QXServiceModel alloc] init];
md4.title = @"挚友";
md4.icon = @"mine_tools_friend";
md4.type = QXMainHeaderOptionTypeFriend;
QXServiceModel *md5 = [[QXServiceModel alloc] init];
md5.title = @"房间";
md5.icon = @"mine_tools_room";
md5.type = QXMainHeaderOptionTypeRoom;
_toolsArray = [NSMutableArray arrayWithArray:@[
md2,
md3,
md4,
md5
]];
}
return _toolsArray;
}
-(QXServiceModel *)rechargeModel{
if (!_rechargeModel) {
_rechargeModel = [[QXServiceModel alloc] init];
_rechargeModel.title = @"充值";
_rechargeModel.icon = @"mine_tools_recharge";
_rechargeModel.type = QXMainHeaderOptionTypeRecharge;
}
return _rechargeModel;
}
-(NSMutableArray *)bannerImages{
if (!_bannerImages) {
_bannerImages = [NSMutableArray array];
}
return _bannerImages;
}
@end @end

View File

@@ -0,0 +1,18 @@
//
// QXMineHomeToolsCell.h
// QXLive
//
// Created by 启星 on 2025/11/4.
//
#import <UIKit/UIKit.h>
#import "QXServiceModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXMineHomeToolsCell : UICollectionViewCell
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (nonatomic,strong)QXServiceModel *model;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,22 @@
//
// QXMineHomeToolsCell.m
// QXLive
//
// Created by on 2025/11/4.
//
#import "QXMineHomeToolsCell.h"
@implementation QXMineHomeToolsCell
-(void)setModel:(QXServiceModel *)model{
_model = model;
self.titleLabel.text = model.title;
self.imageView.image = [UIImage imageNamed:model.icon];
}
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
self.backgroundColor = UIColor.clearColor;
}
@end

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="QXMineHomeToolsCell">
<rect key="frame" x="0.0" y="0.0" width="155" height="198"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="155" height="198"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CQb-0X-F8A">
<rect key="frame" x="16" y="37" width="123" height="123"/>
<constraints>
<constraint firstAttribute="width" secondItem="CQb-0X-F8A" secondAttribute="height" multiplier="1:1" id="GDf-KK-Dnb"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A50-91-O1H">
<rect key="frame" x="0.0" y="168" width="155" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="N0k-9B-NpF"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.80000000000000004" green="0.80392156862745101" blue="0.78431372549019607" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
<constraints>
<constraint firstItem="CQb-0X-F8A" firstAttribute="centerY" secondItem="SEy-5g-ep8" secondAttribute="centerY" constant="-13" id="Ero-Oq-fFS"/>
<constraint firstItem="A50-91-O1H" firstAttribute="top" secondItem="CQb-0X-F8A" secondAttribute="bottom" constant="8" id="PYh-qS-bcb"/>
<constraint firstAttribute="trailing" secondItem="CQb-0X-F8A" secondAttribute="trailing" constant="16" id="Po4-xa-acz"/>
<constraint firstItem="CQb-0X-F8A" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="16" id="bRx-en-KEu"/>
<constraint firstItem="A50-91-O1H" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="dHq-Z7-bcZ"/>
<constraint firstAttribute="trailing" secondItem="A50-91-O1H" secondAttribute="trailing" id="wIU-OJ-aKL"/>
</constraints>
<size key="customSize" width="155" height="300"/>
<connections>
<outlet property="imageView" destination="CQb-0X-F8A" id="zur-ed-KGg"/>
<outlet property="titleLabel" destination="A50-91-O1H" id="3K4-UR-37b"/>
</connections>
<point key="canvasLocation" x="219.08396946564883" y="107.74647887323944"/>
</collectionViewCell>
</objects>
</document>

View File

@@ -6,17 +6,44 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "QXServiceModel.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger) {
/// 等级
QXMineServiceTypeLevel = 40,
/// 个性装扮
QXMineServiceTypeDress = 41,
/// 我的背包
QXMineServiceTypeBackpack = 42,
/// 设置
QXMineServiceTypeSetting = 43,
/// 家族
QXMineServiceTypeFamily = 80,
/// 帮助中心
QXMineServiceTypeHelp = 44,
/// 邀请
QXMineServiceTypeInvite = 45,
/// 每日任务
QXMineServiceTypeDayTask = 46,
/// 意见反馈
QXMineServiceTypeReport = 47,
/// 个税客服
QXMineServiceTypeCustomerService = 48,
/// 歌手认证
QXMineServiceTypeSingerAuth = 49,
/// 我的歌单
QXMineServiceTypeSongList = 50,
}QXMineServiceType;
@protocol QXMineServiceCellDelegate <NSObject> @protocol QXMineServiceCellDelegate <NSObject>
@optional @optional
-(void)didClickServiceWithBtn:(UIButton*)button title:(NSString*)title; -(void)didClickServiceWithType:(QXMineServiceType)type;
@end @end
@interface QXMineServiceCell : UITableViewCell @interface QXMineServiceCell : UITableViewCell
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate; @property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
-(void)cellReload; @property (nonatomic,assign)BOOL isMore;
@property (nonatomic,assign)BOOL singerIsAuth;
+(instancetype)cellWithTableView:(UITableView *)tableView; +(instancetype)cellWithTableView:(UITableView *)tableView;
@end @end
@@ -24,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)UIImageView *imageView; @property (nonatomic,strong)UIImageView *imageView;
@property (nonatomic,strong)UILabel *titleLabel; @property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)QXServiceModel *model;
@end @end

Some files were not shown because too many files have changed in this diff Show More