// // HomeHotVideoCell.m // KulexiuForStudent // // Created by 王智 on 2022/8/29. // #import "HomeHotVideoCell.h" @interface HomeHotVideoCell () @property (weak, nonatomic) IBOutlet UIImageView *coverImage; @property (weak, nonatomic) IBOutlet UILabel *courseName; @property (weak, nonatomic) IBOutlet UILabel *teacherName; @property (weak, nonatomic) IBOutlet UILabel *countLabel; @property (weak, nonatomic) IBOutlet UILabel *subjectLabel; @end @implementation HomeHotVideoCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } - (void)configWithSource:(HomeVideoGroupModel *)source { [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[source.lessonCoverUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]]; self.courseName.text = [NSString returnNoNullStringWithString:source.videoGroupName]; if ([NSString isEmptyString:source.teacherName]) { self.teacherName.text = [NSString stringWithFormat:@"游客%@",source.teacherId]; } else { self.teacherName.text = [NSString stringWithFormat:@"%@",source.teacherName]; } self.countLabel.text = [NSString stringWithFormat:@"%zd人在学",source.buyCount]; self.subjectLabel.text = [NSString returnNoNullStringWithString:source.subjectName]; } @end