| | |
| | | |
| | | class CourseDetailVC: BaseVC { |
| | | |
| | | @IBOutlet weak var img_cover: UIImageView! |
| | | @IBOutlet weak var view_banner: CommonBannerView! |
| | | // @IBOutlet weak var img_cover: UIImageView! |
| | | @IBOutlet weak var label_title: UILabel! |
| | | @IBOutlet weak var label_local: UILabel! |
| | | @IBOutlet weak var label_distance: UILabel! |
| | |
| | | didSet{ |
| | | |
| | | if let m = detailModel{ |
| | | img_cover.sd_setImage(with: URL(string: m.detailDrawing)) |
| | | label_title.text = m.name |
| | | label_distance.text = String(format: "距离我%.2lfkm", m.distance) |
| | | label_local.text = String(format: "%@(%@)", m.storeName,m.storeAddress) |
| | |
| | | img_1.sd_setImage(with: URL(string: m.introduceDrawing)) { image, error, type, url in |
| | | let radio = image!.size.width / image!.size.height |
| | | self.cons_img1Height.constant = JQ_ScreenW / radio |
| | | |
| | | } |
| | | |
| | | // img_2.sd_setImage(with: URL(string: m.storeCoverDrawing)) { image, error, type, url in |
| | | // let radio = image!.size.width / image!.size.height |
| | | // self.cons_img2Height.constant = JQ_ScreenW / radio |
| | | // } |
| | | view_banner.setImages(images: m.detailDrawing.components(separatedBy: ","), type: .URL) { index in |
| | | |
| | | } |
| | | |
| | | label_price.text = m.list.first!.paymentPrice.currency() |
| | | if let subM = m.list.first { |
| | |
| | | let attribute = AttributedStringbuilder.build().add(string: originPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)).delLine(color: UIColor(hexStr: "#3F3F3F").withAlphaComponent(0.58)) |
| | | label_originPrice.attributedText = attribute.mutableAttributedString |
| | | } |
| | | |
| | | |
| | | //玩湃币 |
| | | if let paiCoin = subM.playPaiCoin{ |
| | |
| | | view_handle.isHidden = true |
| | | cons_handleHei.constant = 0 |
| | | } |
| | | |
| | | // if let m = signUpCourseModel{ |
| | | // label_originPrice.isHidden = true |
| | | //// label_vipPrice.isHidden = true |
| | | // |
| | | // let coinAttribute = AttributedStringbuilder.build() |
| | | // .add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")) |
| | | // .add(string: "\(m.wpGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")) |
| | | // label_coin.attributedText = coinAttribute.mutableAttributedString |
| | | // label_price.text = m.paymentPrice.currency() |
| | | // label_coin.alpha = m.wpGold == 0 ? 0:1 |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | if let m = detailModel{ |
| | | let vc = CourseDetailApplyVC(detailModel: m) |
| | | let vc = CourseDetailApplyVC(detailModel: m,isExtend: true) |
| | | push(vc: vc) |
| | | } |
| | | } |