杨锴
2025-05-11 7453d2d0cef415b34323d1b91e6cfa4a6ba31178
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
//  CourseExerciseTCell.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/6/27.
//
 
import UIKit
import JQTools
 
class CourseExerciseTCell: UITableViewCell {
 
    var exerciseVideoModel:ExerciseVideoModel!{
        didSet{
            img_cover.sd_setImage(with: URL(string: exerciseVideoModel.coverImage))
            label_title.text = exerciseVideoModel.videoName
            label_course.text = "布置运动营:\(exerciseVideoModel.packageName)"
            label_info.text = exerciseVideoModel.synopsis
            label_obtainCoin.text = "\(exerciseVideoModel.integral)积分"
            if exerciseVideoModel.studyStatus == 2{
                label_status.text = "已学习"
                label_status.textColor = .white
                view_status.backgroundColor = UIColor(hexStr: "#ACACAC")
            }else{
                label_status.text = "未学习"
                label_status.textColor = Def_ThemeColor
                view_status.backgroundColor = UIColor(hexStr: "#FD9331").withAlphaComponent(0.29)
            }
        }
    }
 
    @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
        backgroundColor = .clear
        contentView.backgroundColor = .clear
 
    }
 
//    @IBAction func detailAction(_ sender: UIButton) {
//        let vc = CourseVideoDetailVC(model: exerciseVideoModel)
//        vc.title = "课后练习"
//        JQ_currentViewController().jq_push(vc: vc)
//    }
}