Files
yuyin_ios/SweetParty/主类/RCMic/Room/新麦位PK/PKlistCell.m
2025-08-08 11:05:33 +08:00

71 lines
4.7 KiB
Objective-C
Executable File

//
// PKlistCell.m
// romantic
//
// Created by DLAN on 2023/2/13.
// Copyright © 2023 romantic. All rights reserved.
//
#import "PKlistCell.h"
#import "NSString+category.h"
#import "SPPKUserInfo.h"
@implementation PKlistCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
-(void)setModel:(SPPKRecordListModel *)model{
_model = model;
self.timeLab.text = [NSString getDateStringWithTimeInterval:model.add_time*1000];
self.buleValue.text = [NSString stringWithFormat:@"%@:",model.uid_value];
self.redValue.text = model.receive_uid_value;
self.pkMessageLab.text = [NSString stringWithFormat:@"PK惩罚:%@",model.pk_theme];
if(model.left_user_list.count == 0){
}else if(model.left_user_list.count == 1){
[self.bulueIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}else if(model.left_user_list.count == 2){
[self.bulueIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.bulueIcon2 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[1][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}else if(model.left_user_list.count == 3){
[self.bulueIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.bulueIcon2 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[1][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.bulueIcon3 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[2][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}else if(model.left_user_list.count == 4){
[self.bulueIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.bulueIcon2 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[1][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.bulueIcon3 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[2][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.bulueIcon4 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.left_user_list[3][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}
if(model.right_user_list.count == 0){
}else if(model.right_user_list.count == 1){
[self.redIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}else if(model.right_user_list.count == 2){
[self.redIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.redIcon2 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[1][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}else if(model.right_user_list.count == 3){
[self.redIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.redIcon2 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[1][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.redIcon3 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[2][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}else if(model.right_user_list.count == 4){
[self.redIcon1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[0][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.redIcon2 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[1][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.redIcon3 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[2][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
[self.redIcon4 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.right_user_list[3][@"head_pic"]]] placeholderImage:kDefaultUserIcon];
}
}
@end