Files
yuyin_ios/SweetParty/主类/Rank/SPBangDanListCell.m
2025-08-08 11:05:33 +08:00

49 lines
1.7 KiB
Objective-C
Executable File

//
// SPBangDanListCell.m
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "SPBangDanListCell.h"
@implementation SPBangDanListCell
- (void)awakeFromNib {
[super awakeFromNib];
}
-(void)onUpdateSPBangDanListCell:(SPBangDanListModel *)model index:(NSInteger)index type:(NSInteger)type {
if (type == 1) {//贡献
[self.levelImgV sd_setImageWithURL:[NSURL URLWithString:model.contribution_image]];
[self.charmImgV sd_setImageWithURL:[NSURL URLWithString:model.charm_image]];
self.valueLab.text = model.rank_value;
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
self.nicknameLab.text = model.nick_name;
self.userIDLabel.text = model.uid;
}else if(type == 2) {//魅力
[self.levelImgV sd_setImageWithURL:[NSURL URLWithString:model.contribution_image]];
[self.charmImgV sd_setImageWithURL:[NSURL URLWithString:model.charm_image]];
self.valueLab.text = model.rank_value;
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
self.nicknameLab.text = model.nick_name;
self.userIDLabel.text = model.uid;
}else if(type == 3) {//房间
self.valueLab.text = model.total_amount;
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:kDefaultUserIcon];
self.nicknameLab.text = model.room_name;
// self.avatarImgV.layer.cornerRadius = 5;
self.userIDLabel.text = model.room_number;
}
self.orderLab.text = [NSString stringWithFormat:@"%02ld", index+4];
}
@end