From 3e3bfd1ad307ec2ea42f66e298ccb24cec26955f Mon Sep 17 00:00:00 2001 From: younger_times <841720330@qq.com> Date: 星期三, 26 七月 2023 18:13:33 +0800 Subject: [PATCH] 新增 --- WanPai/Root/Course/TCell/CourseExerciseTCell.swift | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/WanPai/Root/Course/TCell/CourseExerciseTCell.swift b/WanPai/Root/Course/TCell/CourseExerciseTCell.swift index 647ed36..8927276 100644 --- a/WanPai/Root/Course/TCell/CourseExerciseTCell.swift +++ b/WanPai/Root/Course/TCell/CourseExerciseTCell.swift @@ -10,13 +10,40 @@ class CourseExerciseTCell: UITableViewCell { + var exerciseVideoModel:ExerciseVideoModel!{ + didSet{ + img_cover.sd_setImage(with: URL(string: exerciseVideoModel.coverImage)) + label_title.text = exerciseVideoModel.packageName + label_course.text = "布置课程:\(exerciseVideoModel.videoName)" + label_info.text = exerciseVideoModel.synopsis + label_obtainCoin.text = "\(exerciseVideoModel.integral)积分" + if exerciseVideoModel.studyStatus == 1{ + label_status.text = "未学习" + label_status.textColor = Def_ThemeColor + view_status.backgroundColor = UIColor(hexStr: "#FD9331").withAlphaComponent(0.29) + }else{ + label_status.text = "已学习" + label_status.textColor = .white + view_status.backgroundColor = UIColor(hexStr: "#ACACAC") + } + } + } + + @IBOutlet weak var img_cover: UIImageView! + @IBOutlet weak var label_title: UILabel! + @IBOutlet weak var label_course: UILabel! + @IBOutlet weak var label_info: UILabel! + @IBOutlet weak var label_obtainCoin: UILabel! + @IBOutlet weak var label_status: UILabel! + @IBOutlet weak var view_status: UIView! + override func awakeFromNib() { super.awakeFromNib() selectionStyle = .none } @IBAction func detailAction(_ sender: UIButton) { - let vc = CourseVideoDetailVC(id: 0) + let vc = CourseVideoDetailVC(model: exerciseVideoModel) vc.title = "课后练习" JQ_currentViewController().jq_push(vc: vc) } -- Gitblit v1.7.1