fix
无故事王国
2024-06-06 6f7f02d5c8880ff670b2c694fe61f5af5a6e3e36
DolphinEnglishLearnStudent/Moudle/Me/VC/StudyVC.swift
@@ -6,21 +6,35 @@
//
import UIKit
import JQTools
class StudyVC: BaseVC {
            @IBOutlet weak var label_currentProcess: UILabel!
            @IBOutlet weak var label_surplusProcess: UILabel!
            @IBOutlet weak var label_studyTotalTimes: UILabel!
            @IBOutlet weak var label_studyWeekTotalTimes: UILabel!
            @IBOutlet weak var view_menu: UIView!
            @IBOutlet weak var tableView: UITableView!
            
            private var gamesRecordModel:StudyGamesModel?{
                        didSet{
                                    self.tableView.reloadData()
                                    label_currentProcess.text = "当前进度:周目\(gamesRecordModel?.record?.week.jq_cn ?? "")"
                                    label_surplusProcess.text = "剩余进度:周目\(gamesRecordModel?.record?.surplus.jq_cn ?? "")"
                                    label_studyTotalTimes.attributedText = AttributedStringbuilder.build().add(string: "学习总时长:", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!).add(string: "\(gamesRecordModel?.record?.totalStudy ?? 0)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!).add(string: "|今日学习:", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!).add(string: "\(gamesRecordModel?.record?.todayStudy ?? 0)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!).mutableAttributedString
                                    label_studyWeekTotalTimes.attributedText = AttributedStringbuilder.build().add(string: "本周学习时长:", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!).add(string: "\(gamesRecordModel?.record?.weekStudy ?? 0)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!).add(string: "|本月学习时长:", withFont: .systemFont(ofSize: 16), withColor: UIColor(hexString: "#2B3648")!).add(string: "\(gamesRecordModel?.record?.monthStudy ?? 0)小时", withFont: .systemFont(ofSize: 16, weight: .medium), withColor: UIColor(hexString: "#2B3648")!).mutableAttributedString
                        }
            }
    override func viewDidLoad() {
        super.viewDidLoad()
                        Services.studyGamesRecord().subscribe(onNext: {result in
                                    if let m = result.data{
                                                self.gamesRecordModel = m
@@ -59,7 +73,6 @@
                        if let m = gamesRecordModel?.gameRecordList[indexPath.row]{
                                    cell.studyGamesRecordModel = m
                        }
                        return cell
            }