12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // MinePageVideoCell.m
- // KulexiuForTeacher
- //
- // Created by 王智 on 2022/4/2.
- //
- #import "MinePageVideoCell.h"
- @interface MinePageVideoCell ()
- @property (weak, nonatomic) IBOutlet UIImageView *coverImage;
- @property (weak, nonatomic) IBOutlet UILabel *courseTitle;
- @property (weak, nonatomic) IBOutlet UILabel *courseMessage;
- @property (weak, nonatomic) IBOutlet UILabel *courseCount;
- @property (weak, nonatomic) IBOutlet UILabel *descLabel;
- @property (weak, nonatomic) IBOutlet UILabel *subjectLabel;
- @end
- @implementation MinePageVideoCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)configSourceModel:(VideoCourseModel *)model {
- [self.coverImage sd_setImageWithURL:[NSURL URLWithString:[model.lessonCoverUrl getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"video_placeholder"]];
- self.courseTitle.text = [NSString returnNoNullStringWithString:model.lessonName];
-
- if (model.lessonPrice > 0) {
- self.courseMessage.text = [NSString stringWithFormat:@"¥%.2f",model.lessonPrice];
- }
- else {
- self.courseMessage.text = @"免费";
- }
- self.courseCount.text = [NSString stringWithFormat:@"/%.0f课时",model.lessonCount];
- if (model.lessonPrice > 0) {
- self.descLabel.text = [NSString stringWithFormat:@"%.0f人已购买",model.countStudent];
- }
- else {
- self.descLabel.text = [NSString stringWithFormat:@"%.0f人已领取",model.countStudent];
- }
-
- self.subjectLabel.text = [NSString returnNoNullStringWithString:model.lessonSubjectName];
- }
- @end
|