//
|
// 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)
|
// }
|
}
|