younger_times
2023-07-26 3e3bfd1ad307ec2ea42f66e298ccb24cec26955f
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)
    }