| | |
| | | @IBOutlet weak var webView: WKWebView! |
| | | @IBOutlet weak var cons_webHei: NSLayoutConstraint! |
| | | @IBOutlet weak var cons__cancelBtnHei: NSLayoutConstraint! |
| | | @IBOutlet weak var btn_enroll: UIButton! |
| | | |
| | | private var id:Int! |
| | | private lazy var bannerView:CommonBannerView = { |
| | |
| | | self?.label_address.text = model.address |
| | | self?.label_city.text = "" |
| | | self?.label_matchStore.text = model.storeInfos.map({$0.name}).joined(separator: "、") |
| | | self?.btn_moreMatchStore.isHidden = model.storeInfos.count > 1 |
| | | self?.btn_moreMatchStore.isHidden = model.storeInfos.count == 1 |
| | | self?.tableView.reloadData() |
| | | self?.webView.loadHTMLString(model.content.jq_wrapHtml(), baseURL: nil) |
| | | self?.btn_cancel.isHidden = model.revocable == 0 |
| | | self?.cons__cancelBtnHei.constant = model.revocable == 0 ? 0:40 |
| | | |
| | | 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) |
| | | } |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | } |