| | |
| | | super.viewDidLoad() |
| | | title = "课程详情" |
| | | |
| | | if let m = detailModel{ |
| | | if let m = detailModel{ |
| | | |
| | | view_banner.setImages(images: m.detailDrawing.components(separatedBy: ","), type: .URL) { index in |
| | | |
| | | } |
| | | |
| | | label_title.text = m.name |
| | | label_listenWeek.text = "每" + m.weeks.joined(separator: "、") |
| | | label_title.text = m.name |
| | | label_listenWeek.text = "每" + m.weeks.joined(separator: "、") |
| | | label_listenTime.text = m.times.joined(separator: "|") |
| | | label_store.text = m.storeName |
| | | label_address.text = m.storeAddress |
| | | label_store.text = m.storeName |
| | | label_address.text = m.storeAddress |
| | | label_vaild.text = m.time |
| | | label_courseType.text = m.type.strTitle |
| | | |
| | |
| | | studentModels.append(m.student!) |
| | | } |
| | | |
| | | cons_collHei.constant = ceil(Double(m.list.count) / 3.0) * CellH + floor(Double(m.list.count) / 3.0) * 21.0 |
| | | collectionView.reloadData() |
| | | cons_collHei.constant = ceil(Double(m.list.count) / 3.0) * CellH + floor(Double(m.list.count) / 3.0) * 21.0 |
| | | collectionView.reloadData() |
| | | |
| | | cons_tableHei.constant = CGFloat(studentModels.count * 87) |
| | | tableView.reloadData() |
| | | changePrice(selectClassIndex) |
| | | } |
| | | cons_tableHei.constant = CGFloat(studentModels.count * 87) |
| | | tableView.reloadData() |
| | | changePrice(selectClassIndex) |
| | | } |
| | | |
| | | |
| | | btn_addStudent.isHidden = isExtend |
| | |
| | | }else{ |
| | | btn_handleBtn.setTitle("立即报名", for: .normal) |
| | | } |
| | | |
| | | viewDidLayoutSubviews() |
| | | } |
| | | |
| | | override func setUI() { |
| | |
| | | |
| | | var price:Double? |
| | | switch subM.payType{ |
| | | case .cash: |
| | | case .cash,.cashCoin: |
| | | price = subM.originalPrice == 0 ? subM.vipPrice : subM.originalPrice |
| | | case .coin: |
| | | price = Double(subM.playPaiCoin) |
| | | case .cashCoin:break |
| | | } |
| | | |
| | | guard price != nil else { |