房间完成
@@ -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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
加入房间
|
加入房间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -198,6 +198,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];
|
||||||
@@ -235,9 +249,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) {
|
||||||
@@ -262,6 +274,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;
|
||||||
@@ -279,6 +293,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];
|
||||||
|
}
|
||||||
// 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;
|
||||||
@@ -291,6 +308,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);
|
||||||
@@ -299,6 +319,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-(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;
|
||||||
@@ -381,6 +418,6 @@
|
|||||||
[[QXRedPacketDriftView shareView] dirfViewDidToBackground];
|
[[QXRedPacketDriftView shareView] dirfViewDidToBackground];
|
||||||
}
|
}
|
||||||
-(void)dirfViewBecomeToFront{
|
-(void)dirfViewBecomeToFront{
|
||||||
|
[[QXDrifNobilityJoinRoomView shareView] dirfViewBecomeToFront];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 签约结束
|
/// 签约结束
|
||||||
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value;
|
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value;
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId;
|
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId sign_coin_list:(NSArray*)sign_coin_list;
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signTimeDelayWithEndTime:(NSString*)endTime;
|
-(void)signTimeDelayWithEndTime:(NSString*)endTime;
|
||||||
|
|
||||||
|
|||||||
@@ -712,8 +712,13 @@
|
|||||||
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
||||||
NSString *sign_id = [NSString stringWithFormat:@"%@",msg.Text[@"sign_id"]];
|
NSString *sign_id = [NSString stringWithFormat:@"%@",msg.Text[@"sign_id"]];
|
||||||
NSString *sign_value = [NSString stringWithFormat:@"%@",msg.Text[@"sign_value"]];
|
NSString *sign_value = [NSString stringWithFormat:@"%@",msg.Text[@"sign_value"]];
|
||||||
if (self.delegate && [self.delegate respondsToSelector:@selector(signValueDidChangedWithSignUserInfo:sign_value:signId:)]) {
|
NSArray *sign_coin_list;
|
||||||
[self.delegate signValueDidChangedWithSignUserInfo:model.FromUserInfo sign_value:sign_value signId:sign_id];
|
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;
|
break;
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
#import "QXFamilyMemberCell.h"
|
#import "QXFamilyMemberCell.h"
|
||||||
#import "QXFamilyTopCell.h"
|
#import "QXFamilyTopCell.h"
|
||||||
#import "QXMineNetwork.h"
|
#import "QXMineNetwork.h"
|
||||||
@interface QXFamilySubViewController ()<UITableViewDelegate,UITableViewDataSource>
|
#import "QXUserHomePageViewController.h"
|
||||||
|
@interface QXFamilySubViewController ()<UITableViewDelegate,UITableViewDataSource,QXFamilyMemberCellDelegate>
|
||||||
@property (nonatomic,strong)UITableView *tableView;
|
@property (nonatomic,strong)UITableView *tableView;
|
||||||
@property (nonatomic,strong)QXFamilyModel *model;
|
@property (nonatomic,strong)QXFamilyModel *model;
|
||||||
|
|
||||||
@@ -53,6 +54,11 @@
|
|||||||
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
-(void)needRefresh{
|
||||||
|
self.page = 1;
|
||||||
|
[self getList];
|
||||||
|
}
|
||||||
|
|
||||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||||
if (self.model) {
|
if (self.model) {
|
||||||
return 2;
|
return 2;
|
||||||
@@ -74,6 +80,7 @@
|
|||||||
}else{
|
}else{
|
||||||
QXFamilyMemberCell *cell = [QXFamilyMemberCell cellWithTableView:tableView];
|
QXFamilyMemberCell *cell = [QXFamilyMemberCell cellWithTableView:tableView];
|
||||||
cell.model = self.model.group_members_lists[indexPath.row];
|
cell.model = self.model.group_members_lists[indexPath.row];
|
||||||
|
cell.delegate = self;
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,6 +127,12 @@
|
|||||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||||
|
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{
|
-(UITableView *)tableView{
|
||||||
if (!_tableView) {
|
if (!_tableView) {
|
||||||
|
|||||||
@@ -63,6 +63,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@property(nonatomic,strong)NSString *yesterday_earnings;
|
@property(nonatomic,strong)NSString *yesterday_earnings;
|
||||||
/// 是否显示续约按钮 1:显示 0:不显示
|
/// 是否显示续约按钮 1:显示 0:不显示
|
||||||
@property(nonatomic,strong)NSString *is_show_sign;
|
@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
|
@end
|
||||||
|
|
||||||
@interface QXFamilyEarningModel : NSObject
|
@interface QXFamilyEarningModel : NSObject
|
||||||
|
|||||||
@@ -130,6 +130,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@property (nonatomic,strong)QXUserCpInfoModel *cp_info;
|
@property (nonatomic,strong)QXUserCpInfoModel *cp_info;
|
||||||
|
|
||||||
|
@property (nonatomic,strong)QXUserHomeModel *master;
|
||||||
|
|
||||||
-(instancetype)copyModel;
|
-(instancetype)copyModel;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -216,6 +218,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@property (nonatomic,strong)QXUserCpInfoModel *cp_info;
|
@property (nonatomic,strong)QXUserCpInfoModel *cp_info;
|
||||||
|
|
||||||
|
@property (nonatomic,strong)QXUserHomeModel *master;
|
||||||
|
|
||||||
//@property (nonatomic,strong)QXRelationshipListModel *qinmi;
|
//@property (nonatomic,strong)QXRelationshipListModel *qinmi;
|
||||||
//@property (nonatomic,strong)QXRelationshipListModel *zhenai;
|
//@property (nonatomic,strong)QXRelationshipListModel *zhenai;
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
||||||
return @{
|
return @{
|
||||||
@"tag_list" : @"QXUserTag",
|
@"tag_list" : @"QXUserTag",
|
||||||
@"cp_info": @"QXUserCpInfoModel"
|
@"cp_info": @"QXUserCpInfoModel",
|
||||||
|
@"master": @"QXUserHomeModel",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +62,8 @@
|
|||||||
return @{
|
return @{
|
||||||
// @"qinmi" : @"QXRelationshipListModel",
|
// @"qinmi" : @"QXRelationshipListModel",
|
||||||
// @"zhenai" : @"QXRelationshipListModel"
|
// @"zhenai" : @"QXRelationshipListModel"
|
||||||
@"cp_info": @"QXUserCpInfoModel"
|
@"cp_info": @"QXUserCpInfoModel",
|
||||||
|
@"master": @"QXUserHomeModel",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -295,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;
|
||||||
|
|
||||||
|
|
||||||
@@ -1377,6 +1378,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
申请加入公会
|
||||||
|
*/
|
||||||
|
|
||||||
|
+(void)joinGuildWithGuildId:(NSString*)guild_id
|
||||||
|
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||||
|
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -588,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) {
|
||||||
|
int code = [responseObject[@"code"] intValue];
|
||||||
|
if(code == 202){
|
||||||
|
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) {
|
if (successBlock) {
|
||||||
QXRoomModel *model = [QXRoomModel yy_modelWithJSON:responseObject[@"data"]];
|
QXRoomModel *model = [QXRoomModel yy_modelWithJSON:responseObject[@"data"]];
|
||||||
successBlock(model);
|
successBlock(model);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||||
failBlock(error,msg);
|
failBlock(error,msg);
|
||||||
}];
|
}];
|
||||||
@@ -2762,4 +2777,23 @@
|
|||||||
failBlock(error,msg);
|
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);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -230,6 +230,7 @@
|
|||||||
|
|
||||||
self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(self.topBgView.left, self.topBgView.bottom+12, self.topBgView.width, 64) delegate:self placeholderImage:nil];
|
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.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||||
|
self.cycleScrollView.backgroundColor = UIColor.clearColor;
|
||||||
[self.cycleScrollView addRoundedCornersWithRadius:8];
|
[self.cycleScrollView addRoundedCornersWithRadius:8];
|
||||||
[self addSubview:self.cycleScrollView];
|
[self addSubview:self.cycleScrollView];
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
|
|
||||||
QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
||||||
md5.title = @"家族";
|
md5.title = @"家族";
|
||||||
md5.icon = @"service_setting";
|
md5.icon = @"service_my_family";
|
||||||
md5.type = QXMineServiceTypeFamily;
|
md5.type = QXMineServiceTypeFamily;
|
||||||
|
|
||||||
_serviceArray = [NSMutableArray arrayWithArray:@[
|
_serviceArray = [NSMutableArray arrayWithArray:@[
|
||||||
|
|||||||
@@ -23,6 +23,15 @@
|
|||||||
@interface QXUserHomeHeaderView()<UICollectionViewDelegate,UICollectionViewDataSource,QXUserCpCardViewDelegate>
|
@interface QXUserHomeHeaderView()<UICollectionViewDelegate,UICollectionViewDataSource,QXUserCpCardViewDelegate>
|
||||||
//@property (nonatomic,strong) CKShimmerLabel * tempName;
|
//@property (nonatomic,strong) CKShimmerLabel * tempName;
|
||||||
@property (nonatomic,strong) QXSeatHeaderView* headerView;
|
@property (nonatomic,strong) QXSeatHeaderView* headerView;
|
||||||
|
/// 师傅
|
||||||
|
@property (nonatomic,strong)UIView *masterView;
|
||||||
|
/// 师傅
|
||||||
|
@property (nonatomic,strong)QXSeatHeaderView *masterHeaderView;
|
||||||
|
/// 师傅
|
||||||
|
@property (nonatomic,strong)UIImageView *masterViewIcon;
|
||||||
|
/// 师傅
|
||||||
|
@property (nonatomic,strong)UIButton *masterViewButton;
|
||||||
|
|
||||||
@property (nonatomic,strong) UIView * whiteBgView;
|
@property (nonatomic,strong) UIView * whiteBgView;
|
||||||
@property (nonatomic,strong) UIView * grayBgView;
|
@property (nonatomic,strong) UIView * grayBgView;
|
||||||
@property (nonatomic,strong) CKShimmerLabel * nameLabel;
|
@property (nonatomic,strong) CKShimmerLabel * nameLabel;
|
||||||
@@ -67,6 +76,38 @@
|
|||||||
make.top.mas_equalTo(26);
|
make.top.mas_equalTo(26);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
self.masterView = [[UIView alloc] init];
|
||||||
|
self.masterView.hidden = YES;
|
||||||
|
[self addSubview:self.masterView];
|
||||||
|
[self.masterView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.headerView);
|
||||||
|
make.left.equalTo(self.headerView.mas_right);
|
||||||
|
make.size.mas_equalTo(CGSizeMake(ScaleWidth(45), ScaleWidth(45+16)));
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.masterHeaderView = [[QXSeatHeaderView alloc] init];
|
||||||
|
self.masterHeaderView.contentMode = UIViewContentModeScaleAspectFill;
|
||||||
|
[self.masterView addSubview:self.masterHeaderView];
|
||||||
|
//
|
||||||
|
[self.masterHeaderView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.top.equalTo(self.masterView);
|
||||||
|
make.height.equalTo(self.masterHeaderView.mas_width);
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.masterViewIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_info_master_icon"]];
|
||||||
|
[self.masterView insertSubview:self.masterViewIcon aboveSubview:self.masterHeaderView];
|
||||||
|
[self.masterViewIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.masterHeaderView.mas_bottom).offset(-8);
|
||||||
|
make.centerX.equalTo(self.masterView);
|
||||||
|
make.size.mas_equalTo(CGSizeMake(ScaleWidth(30), ScaleWidth(16)));
|
||||||
|
}];
|
||||||
|
self.masterViewButton = [[UIButton alloc] init];
|
||||||
|
[self.masterViewButton addTarget:self action:@selector(toMasterUserHome) forControlEvents:(UIControlEventTouchUpInside)];
|
||||||
|
[self.masterView addSubview:self.masterViewButton];
|
||||||
|
[self.masterViewButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self.masterView);
|
||||||
|
}];
|
||||||
|
|
||||||
self.nameLabel = [[CKShimmerLabel alloc] initWithFrame:CGRectMake(32, self.headerView.bottom+4, 200, 24)];
|
self.nameLabel = [[CKShimmerLabel alloc] initWithFrame:CGRectMake(32, self.headerView.bottom+4, 200, 24)];
|
||||||
// self.nameLabel.text = @"羽声语音";
|
// self.nameLabel.text = @"羽声语音";
|
||||||
self.nameLabel.shimmerWidth = 20;
|
self.nameLabel.shimmerWidth = 20;
|
||||||
@@ -305,6 +346,13 @@
|
|||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)toMasterUserHome{
|
||||||
|
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||||
|
NSString *userId = self.model.master.user_id;
|
||||||
|
vc.user_id = userId;
|
||||||
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)followAction{
|
-(void)followAction{
|
||||||
MJWeakSelf
|
MJWeakSelf
|
||||||
[QXDynamicNetwork followWithUserId:self.model.user_id type:@"1" successBlock:^(NSDictionary * _Nonnull dict) {
|
[QXDynamicNetwork followWithUserId:self.model.user_id type:@"1" successBlock:^(NSDictionary * _Nonnull dict) {
|
||||||
@@ -369,6 +417,12 @@
|
|||||||
[self.headerView setHeadIcon:model.avatar dress:model.dress];
|
[self.headerView setHeadIcon:model.avatar dress:model.dress];
|
||||||
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.nobility_image]];
|
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.nobility_image]];
|
||||||
|
|
||||||
|
if (model.master) {
|
||||||
|
self.masterView.hidden = NO;
|
||||||
|
[self.masterHeaderView setHeadIcon:model.master.avatar dress:model.master.dress];
|
||||||
|
}else{
|
||||||
|
self.masterView.hidden = YES;
|
||||||
|
}
|
||||||
|
|
||||||
if ([model.nickname_color isExist]) {
|
if ([model.nickname_color isExist]) {
|
||||||
self.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color];
|
self.nameLabel.shimmerColor = [UIColor colorWithHexString:model.nickname_color];
|
||||||
|
|||||||
@@ -9,7 +9,13 @@
|
|||||||
#import "QXFamilyModel.h"
|
#import "QXFamilyModel.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@protocol QXFamilyMemberCellDelegate <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
|
||||||
|
-(void)needRefresh;
|
||||||
|
|
||||||
|
@end
|
||||||
@interface QXFamilyMemberCell : UITableViewCell
|
@interface QXFamilyMemberCell : UITableViewCell
|
||||||
@property (weak, nonatomic) IBOutlet QXSeatHeaderView *headerView;
|
@property (weak, nonatomic) IBOutlet QXSeatHeaderView *headerView;
|
||||||
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
|
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
|
||||||
@@ -23,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@property (weak, nonatomic) IBOutlet UIButton *yestodayPriceBtn;
|
@property (weak, nonatomic) IBOutlet UIButton *yestodayPriceBtn;
|
||||||
@property (weak, nonatomic) IBOutlet UIButton *continueBtn;
|
@property (weak, nonatomic) IBOutlet UIButton *continueBtn;
|
||||||
@property (strong, nonatomic) QXFamilyMemberModel *model;
|
@property (strong, nonatomic) QXFamilyMemberModel *model;
|
||||||
|
@property (weak, nonatomic)id<QXFamilyMemberCellDelegate>delegate;
|
||||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
#import "QXFamilyMemberCell.h"
|
#import "QXFamilyMemberCell.h"
|
||||||
#import "QXUserHomeHeaderView.h"
|
#import "QXUserHomeHeaderView.h"
|
||||||
#import "QXCustomAlertView.h"
|
#import "QXCustomAlertView.h"
|
||||||
|
#import "QXMineNetwork.h"
|
||||||
|
|
||||||
@interface QXFamilyMemberCell()<UICollectionViewDataSource,UICollectionViewDelegate>
|
@interface QXFamilyMemberCell()<UICollectionViewDataSource,UICollectionViewDelegate>
|
||||||
@end
|
@end
|
||||||
@implementation QXFamilyMemberCell
|
@implementation QXFamilyMemberCell
|
||||||
@@ -35,7 +37,7 @@
|
|||||||
}
|
}
|
||||||
-(void)setModel:(QXFamilyMemberModel *)model{
|
-(void)setModel:(QXFamilyMemberModel *)model{
|
||||||
_model = model;
|
_model = model;
|
||||||
[self.headerView setHeadIcon:model.nickname dress:model.dress];
|
[self.headerView setHeadIcon:model.avatar dress:model.dress];
|
||||||
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.nobility_image]];
|
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.nobility_image]];
|
||||||
self.dayLabel.text = [NSString stringWithFormat:@"剩余租期:%@",model.end_day];
|
self.dayLabel.text = [NSString stringWithFormat:@"剩余租期:%@",model.end_day];
|
||||||
self.timesLabel.text = [NSString stringWithFormat:@"免费续约次数:%@",model.free_renewal];
|
self.timesLabel.text = [NSString stringWithFormat:@"免费续约次数:%@",model.free_renewal];
|
||||||
@@ -47,20 +49,66 @@
|
|||||||
self.continueBtn.hidden = model.is_show_sign.intValue==1?NO:YES;
|
self.continueBtn.hidden = model.is_show_sign.intValue==1?NO:YES;
|
||||||
}
|
}
|
||||||
- (IBAction)continueAction:(id)sender {
|
- (IBAction)continueAction:(id)sender {
|
||||||
|
|
||||||
QXCustomAlertView *al = [[QXCustomAlertView alloc] init];
|
QXCustomAlertView *al = [[QXCustomAlertView alloc] init];
|
||||||
al.title = @"续约提示";
|
al.title = @"续约提示";
|
||||||
al.message = @"尊敬的用户: 您的徒弟【夏沫】当前为首次签约的 免费续约期。续约后,徒弟合约将延长7天,您剩余的免费续约次数:1次";
|
|
||||||
al.cancleTitle = @"取消";
|
al.cancleTitle = @"取消";
|
||||||
al.commitTitle = @"确认续约";
|
al.commitTitle = @"确认续约";
|
||||||
al.isFromController = YES;
|
al.isFromController = YES;
|
||||||
|
if (self.model.free_renewal.intValue>0) {
|
||||||
|
al.message = [NSString stringWithFormat:@"尊敬的用户: 您的徒弟【%@】当前为首次签约的 免费续约期。续约后,徒弟合约将延长%@天,您剩余的免费续约次数:%d次",self.model.nickname,self.model.free_re_sign_day,self.model.free_renewal.intValue-1];
|
||||||
|
}else{
|
||||||
|
NSInteger currentFeeInt = (NSInteger)ceil(self.model.market_value.doubleValue*self.model.sign_user_ratio.doubleValue/100.0);
|
||||||
|
NSString *currentFee = [NSString stringWithFormat:@"%ld",currentFeeInt];
|
||||||
|
al.message = [NSString stringWithFormat:@"尊敬的用户:本次续约将预估支付%@金币(【%@】身价的 %@%% )作为续约费用,续约后,师徒合约将延长 %@ 天\n注:支付价格是预估价格,徒弟身价是实时变化 续约后无法取消",currentFee,self.model.nickname,self.model.sign_user_ratio,self.model.sign_times];
|
||||||
|
}
|
||||||
|
MJWeakSelf
|
||||||
al.cancelBlock = ^{
|
al.cancelBlock = ^{
|
||||||
[[QXGlobal shareGlobal] hideViewBlock:nil];
|
[[QXGlobal shareGlobal] hideViewBlock:nil];
|
||||||
};
|
};
|
||||||
al.commitBlock = ^{
|
al.commitBlock = ^{
|
||||||
[[QXGlobal shareGlobal] hideViewBlock:nil];
|
[[QXGlobal shareGlobal] hideViewBlock:nil];
|
||||||
|
if (weakSelf.model.free_renewal.intValue>0) {
|
||||||
|
[weakSelf networkFreeSign];
|
||||||
|
}else{
|
||||||
|
[weakSelf networkCoinSign];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
[QXGlobal.shareGlobal showView:al popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:nil];
|
[QXGlobal.shareGlobal showView:al popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:nil];
|
||||||
// [al showInView:self.viewController.view title:@"续约提示" message:@"尊敬的用户: 您的徒弟【夏沫】当前为首次签约的 免费续约期。续约后,徒弟合约将延长7天,您剩余的免费续约次数:1次" cancleTitle:@"取消" commitTitle:@"确认续约"];
|
}
|
||||||
|
|
||||||
|
-(void)networkFreeSign{
|
||||||
|
__weak typeof(self) weakSelf = self;
|
||||||
|
[QXMineNetwork signFreeResignWithUserId:self.model.user_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||||
|
showToast(@"续约成功");
|
||||||
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||||
|
if (!strongSelf) {
|
||||||
|
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (strongSelf.delegate && [strongSelf.delegate respondsToSelector:@selector(needRefresh)]) {
|
||||||
|
[strongSelf.delegate needRefresh];
|
||||||
|
}
|
||||||
|
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||||
|
showToast(msg);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
-(void)networkCoinSign{
|
||||||
|
__weak typeof(self) weakSelf = self;
|
||||||
|
[QXMineNetwork signCoinResignWithUserId:self.model.user_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||||
|
showToast(@"续约成功");
|
||||||
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||||
|
if (!strongSelf) {
|
||||||
|
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (strongSelf.delegate && [strongSelf.delegate respondsToSelector:@selector(needRefresh)]) {
|
||||||
|
[strongSelf.delegate needRefresh];
|
||||||
|
}
|
||||||
|
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||||
|
showToast(msg);
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||||
if (self.model==nil) {
|
if (self.model==nil) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
if (self.model.group_members_lists.count == 0) {
|
if (self.model.group_members_lists.count == 0) {
|
||||||
showToast(@"家族群至少需要签约一位徒弟");
|
showToast(@"家族群至少需要签约一位徒弟");
|
||||||
}else{
|
}else{
|
||||||
[[QXGlobal shareGlobal] chatWithGroupId:self.model.group_id cover:self.model.group_owner_info.avatar name:[NSString stringWithFormat:@"%@的家族",self.model.group_owner_info.nickname] navagationController:self.viewController.navigationController];
|
[[QXGlobal shareGlobal] chatWithFamilyGroupId:self.model.group_id cover:self.model.group_owner_info.avatar name:[NSString stringWithFormat:@"%@的家族",self.model.group_owner_info.nickname] navagationController:self.viewController.navigationController];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;
|
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;
|
||||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||||
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
|
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
|
||||||
|
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
|
||||||
@property (nonatomic,assign)BOOL isCoin;
|
@property (nonatomic,assign)BOOL isCoin;
|
||||||
@property (nonatomic,strong) QXCoinDetailModel *model;
|
@property (nonatomic,strong) QXCoinDetailModel *model;
|
||||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
}
|
}
|
||||||
-(void)setIsCoin:(BOOL)isCoin{
|
-(void)setIsCoin:(BOOL)isCoin{
|
||||||
_isCoin = isCoin;
|
_isCoin = isCoin;
|
||||||
|
self.iconImageView.image = [UIImage imageNamed:isCoin?@"mine_recharge_corn":@"family_diamond"];
|
||||||
}
|
}
|
||||||
-(void)setModel:(QXCoinDetailModel *)model{
|
-(void)setModel:(QXCoinDetailModel *)model{
|
||||||
_model = model;
|
_model = model;
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
</tableViewCellContentView>
|
</tableViewCellContentView>
|
||||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="iconImageView" destination="otM-9U-0Vb" id="jyY-jW-Ysm"/>
|
||||||
<outlet property="priceLabel" destination="Fxs-N2-aqw" id="rfF-fe-gWN"/>
|
<outlet property="priceLabel" destination="Fxs-N2-aqw" id="rfF-fe-gWN"/>
|
||||||
<outlet property="reasonLabel" destination="9Ov-rS-XTy" id="JXd-OS-yeh"/>
|
<outlet property="reasonLabel" destination="9Ov-rS-XTy" id="JXd-OS-yeh"/>
|
||||||
<outlet property="timeLabel" destination="fEd-EE-hdG" id="4VS-rn-KzE"/>
|
<outlet property="timeLabel" destination="fEd-EE-hdG" id="4VS-rn-KzE"/>
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#import "OpenUDID.h"
|
#import "OpenUDID.h"
|
||||||
static AFNetworkReachabilityStatus AFNetWorkStatus; //网络状态
|
static AFNetworkReachabilityStatus AFNetWorkStatus; //网络状态
|
||||||
static NSInteger HTTP_LOGINLOSE_CODE = 301;
|
static NSInteger HTTP_LOGINLOSE_CODE = 301;
|
||||||
|
/// 房间接口code 202
|
||||||
|
static NSInteger HTTP_ROOM_ERROR_CODE = 202;
|
||||||
static NSInteger HTTP_SUCCESS_CODE = 1;
|
static NSInteger HTTP_SUCCESS_CODE = 1;
|
||||||
static NSInteger HTTP_ERROR_CODE = 0;
|
static NSInteger HTTP_ERROR_CODE = 0;
|
||||||
|
|
||||||
|
|||||||
22
QXLive/Other/Assets.xcassets/mine/service_my_family.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "service_my_family@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "service_my_family@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
QXLive/Other/Assets.xcassets/mine/service_my_family.imageset/service_my_family@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
QXLive/Other/Assets.xcassets/mine/service_my_family.imageset/service_my_family@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
22
QXLive/Other/Assets.xcassets/room/user_info_master_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "user_info_master_icon@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "user_info_master_icon@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
QXLive/Other/Assets.xcassets/room/user_info_master_icon.imageset/user_info_master_icon@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
QXLive/Other/Assets.xcassets/room/user_info_master_icon.imageset/user_info_master_icon@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
22
QXLive/Other/Assets.xcassets/room/签约房/room_sign_fail.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_fail@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_fail@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_fail.imageset/room_sign_fail@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 282 KiB |
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_fail.imageset/room_sign_fail@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 601 KiB |
22
QXLive/Other/Assets.xcassets/room/签约房/room_sign_fail_btn.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_fail_btn@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_fail_btn@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_fail_btn.imageset/room_sign_fail_btn@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_fail_btn.imageset/room_sign_fail_btn@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 106 KiB |
22
QXLive/Other/Assets.xcassets/room/签约房/room_sign_start.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_start@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_start@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_start.imageset/room_sign_start@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 320 KiB |
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_start.imageset/room_sign_start@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 763 KiB |
22
QXLive/Other/Assets.xcassets/room/签约房/room_sign_success.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_success@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_sign_success@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_success.imageset/room_sign_success@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 249 KiB |
BIN
QXLive/Other/Assets.xcassets/room/签约房/room_sign_success.imageset/room_sign_success@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 673 KiB |
@@ -524,7 +524,8 @@ static NSString * QXMyJoinFamily = @"api/Family/myJoinFamily";
|
|||||||
/// 家族收益详情
|
/// 家族收益详情
|
||||||
static NSString * QXMyFamilyEarnings = @"api/Family/familyEarnings";
|
static NSString * QXMyFamilyEarnings = @"api/Family/familyEarnings";
|
||||||
|
|
||||||
|
/// 申请加入公会
|
||||||
|
static NSString * QXApplyJoinGuild = @"api/Guild/join_guild";
|
||||||
|
|
||||||
/// 签约出价列表
|
/// 签约出价列表
|
||||||
static NSString * QXSignCoinList = @"api/Sign/sign_coin_list";
|
static NSString * QXSignCoinList = @"api/Sign/sign_coin_list";
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
[self.seatContentView signDidEndWithUserInfo1:userInfo1 userInfo2:userInfo2 sign_value:sign_value];
|
[self.seatContentView signDidEndWithUserInfo1:userInfo1 userInfo2:userInfo2 sign_value:sign_value];
|
||||||
}
|
}
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId{
|
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId sign_coin_list:(NSArray*)sign_coin_list{
|
||||||
[self.seatContentView signValueDidChangedWithSignUserInfo:signUserInfo sign_value:sign_value signId:signId];
|
[self.seatContentView signValueDidChangedWithSignUserInfo:signUserInfo sign_value:sign_value signId:signId sign_coin_list:sign_coin_list];
|
||||||
}
|
}
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signTimeDelayWithEndTime:(NSString*)endTime{
|
-(void)signTimeDelayWithEndTime:(NSString*)endTime{
|
||||||
|
|||||||
@@ -314,6 +314,8 @@ QXRoomUserInfoViewDelegate
|
|||||||
weakSelf.roomModel = roomModel;
|
weakSelf.roomModel = roomModel;
|
||||||
[self resetSubviews];
|
[self resetSubviews];
|
||||||
[self configRoomDataIsJoin:YES];
|
[self configRoomDataIsJoin:YES];
|
||||||
|
} 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);
|
||||||
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
|
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
|
||||||
|
|||||||
@@ -136,6 +136,7 @@
|
|||||||
self.countLabel = [[UILabel alloc] init];
|
self.countLabel = [[UILabel alloc] init];
|
||||||
self.countLabel.textColor = [UIColor whiteColor];
|
self.countLabel.textColor = [UIColor whiteColor];
|
||||||
self.countLabel.font = [UIFont systemFontOfSize:12];
|
self.countLabel.font = [UIFont systemFontOfSize:12];
|
||||||
|
self.countLabel.hidden = YES;
|
||||||
[self addSubview:self.countLabel];
|
[self addSubview:self.countLabel];
|
||||||
[self.countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.height.mas_equalTo(ScaleWidth(40));
|
make.height.mas_equalTo(ScaleWidth(40));
|
||||||
|
|||||||
@@ -30,6 +30,14 @@
|
|||||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||||
/// 头像
|
/// 头像
|
||||||
@property (nonatomic,strong)QXSeatHeaderView *headerImageView;
|
@property (nonatomic,strong)QXSeatHeaderView *headerImageView;
|
||||||
|
/// 师傅
|
||||||
|
@property (nonatomic,strong)UIView *masterView;
|
||||||
|
/// 师傅
|
||||||
|
@property (nonatomic,strong)QXSeatHeaderView *masterHeaderView;
|
||||||
|
/// 师傅
|
||||||
|
@property (nonatomic,strong)UIImageView *masterViewIcon;
|
||||||
|
/// 师傅点击按钮
|
||||||
|
@property (nonatomic,strong)UIButton *masterViewButton;
|
||||||
/// 昵称
|
/// 昵称
|
||||||
@property (nonatomic,strong)CKShimmerLabel *nameLabel;
|
@property (nonatomic,strong)CKShimmerLabel *nameLabel;
|
||||||
@property (nonatomic,strong)UIImageView *sexImageView;
|
@property (nonatomic,strong)UIImageView *sexImageView;
|
||||||
@@ -123,8 +131,42 @@
|
|||||||
make.size.mas_equalTo(CGSizeMake(ScaleWidth(66), ScaleWidth(79)));
|
make.size.mas_equalTo(CGSizeMake(ScaleWidth(66), ScaleWidth(79)));
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
self.masterView = [[UIView alloc] init];
|
||||||
|
self.masterView.hidden = YES;
|
||||||
|
[self.bgView addSubview:self.masterView];
|
||||||
|
[self.masterView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.headerImageView);
|
||||||
|
make.left.equalTo(self.headerImageView.mas_right);
|
||||||
|
make.size.mas_equalTo(CGSizeMake(ScaleWidth(45), ScaleWidth(45+16)));
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.masterHeaderView = [[QXSeatHeaderView alloc] init];
|
||||||
|
self.masterHeaderView.contentMode = UIViewContentModeScaleAspectFill;
|
||||||
|
[self.masterView addSubview:self.masterHeaderView];
|
||||||
|
//
|
||||||
|
[self.masterHeaderView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.top.equalTo(self.masterView);
|
||||||
|
make.height.equalTo(self.masterHeaderView.mas_width);
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.masterViewIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_info_master_icon"]];
|
||||||
|
[self.masterView insertSubview:self.masterViewIcon aboveSubview:self.masterHeaderView];
|
||||||
|
[self.masterViewIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.masterHeaderView.mas_bottom).offset(-8);
|
||||||
|
make.centerX.equalTo(self.masterView);
|
||||||
|
make.size.mas_equalTo(CGSizeMake(ScaleWidth(30), ScaleWidth(16)));
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.masterViewButton = [[UIButton alloc] init];
|
||||||
|
[self.masterViewButton addTarget:self action:@selector(toMasterUserHome) forControlEvents:(UIControlEventTouchUpInside)];
|
||||||
|
[self.masterView addSubview:self.masterViewButton];
|
||||||
|
[self.masterViewButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self.masterView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
|
||||||
UIButton *headder = [[UIButton alloc] init];
|
UIButton *headder = [[UIButton alloc] init];
|
||||||
[headder addTarget:self action:@selector(toHomePage) forControlEvents:(UIControlEventTouchUpInside)];
|
[headder addTarget:self action:@selector(toUserHome) forControlEvents:(UIControlEventTouchUpInside)];
|
||||||
[self.bgView addSubview:headder];
|
[self.bgView addSubview:headder];
|
||||||
[headder mas_makeConstraints:^(MASConstraintMaker *make) {
|
[headder mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.bottom.left.right.top.equalTo(self.headerImageView);
|
make.bottom.left.right.top.equalTo(self.headerImageView);
|
||||||
@@ -485,11 +527,22 @@
|
|||||||
-(void)followAction{
|
-(void)followAction{
|
||||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:self.roomId isRejoin:NO navagationController:self.viewController.navigationController];
|
[[QXGlobal shareGlobal] joinRoomWithRoomId:self.roomId isRejoin:NO navagationController:self.viewController.navigationController];
|
||||||
}
|
}
|
||||||
|
-(void)toMasterUserHome{
|
||||||
|
[self toHomePageIsMaster:YES];
|
||||||
|
}
|
||||||
|
-(void)toUserHome{
|
||||||
|
[self toHomePageIsMaster:NO];
|
||||||
|
}
|
||||||
|
|
||||||
-(void)toHomePage{
|
-(void)toHomePageIsMaster:(BOOL)isMaster{
|
||||||
[self hide];
|
[self hide];
|
||||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||||
NSString *userId = self.userId;
|
NSString *userId = self.userId;
|
||||||
|
if (isMaster) {
|
||||||
|
userId = self.userModel.master.user_id;
|
||||||
|
}else{
|
||||||
|
userId = self.userId;
|
||||||
|
}
|
||||||
vc.user_id = userId;
|
vc.user_id = userId;
|
||||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
@@ -590,6 +643,12 @@
|
|||||||
}else{
|
}else{
|
||||||
[weakSelf.nameLabel stopShimmer];
|
[weakSelf.nameLabel stopShimmer];
|
||||||
}
|
}
|
||||||
|
if (model.master) {
|
||||||
|
weakSelf.masterView.hidden = NO;
|
||||||
|
[weakSelf.masterHeaderView setHeadIcon:model.master.avatar dress:model.master.dress];
|
||||||
|
}else{
|
||||||
|
weakSelf.masterView.hidden = YES;
|
||||||
|
}
|
||||||
weakSelf.nameLabel.text = model.nickname;
|
weakSelf.nameLabel.text = model.nickname;
|
||||||
[weakSelf.nameLabel.contentLabel sizeToFit];
|
[weakSelf.nameLabel.contentLabel sizeToFit];
|
||||||
[weakSelf.nameLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
[weakSelf.nameLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -920,6 +979,11 @@
|
|||||||
}
|
}
|
||||||
if (sender == self.joinGuildBtn) {
|
if (sender == self.joinGuildBtn) {
|
||||||
QXLOG(@"加入公会");
|
QXLOG(@"加入公会");
|
||||||
|
[QXMineNetwork joinGuildWithGuildId:self.userModel.guild successBlock:^(NSDictionary * _Nonnull dict) {
|
||||||
|
|
||||||
|
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||||
|
|
||||||
|
}];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sender == self.focusBtn) {
|
if (sender == self.focusBtn) {
|
||||||
|
|||||||
21
QXLive/Room(房间)/View/签约房/QXSignAlertView.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// QXSignAlertView.h
|
||||||
|
// QXLive
|
||||||
|
//
|
||||||
|
// Created by 启星 on 2025/12/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
typedef NS_ENUM(NSInteger) {
|
||||||
|
QXSignAlerTypeStart = 0,
|
||||||
|
QXSignAlerTypeFail = 1,
|
||||||
|
QXSignAlerTypeSuccess = 2,
|
||||||
|
}QXSignAlerType;
|
||||||
|
@interface QXSignAlertView : UIView
|
||||||
|
-(instancetype)initWithType:(QXSignAlerType)type;
|
||||||
|
-(void)showInView:(UIView*)view;
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
130
QXLive/Room(房间)/View/签约房/QXSignAlertView.m
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
//
|
||||||
|
// QXSignAlertView.m
|
||||||
|
// QXLive
|
||||||
|
//
|
||||||
|
// Created by 启星 on 2025/12/1.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "QXSignAlertView.h"
|
||||||
|
@interface QXSignAlertView()
|
||||||
|
@property (nonatomic,strong)UIView *bgView;
|
||||||
|
@property (nonatomic,strong)UIImageView *imageView;
|
||||||
|
@property (nonatomic,strong)UIButton *closeBtn;
|
||||||
|
@property (assign,nonatomic)QXSignAlerType type;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation QXSignAlertView
|
||||||
|
-(instancetype)initWithType:(QXSignAlerType)type{
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
_type = type;
|
||||||
|
self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
|
[self initSubviewsWithType:type];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)initSubviewsWithType:(QXSignAlerType)type{
|
||||||
|
self.bgView = [[UIView alloc] init];
|
||||||
|
[self addSubview:self.bgView];
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case QXSignAlerTypeStart:{
|
||||||
|
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.width.mas_equalTo(ScaleWidth(222));
|
||||||
|
make.height.mas_equalTo(ScaleWidth(222));
|
||||||
|
make.centerX.centerY.equalTo(self);
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_start"]];
|
||||||
|
self.imageView.contentMode = UIViewContentModeScaleToFill;
|
||||||
|
[self.bgView addSubview:self.imageView];
|
||||||
|
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self.bgView);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case QXSignAlerTypeFail:
|
||||||
|
{
|
||||||
|
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.width.mas_equalTo(ScaleWidth(272));
|
||||||
|
make.height.mas_equalTo(ScaleWidth(397));
|
||||||
|
make.centerX.centerY.equalTo(self);
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_fail"]];
|
||||||
|
[self.bgView addSubview:self.imageView];
|
||||||
|
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self.bgView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
self.closeBtn = [[UIButton alloc] init];
|
||||||
|
[self.closeBtn setBackgroundImage:[UIImage imageNamed:@"room_sign_fail_btn"] forState:(UIControlStateNormal)];
|
||||||
|
[self.closeBtn addTarget:self action:@selector(hide) forControlEvents:(UIControlEventTouchUpInside)];
|
||||||
|
[self.bgView addSubview:self.closeBtn];
|
||||||
|
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.bottom.mas_equalTo(ScaleWidth(-29));
|
||||||
|
make.width.mas_equalTo(ScaleWidth(139));
|
||||||
|
make.height.mas_equalTo(ScaleWidth(51));
|
||||||
|
make.centerX.equalTo(self.bgView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case QXSignAlerTypeSuccess:
|
||||||
|
{
|
||||||
|
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.width.mas_equalTo(ScaleWidth(222));
|
||||||
|
make.height.mas_equalTo(ScaleWidth(222));
|
||||||
|
make.centerX.centerY.equalTo(self);
|
||||||
|
}];
|
||||||
|
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_success"]];
|
||||||
|
[self.bgView addSubview:self.imageView];
|
||||||
|
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self.bgView);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(void)showInView:(UIView*)view{
|
||||||
|
[view addSubview:self];
|
||||||
|
self.bgView.alpha = 0;
|
||||||
|
[UIView animateWithDuration:0.3 animations:^{
|
||||||
|
self.bgView.alpha = 1;
|
||||||
|
}completion:^(BOOL finished) {
|
||||||
|
|
||||||
|
}];
|
||||||
|
[self performSelector:@selector(hide) afterDelay:1];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)hide{
|
||||||
|
if (!self.superview) {
|
||||||
|
NSLog(@"⚠️ View already removed from superview");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
__weak typeof(self) weakSelf = self;
|
||||||
|
[UIView animateWithDuration:0.3 animations:^{
|
||||||
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||||
|
if (!strongSelf) {
|
||||||
|
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self.bgView.alpha = 0;
|
||||||
|
}completion:^(BOOL finished) {
|
||||||
|
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||||
|
if (!strongSelf) {
|
||||||
|
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (self.superview) {
|
||||||
|
[self removeFromSuperview];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
@end
|
||||||
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@property (nonatomic,strong)NSString *signId;
|
@property (nonatomic,strong)NSString *signId;
|
||||||
@property (nonatomic,weak)id<QXSignCoinListViewDelegate>delegate;
|
@property (nonatomic,weak)id<QXSignCoinListViewDelegate>delegate;
|
||||||
@property (nonatomic,strong)QXRoomPitModel *pitModel;
|
@property (nonatomic,strong)QXRoomPitModel *pitModel;
|
||||||
-(void)refreshCoinList;
|
-(void)refreshCoinListWith:(NSArray*)coinList;
|
||||||
-(void)showInView:(UIView *)view;
|
-(void)showInView:(UIView *)view;
|
||||||
-(void)hide;
|
-(void)hide;
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -210,11 +210,21 @@
|
|||||||
[weakSelf.collectionView reloadData];
|
[weakSelf.collectionView reloadData];
|
||||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||||
showToast(msg);
|
showToast(msg);
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
[weakSelf getCoinList];
|
||||||
|
});
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)refreshCoinList{
|
-(void)refreshCoinListWith:(NSArray *)coinList{
|
||||||
[self getCoinList];
|
[self getMyWallet];
|
||||||
|
[self.dataArray removeAllObjects];
|
||||||
|
for (NSString*title in coinList) {
|
||||||
|
QXRoomRelationModel *md = [[QXRoomRelationModel alloc] init];
|
||||||
|
md.name = title;
|
||||||
|
[self.dataArray addObject:md];
|
||||||
|
}
|
||||||
|
[self.collectionView reloadData];
|
||||||
}
|
}
|
||||||
-(void)showInView:(UIView *)view{
|
-(void)showInView:(UIView *)view{
|
||||||
[self getCoinList];
|
[self getCoinList];
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
NSInteger itemWidth = (SCREEN_WIDTH-16*2-12*3)/4;
|
NSInteger itemWidth = (SCREEN_WIDTH-16*2-12*3)/4;
|
||||||
layout.itemSize = CGSizeMake(itemWidth, 44);
|
layout.itemSize = CGSizeMake(itemWidth, 44);
|
||||||
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.titleLabel.bottom, self.bgView.width, self.commitBtn.top-self.titleLabel.bottom-10) collectionViewLayout:layout];
|
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.titleLabel.bottom+10, self.bgView.width, self.commitBtn.top-self.titleLabel.bottom-20) collectionViewLayout:layout];
|
||||||
[self.collectionView registerClass:[QXSelectAuctionInfoCell class] forCellWithReuseIdentifier:@"QXSelectAuctionInfoCell"];
|
[self.collectionView registerClass:[QXSelectAuctionInfoCell class] forCellWithReuseIdentifier:@"QXSelectAuctionInfoCell"];
|
||||||
self.collectionView.delegate = self;
|
self.collectionView.delegate = self;
|
||||||
self.collectionView.dataSource = self;
|
self.collectionView.dataSource = self;
|
||||||
@@ -100,8 +100,8 @@
|
|||||||
showToast(@"请选择您要展示的才艺");
|
showToast(@"请选择您要展示的才艺");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[QXRoomMessageManager shared] sendChatMessage:[NSString stringWithFormat:@"选择的才艺是 %@",self.selectedModel.name] messageType:(QXRoomMessageTypeText) needInsertMessage:YES];
|
[[QXRoomMessageManager shared] sendChatMessage:[NSString stringWithFormat:@"选择的才艺是 %@",self.selectedModel.name] messageType:(QXRoomMessageTypeText) needInsertMessage:YES];
|
||||||
|
[self hide];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)getPlayList{
|
-(void)getPlayList{
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 签约结束
|
/// 签约结束
|
||||||
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value;
|
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value;
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId;
|
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId sign_coin_list:(NSArray*)sign_coin_list;
|
||||||
/// 签约发生延时
|
/// 签约发生延时
|
||||||
-(void)signTimeDelayWithEndTime:(NSString*)endTime;
|
-(void)signTimeDelayWithEndTime:(NSString*)endTime;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#import "QXMineNetwork.h"
|
#import "QXMineNetwork.h"
|
||||||
#import "QXCustomAlertView.h"
|
#import "QXCustomAlertView.h"
|
||||||
#import "QXRechargeView.h"
|
#import "QXRechargeView.h"
|
||||||
|
#import "QXSignAlertView.h"
|
||||||
|
|
||||||
@interface QXRoomSeatTypeSignView()<QXRoomSeatDelegate,QXSignCoinListViewDelegate>
|
@interface QXRoomSeatTypeSignView()<QXRoomSeatDelegate,QXSignCoinListViewDelegate>
|
||||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||||
@@ -95,7 +96,7 @@
|
|||||||
[self.compereView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.compereView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.top.equalTo(self.bgImageView).offset(5);
|
make.top.equalTo(self.bgImageView).offset(5);
|
||||||
make.width.mas_equalTo(ScaleWidth(45));
|
make.width.mas_equalTo(ScaleWidth(45));
|
||||||
make.height.mas_equalTo(ScaleWidth(45-10)+30);
|
make.height.mas_equalTo(ScaleWidth(45-10)+51);
|
||||||
make.left.equalTo(self.bgImageView).offset(5);
|
make.left.equalTo(self.bgImageView).offset(5);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@@ -287,7 +288,7 @@
|
|||||||
make.left.equalTo(self.bgImageView).offset(22);
|
make.left.equalTo(self.bgImageView).offset(22);
|
||||||
make.width.mas_equalTo(ScaleWidth(84));
|
make.width.mas_equalTo(ScaleWidth(84));
|
||||||
make.height.mas_equalTo(ScaleWidth(94));
|
make.height.mas_equalTo(ScaleWidth(94));
|
||||||
make.top.mas_equalTo(ScaleWidth(78)+10);
|
make.top.mas_equalTo(ScaleWidth(78)+20);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
self.priceTitleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_title_image"]];
|
self.priceTitleImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_sign_title_image"]];
|
||||||
@@ -747,6 +748,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
-(void)signDidStartWithEndTime:(NSString *)endTime signId:(NSString *)signId signDay:(NSString*)signDay signValue:(NSString*)signValue{
|
-(void)signDidStartWithEndTime:(NSString *)endTime signId:(NSString *)signId signDay:(NSString*)signDay signValue:(NSString*)signValue{
|
||||||
|
QXSignAlertView *startView = [[QXSignAlertView alloc] initWithType:(QXSignAlerTypeStart)];
|
||||||
|
[startView showInView:self.viewController.view];
|
||||||
self.roomModel.sign_info.sign_id = signId;
|
self.roomModel.sign_info.sign_id = signId;
|
||||||
self.roomModel.sign_info.sign_status = @"1";
|
self.roomModel.sign_info.sign_status = @"1";
|
||||||
self.roomModel.sign_info.end_time = endTime;
|
self.roomModel.sign_info.end_time = endTime;
|
||||||
@@ -759,6 +762,13 @@
|
|||||||
}
|
}
|
||||||
/// 签约结束
|
/// 签约结束
|
||||||
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value{
|
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value{
|
||||||
|
if (userInfo1 && userInfo2) {
|
||||||
|
QXSignAlertView *startView = [[QXSignAlertView alloc] initWithType:(QXSignAlerTypeSuccess)];
|
||||||
|
[startView showInView:self.viewController.view];
|
||||||
|
}else{
|
||||||
|
QXSignAlertView *startView = [[QXSignAlertView alloc] initWithType:(QXSignAlerTypeFail)];
|
||||||
|
[startView showInView:self.viewController.view];
|
||||||
|
}
|
||||||
self.roomModel.sign_info.sign_id = @"";
|
self.roomModel.sign_info.sign_id = @"";
|
||||||
self.roomModel.sign_info.sign_status = @"0";
|
self.roomModel.sign_info.sign_status = @"0";
|
||||||
[self configStatus];
|
[self configStatus];
|
||||||
@@ -768,14 +778,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId{
|
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId sign_coin_list:(NSArray*)sign_coin_list{
|
||||||
if (![self.roomModel.sign_info.sign_id isEqualToString:signId]) {
|
if (![self.roomModel.sign_info.sign_id isEqualToString:signId]) {
|
||||||
showToast(@"场次错误");
|
showToast(@"场次错误");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.priceLabel.text = sign_value;
|
self.priceLabel.text = sign_value;
|
||||||
if (_coinView) {
|
if (_coinView) {
|
||||||
[_coinView refreshCoinList];
|
[_coinView refreshCoinListWith:sign_coin_list];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// 签约发生延时
|
/// 签约发生延时
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ typedef NS_ENUM(NSInteger) {
|
|||||||
/// 签约结束
|
/// 签约结束
|
||||||
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value;
|
-(void)signDidEndWithUserInfo1:(QXUserHomeModel*)userInfo1 userInfo2:(QXUserHomeModel*)userInfo2 sign_value:(NSString*)sign_value;
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId;
|
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId sign_coin_list:(NSArray*)sign_coin_list;
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signTimeDelayWithEndTime:(NSString*)endTime;
|
-(void)signTimeDelayWithEndTime:(NSString*)endTime;
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -1224,9 +1224,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// 签约身价变化
|
/// 签约身价变化
|
||||||
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId{
|
-(void)signValueDidChangedWithSignUserInfo:(QXUserHomeModel*)signUserInfo sign_value:(NSString*)sign_value signId:(NSString*)signId sign_coin_list:(NSArray*)sign_coin_list{
|
||||||
if (_signView) {
|
if (_signView) {
|
||||||
[self.signView signValueDidChangedWithSignUserInfo:signUserInfo sign_value:sign_value signId:signId];
|
[self.signView signValueDidChangedWithSignUserInfo:signUserInfo sign_value:sign_value signId:signId sign_coin_list:sign_coin_list];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// 签约发生延时
|
/// 签约发生延时
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
-(void)setMessage:(NSString *)message{
|
-(void)setMessage:(NSString *)message{
|
||||||
_message = message;
|
_message = message;
|
||||||
CGFloat messageHeight = [message heightForFont:[UIFont systemFontOfSize:13] width:ScaleWidth(275)-1];
|
CGFloat messageHeight = [message heightForFont:[UIFont systemFontOfSize:13] width:ScaleWidth(275)-1-32];
|
||||||
CGFloat contentHeight = 16+24+13+42+12+14+messageHeight;
|
CGFloat contentHeight = 16+24+13+42+12+14+messageHeight;
|
||||||
if (contentHeight < 180) {
|
if (contentHeight < 180) {
|
||||||
contentHeight = 180;
|
contentHeight = 180;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
@property (nonatomic,weak)UIView* containerView;
|
@property (nonatomic,weak)UIView* containerView;
|
||||||
@property (nonatomic,assign)BOOL isPlaying;
|
@property (nonatomic,assign)BOOL isPlaying;
|
||||||
@property (nonatomic,assign)BOOL isClose;
|
@property (nonatomic,assign)BOOL isClose;
|
||||||
|
@property (nonatomic,assign)BOOL isBackgroud;
|
||||||
@end
|
@end
|
||||||
@implementation QXDrifNobilityJoinRoomView
|
@implementation QXDrifNobilityJoinRoomView
|
||||||
|
|
||||||
@@ -75,6 +76,9 @@
|
|||||||
if (self.isPlaying) {
|
if (self.isPlaying) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (self.isBackgroud) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
MJWeakSelf
|
MJWeakSelf
|
||||||
[QXDrifNobilityJoinRoomView shareView].isPlaying = YES;
|
[QXDrifNobilityJoinRoomView shareView].isPlaying = YES;
|
||||||
[QXDrifNobilityJoinRoomView shareView].model = [QXDrifNobilityJoinRoomView shareView].dataArray.firstObject;
|
[QXDrifNobilityJoinRoomView shareView].model = [QXDrifNobilityJoinRoomView shareView].dataArray.firstObject;
|
||||||
@@ -142,6 +146,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
-(void)dirfViewDidToBackground{
|
-(void)dirfViewDidToBackground{
|
||||||
|
self.isBackgroud = YES;
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[QXDrifNobilityJoinRoomView shareView].x = SCREEN_WIDTH;
|
[QXDrifNobilityJoinRoomView shareView].x = SCREEN_WIDTH;
|
||||||
[[QXDrifNobilityJoinRoomView shareView] removeFromSuperview];
|
[[QXDrifNobilityJoinRoomView shareView] removeFromSuperview];
|
||||||
@@ -151,6 +156,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
-(void)dirfViewBecomeToFront{
|
-(void)dirfViewBecomeToFront{
|
||||||
|
self.isBackgroud = NO;
|
||||||
if ([QXDrifNobilityJoinRoomView shareView].isPlaying == NO) {
|
if ([QXDrifNobilityJoinRoomView shareView].isPlaying == NO) {
|
||||||
[QXDrifNobilityJoinRoomView shareView].x = SCREEN_WIDTH;
|
[QXDrifNobilityJoinRoomView shareView].x = SCREEN_WIDTH;
|
||||||
[[QXDrifNobilityJoinRoomView shareView] removeFromSuperview];
|
[[QXDrifNobilityJoinRoomView shareView] removeFromSuperview];
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 39 KiB |