无故事王国
2023-10-25 5c244d5766b17c33da14b134fb6d20556a4c2d1d
WanPai/Root/Course/VC/CourseDetailApplyVC.swift
@@ -54,16 +54,17 @@
        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
@@ -84,13 +85,13 @@
            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
@@ -99,6 +100,8 @@
      }else{
         btn_handleBtn.setTitle("立即报名", for: .normal)
      }
      viewDidLayoutSubviews()
    }
    
    override func setUI() {
@@ -333,11 +336,10 @@
            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 {