| | |
| | | @IBOutlet weak var webView: WKWebView! |
| | | @IBOutlet weak var cons_webHei: NSLayoutConstraint! |
| | | @IBOutlet weak var btn_moreStore: UIButton! |
| | | @IBOutlet weak var btn_enroll: UIButton! |
| | | |
| | | private var detailModel:WorldCupDetailModel? |
| | | |
| | |
| | | } |
| | | self?.bannerView.setItems(items: items) |
| | | |
| | | self?.btn_moreStore.isHidden = model.storeInfos.count > 1 |
| | | self?.btn_moreStore.isHidden = model.storeInfos.count == 1 |
| | | |
| | | self?.label_title.text = model.name |
| | | self?.label_hot.text = "\(model.heat)" |
| | |
| | | self?.label_city.text = "" |
| | | self?.label_address.text = model.address |
| | | self?.label_matchPoint.text = model.storeInfos.map({$0.name}).joined(separator: "、") |
| | | self?.label_pay_money.text = "¥\(model.cash)/人" |
| | | self?.label_pay_coin.text = "\(model.paiCoin)币/人" |
| | | self?.label_pay_course.text = "\(model.classHour)课时/人" |
| | | |
| | | if model.cash == 0{ |
| | | self?.label_pay_money.text = "免费" |
| | | }else{ |
| | | self?.label_pay_money.text = "¥\(model.cash)/人" |
| | | } |
| | | |
| | | if model.paiCoin == 0{ |
| | | self?.label_pay_coin.text = "免费" |
| | | }else{ |
| | | self?.label_pay_coin.text = "\(model.paiCoin)币/人" |
| | | } |
| | | |
| | | if model.classHour == 0{ |
| | | self?.label_pay_coin.text = "免费" |
| | | }else{ |
| | | self?.label_pay_course.text = "\(model.classHour)课时/人" |
| | | } |
| | | |
| | | self?.label_desc.text = model.intro |
| | | |
| | | self?.webView.loadHTMLString(model.content.jq_wrapHtml(), baseURL: nil) |
| | | |
| | | let endDateTimeInterval = Date.jq_StringToTimeInterval(model.registrationClosingTime, "yyyy-MM-dd HH:mm") |
| | | if endDateTimeInterval < Date().timeIntervalSince1970{ |
| | | self?.btn_enroll.setTitle("报名已截止", for: .normal) |
| | | self?.btn_enroll.backgroundColor = .gray.withAlphaComponent(0.5) |
| | | } |
| | | |
| | | self?.detailModel = model |
| | | } |
| | | }).disposed(by: disposeBag) |