杨锴
2024-12-27 fe02f75ab7a593f33d60c15308ddf7a974962db4
XQMuse/Root/Home/TCell/Home_Style_1_TCell.swift
@@ -10,27 +10,8 @@
class Home_Style_1_TCell: UITableViewCell {
            var model:ToDayMeditationModel?{
                        didSet{
                                    if let m = model{
                if m.id == 0{
                    img_cover.image = UIImage(named: "bt_private")
                    view_data.isHidden = true
                }else{
                    view_data.isHidden = false
                    img_cover.sd_setImage(with: URL(string: m.imageUrl.jq_urlEncoded()))
                    let turple = Date.jq_formateToTime_tuple(m.time)
                   let minute = (turple.hour * 60 + turple.minute)
                    let second = turple.second
                    label_title.text = "\(m.clientMeditationVO!.meditationTitle) | \(String(format: "%.2ld:%.2ld", minute,second))"
                    label_joinNum.text = "\(m.clientMeditationVO!.realLearnedNum + m.clientMeditationVO!.virtualLearnedNum)人已参加学习"
                }
                                    }
                        }
            }
            private var model:ToDayMeditationModel?
            @IBOutlet weak var img_cover: UIImageView!
            @IBOutlet weak var label_title: UILabel!
            @IBOutlet weak var label_joinNum: UILabel!
@@ -42,6 +23,23 @@
                        selectionStyle = .none
    }
    func setTodayMeditationModel(_ model:ToDayMeditationModel){
        if model.id == 0{
            img_cover.image = UIImage(named: "bt_private")
            view_data.isHidden = true
        }else{
            view_data.isHidden = false
            img_cover.sd_setImage(with: URL(string: model.imageUrl.jq_urlEncoded()))
            let turple = Date.jq_formateToTime_tuple(model.time)
            let minute = (turple.hour * 60 + turple.minute)
            let second = turple.second
            label_title.text = "\(model.clientMeditationVO!.meditationTitle) | \(String(format: "%.2ld:%.2ld", minute,second))"
            label_joinNum.text = "\(model.clientMeditationVO!.realLearnedNum + model.clientMeditationVO!.virtualLearnedNum)人已参加学习"
        }
    }
    func setplaying(){
        if model?.meditationId == AudioPlayer.getSharedInstance().meditationModel?.id{