个人信息增加所属公会,更换跟随和私信图标

This commit is contained in:
启星
2025-08-18 11:22:10 +08:00
parent 9a6659045d
commit affed1af58
5 changed files with 34 additions and 11 deletions

View File

@@ -54,7 +54,7 @@
self.sexImageView.image = sexImage; self.sexImageView.image = sexImage;
// self.focusBtn.selected = model.is_follow; // self.focusBtn.selected = model.is_follow;
//// self.focusBtn.backgroundColor = model.is_follow ? HEXCOLOR(0x383841) : mainDeepColor; //// self.focusBtn.backgroundColor = model.is_follow ? HEXCOLOR(0x383841) : mainDeepColor;
// //
// self.focusBtn.hidden = [BJUserManager.userInfo.uid integerValue] == [model.uid integerValue]; // self.focusBtn.hidden = [BJUserManager.userInfo.uid integerValue] == [model.uid integerValue];
NSString *topic = @""; NSString *topic = @"";
for (QXTopicModel *md in model.title) { for (QXTopicModel *md in model.title) {
@@ -398,10 +398,11 @@
} }
-(void)setBtnTypeWithIsFollow:(BOOL)isFollow{ -(void)setBtnTypeWithIsFollow:(BOOL)isFollow{
[self.focusBtn setTitle:isFollow?QXText(@"跟随"):QXText(@"私信") forState:(UIControlStateNormal)]; // [self.focusBtn setTitle:isFollow?QXText(@"跟随"):QXText(@"私信") forState:(UIControlStateNormal)];
[self.focusBtn setTitleColor:UIColor.whiteColor forState:(UIControlStateNormal)]; [self.focusBtn setBackgroundImage:[UIImage imageNamed:isFollow?@"room_user_follow":@"expansion_call"] forState:(UIControlStateNormal)];
self.focusBtn.backgroundColor = RGB16(0x333333); // [self.focusBtn setTitleColor:UIColor.whiteColor forState:(UIControlStateNormal)];
self.focusBtn.titleLabel.font = [UIFont systemFontOfSize:14]; // self.focusBtn.backgroundColor = RGB16(0x333333);
// self.focusBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[self.focusBtn addRoundedCornersWithRadius:12.5]; [self.focusBtn addRoundedCornersWithRadius:12.5];
} }
-(QXSendGiftView *)sendView{ -(QXSendGiftView *)sendView{

View File

@@ -134,7 +134,7 @@
return self.headerView; return self.headerView;
} }
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView { - (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
return 215; return 215+26;
} }
- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView { - (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
@@ -178,7 +178,7 @@
} }
-(QXUserHomeHeaderView *)headerView{ -(QXUserHomeHeaderView *)headerView{
if (!_headerView) { if (!_headerView) {
_headerView = [[QXUserHomeHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 215)]; _headerView = [[QXUserHomeHeaderView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 215+26)];
} }
return _headerView; return _headerView;
} }

View File

@@ -92,6 +92,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 打赏价值 /// 打赏价值
@property (nonatomic,strong)NSString *total_price; @property (nonatomic,strong)NSString *total_price;
/// 公会
@property (nonatomic,strong)NSString *guild;
/// 是否使用靓号 0未使用 1 已使用 /// 是否使用靓号 0未使用 1 已使用
@property (nonatomic,strong)NSString *is_use_code; @property (nonatomic,strong)NSString *is_use_code;
@end @end

View File

@@ -20,6 +20,7 @@
@property (nonatomic,strong) UILabel * nameLabel; @property (nonatomic,strong) UILabel * nameLabel;
@property (nonatomic,strong) UILabel * idLabel; @property (nonatomic,strong) UILabel * idLabel;
@property (nonatomic,strong) UILabel * ageLabel; @property (nonatomic,strong) UILabel * ageLabel;
@property (nonatomic,strong) UILabel * guildLabel;
@property (nonatomic,strong) UICollectionView * collectionView; @property (nonatomic,strong) UICollectionView * collectionView;
@property (nonatomic,strong) NSMutableArray * tagArray; @property (nonatomic,strong) NSMutableArray * tagArray;
@property (nonatomic,strong) UILabel *introduceLabel; @property (nonatomic,strong) UILabel *introduceLabel;
@@ -119,6 +120,18 @@
}]; }];
self.guildLabel = [[UILabel alloc] init];
self.guildLabel.textColor = RGB16(0x999999);
self.guildLabel.text = @"所属公会";
self.guildLabel.font = [UIFont boldSystemFontOfSize:12];
[self addSubview:self.guildLabel];
[self.guildLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.headerView);
make.height.mas_equalTo(18);
make.top.equalTo(self.ageLabel.mas_bottom).offset(8);
make.width.mas_greaterThanOrEqualTo(35);
}];
self.introduceLabel = [[UILabel alloc] init]; self.introduceLabel = [[UILabel alloc] init];
self.introduceLabel.textColor = QXConfig.textColor; self.introduceLabel.textColor = QXConfig.textColor;
self.introduceLabel.font = [UIFont systemFontOfSize:14]; self.introduceLabel.font = [UIFont systemFontOfSize:14];
@@ -126,7 +139,7 @@
[self addSubview:self.introduceLabel]; [self addSubview:self.introduceLabel];
[self.introduceLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.introduceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.headerView); make.left.equalTo(self.headerView);
make.top.equalTo(self.ageLabel.mas_bottom).offset(4); make.top.equalTo(self.guildLabel.mas_bottom).offset(4);
make.width.mas_equalTo(SCREEN_WIDTH-64); make.width.mas_equalTo(SCREEN_WIDTH-64);
make.height.mas_greaterThanOrEqualTo(22); make.height.mas_greaterThanOrEqualTo(22);
}]; }];
@@ -266,12 +279,18 @@
self.playBtn.hidden = NO; self.playBtn.hidden = NO;
self.followBtn.selected = model.is_follow==0?NO:YES; self.followBtn.selected = model.is_follow==0?NO:YES;
if (model.room_id.intValue > 0) { if (model.room_id.intValue > 0) {
[self.playBtn setTitle:QXText(@"跟随") forState:(UIControlStateNormal)]; // [self.playBtn setTitle:QXText(@"跟随") forState:(UIControlStateNormal)];
[self.playBtn setBackgroundImage:[UIImage imageNamed:@"room_user_follow"] forState:(UIControlStateNormal)];
}else{ }else{
[self.playBtn setTitle:QXText(@"私信") forState:(UIControlStateNormal)]; // [self.playBtn setTitle:QXText(@"私信") forState:(UIControlStateNormal)];
[self.playBtn setBackgroundImage:[UIImage imageNamed:@"expansion_call"] forState:(UIControlStateNormal)];
} }
} }
if ([model.guild isExist]) {
self.guildLabel.text = [NSString stringWithFormat:@"所属公会:%@",model.guild];
}else{
self.guildLabel.text = [NSString stringWithFormat:@"所属公会:%@",@"无"];
}
if (model.is_use_code.intValue == 1) { if (model.is_use_code.intValue == 1) {
self.useCodeImageView.hidden = NO; self.useCodeImageView.hidden = NO;
}else{ }else{