无故事王国
2023-09-14 45aebcb160b7a68ad79ad703466e287513f2ae22
WanPai/Root/Course/VC/CourseInfoVC.swift
@@ -13,12 +13,6 @@
class CourseInfoVC: BaseVC {
//    private struct MentalInfo {
//        var img:UIImage!
//        var t1:String!
//        var t2:String!
//    }
    @IBOutlet weak var scrollView: CourseInfoScrollView!
    @IBOutlet weak var view_container: UIView!
    @IBOutlet weak var img_header: UIImageView!
@@ -101,6 +95,17 @@
        return pageVC
    }()
   private lazy var btn_dispatchCourse:UIButton = {
      let btn = UIButton(type: .custom)
      btn.setTitleColor(Def_ThemeColor, for: .normal)
      let attribute = AttributedStringbuilder.build().add(string: "未分配课时", withFont: UIFont.systemFont(ofSize: 14), withColor: Def_ThemeColor).underLine(color: Def_ThemeColor).mutableAttributedString
      btn.setAttributedTitle(attribute, for: .normal)
      return btn
   }()
    override func viewDidLoad() {
        super.viewDidLoad()
@@ -116,11 +121,18 @@
            label_stu_BMI.attributedText = setAttribute(t1: "\(m.bmi)", t2: "正常")
            if m.courseList.count > 0{
                pageMenu.frame = CGRect(origin: .zero, size: CGSize(width: JQ_ScreenW, height: 25))
                pageMenu.frame = CGRect(origin: .zero, size: CGSize(width: JQ_ScreenW - 100, height: 25))
                pageMenu.delegate = self
                view_menu.addSubview(pageMenu)
                cons_menuHeight.constant = 25
                pageMenu.setItems(m.courseList.map({$0.courseName}), selectedItemIndex: 0)
            }
         view_menu.addSubview(btn_dispatchCourse)
         btn_dispatchCourse.snp.makeConstraints { make in
            make.right.equalTo(-19)
            make.centerY.equalToSuperview()
            make.height.equalTo(25)
            }
            exerciseCollectionView.reloadData()
@@ -160,7 +172,7 @@
        scrollView.contentInsetAdjustmentBehavior = .never
        let attribute = AttributedStringbuilder()
        attribute.add(string: "预约记录", withFont: UIFont.systemFont(ofSize: 14), withColor: Def_ThemeColor)
        attribute.add(string: "上课记录", withFont: UIFont.systemFont(ofSize: 14), withColor: Def_ThemeColor)
        attribute.underLine(color: Def_ThemeColor)
        btn_record.titleLabel?.attributedText = attribute.mutableAttributedString
@@ -194,7 +206,6 @@
        exerciseCollectionView.dataSource = self
        exerciseCollectionView.tag = 1001
        exerciseCollectionView.register(UINib(nibName: "StudentVideoCCell", bundle: nil), forCellWithReuseIdentifier: "_StudentVideoCCell")
        navigationItem.leftBarButtonItem = UIBarButtonItem(customView: leftBtn)