| | |
| | | |
| | | 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! |
| | |
| | | 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() |
| | | |
| | |
| | | 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() |
| | |
| | | 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 |
| | | |
| | |
| | | exerciseCollectionView.dataSource = self |
| | | exerciseCollectionView.tag = 1001 |
| | | exerciseCollectionView.register(UINib(nibName: "StudentVideoCCell", bundle: nil), forCellWithReuseIdentifier: "_StudentVideoCCell") |
| | | |
| | | |
| | | navigationItem.leftBarButtonItem = UIBarButtonItem(customView: leftBtn) |
| | | |