修改提交

This commit is contained in:
启星
2025-12-04 23:35:49 +08:00
parent 1c5a908dda
commit 57975eafc1
38 changed files with 216 additions and 112 deletions

View File

@@ -233,6 +233,7 @@
cell.cellType = QXBlackListCellTypeRank;
cell.backgroundColor = [UIColor clearColor];
cell.titleLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row+4];
cell.isNoIcon = YES;
cell.rankModel = self.dataArray[indexPath.row];
return cell;
}
@@ -318,36 +319,37 @@
self.nameLabel.text = md.nickname?md.nickname:@"";
[self.iconBgView removeAllSubviews];
[self.rankBtn setTitle:[NSString stringWithFormat:@" %@",md.total?md.total:md.gift_prices] forState:(UIControlStateNormal)];
CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6;
for (int i = 0 ; i < md.icon.count; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init];
[iconImageView sd_setImageWithURL:[NSURL URLWithString:md.icon[i]]];
[self.iconBgView addSubview:iconImageView];
if (md.icon.count == 1) {
[iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(iconWidth);
make.height.mas_equalTo(iconHeight);
make.centerY.centerX.equalTo(self.iconBgView);
}];
}else if(md.icon.count == 2){
[iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(iconWidth);
make.height.mas_equalTo(iconHeight);
make.centerY.equalTo(self.iconBgView);
make.centerX.equalTo(self.iconBgView).offset(-UserIconWidth/2+(margin+iconWidth)*i);
}];
}else{
[iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(i*(iconWidth+margin));
make.width.mas_equalTo(iconWidth);
make.height.mas_equalTo(iconHeight);
make.centerY.equalTo(self.iconBgView);
}];
}
}
// CGFloat iconWidth = UserIconWidth;
// CGFloat iconHeight = UserIconHeight;
// CGFloat margin = 6;
// for (int i = 0 ; i < md.icon.count; i++) {
// UIImageView *iconImageView = [[UIImageView alloc] init];
// [iconImageView sd_setImageWithURL:[NSURL URLWithString:md.icon[i]]];
// [self.iconBgView addSubview:iconImageView];
// if (md.icon.count == 1) {
// [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(iconWidth);
// make.height.mas_equalTo(iconHeight);
// make.centerY.centerX.equalTo(self.iconBgView);
// }];
// }else if(md.icon.count == 2){
// [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(iconWidth);
// make.height.mas_equalTo(iconHeight);
// make.centerY.equalTo(self.iconBgView);
// make.centerX.equalTo(self.iconBgView).offset(-UserIconWidth/2+(margin+iconWidth)*i);
// }];
// }else{
// [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.mas_equalTo(i*(iconWidth+margin));
// make.width.mas_equalTo(iconWidth);
// make.height.mas_equalTo(iconHeight);
// make.centerY.equalTo(self.iconBgView);
// }];
// }
//
// }
}
-(void)initSubviews{
self.headerImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"user_header_placehoulder"]];
@@ -404,6 +406,7 @@
}];
self.iconBgView = [[UIView alloc] init];
self.iconBgView.hidden = YES;
[self addSubview:self.iconBgView];
[self.iconBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self);
@@ -419,7 +422,7 @@
[self addSubview:self.rankBtn];
[self.rankBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self);
make.top.equalTo(self.iconBgView.mas_bottom);
make.top.equalTo(self.nameLabel.mas_bottom).offset(5);
make.height.mas_equalTo(16);
}];