fix
无故事王国
2024-06-20 0c89e362069e2f97d18a01a3a82835ef37a34d18
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
//
//  HomeListen_process_TCell.swift
//  DolphinEnglishLearnStudent
//
//  Created by 无故事王国 on 2024/5/23.
//
 
import UIKit
import JQTools
 
class HomeListen_process_TCell: UITableViewCell {
                @IBOutlet weak var label_currentWeek: UILabel!
                @IBOutlet weak var label_completeProgress: UILabel!
                @IBOutlet weak var label_info: UILabel!
                @IBOutlet weak var cons_progress: NSLayoutConstraint!
                
                var studyScheduleModel:StudyScheduleModel?{
                                didSet{
                                                if let m = studyScheduleModel{
//                                                                label_currentWeek.text = "当前周目:\(studyScheduleModel?.week.jq_cn ?? "")周目"
 
                                                                label_info.attributedText     = AttributedStringbuilder.build().add(string: "学习总时长:", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!)
                                                                                .add(string: "\(m.totalStudy)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!)
                                                                                .add(string: "|今日学习", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!)
                                                                                .add(string: "\(m.todayStudy)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!).mutableAttributedString
                                                                cons_progress.constant = ((JQ_ScreenW - 234 * 2 - 44) / 100) * Double(m.computeSchedule)
                                                                label_completeProgress.text = "已完成:\(m.computeSchedule)%"
                                                }
                                }
                }
 
    override func awakeFromNib() {
        super.awakeFromNib()
                                backgroundColor = .clear
                                selectionStyle = .none
 
                                label_info.attributedText     = AttributedStringbuilder.build().add(string: "学习总时长:", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!)
                                                .add(string: "\(0)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!)
                                                .add(string: "|今日学习", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!)
                                                .add(string: "\(0)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!).mutableAttributedString
    }
 
}