| | |
| | | class ActivitySignupDetailVC: BaseVC { |
| | | |
| | | private var id:Int! |
| | | @IBOutlet weak var img_profile: UIImageView! |
| | | @IBOutlet weak var label_storeNames: UILabel! |
| | | @IBOutlet weak var view_banner: CommonBannerView! |
| | | // @IBOutlet weak var img_profile: UIImageView! |
| | | // @IBOutlet weak var label_storeNames: UILabel! |
| | | @IBOutlet weak var label_title: UILabel! |
| | | @IBOutlet weak var label_joinCondition: UILabel! |
| | | @IBOutlet weak var label_address: UILabel! |
| | |
| | | |
| | | guard let m = activityDetailModel else {return} |
| | | |
| | | img_profile.sd_setImage(with: URL(string: m.storeCoverDrawing)) |
| | | label_storeNames.text = m.storeInfos.map({$0.name}).joined(separator: ",") |
| | | btn_moreMatchStore.isHidden = (label_storeNames.text?.count ?? 0) < 50 |
| | | view_banner.setImages(images: m.imgs.components(separatedBy: ","), type: .URL) { index in |
| | | |
| | | } |
| | | |
| | | label_title.text = m.name |
| | | label_joinCondition.text = m.registerCondition.strTitle + "参与" |
| | | label_address.text = m.address |
| | |
| | | label_ageScope.text = m.age + "岁" |
| | | label_introducion.text = m.introduction |
| | | label_city.text = m.province + "|" + m.city |
| | | label_matchStore.text = m.storeInfos.map({$0.name}).joined(separator: ",") |
| | | btn_moreMatchStore.isHidden = (label_matchStore.text?.count ?? 0) < 50 |
| | | |
| | | img_enrollRequired.sd_setImage(with: URL(string: m.registrationNotes)) {[weak self] image, error, type, url in |
| | | guard let img = image else { |
| | |
| | | self?.cons_imgEnrollHei.constant = JQ_ScreenW / radio |
| | | } |
| | | |
| | | if m.cashPrice != 0 { |
| | | label_money.text = String(format: "%@/人", m.cashPrice.currency()) |
| | | label_totalMoney.text = String(format: "合计:%@", (m.cashPrice * Double(m.participant.count)).currency()) |
| | | } |
| | | |
| | | if m.playPaiCoin != 0{ |
| | | label_money.text = String(format: "%ld币/人", m.playPaiCoin) |
| | | label_totalMoney.text = String(format: "合计:%ld币", (m.playPaiCoin * m.participant.count)) |
| | | } |
| | | |
| | | if m.classPrice != 0{ |
| | | label_money.text = String(format: "%ld课时/人", m.classPrice) |
| | | label_totalMoney.text = String(format: "合计:%ld课时", (m.classPrice * m.participant.count)) |
| | | } |
| | | switch m.payType { |
| | | case .wechat,.aliPay: |
| | | label_money.text = String(format: "%@/人", m.cashPrice.currency()) |
| | | label_totalMoney.text = String(format: "合计:%@", (m.cashPrice * Double(m.participant.count)).currency()) |
| | | case .coin: |
| | | label_money.text = String(format: "%ld币/人", m.playPaiCoin) |
| | | label_totalMoney.text = String(format: "合计:%ld币", (m.playPaiCoin * m.participant.count)) |
| | | case .courseNum: |
| | | label_money.text = String(format: "%ld课时/人", m.classPrice) |
| | | label_totalMoney.text = String(format: "合计:%ld课时", (m.classPrice * m.participant.count)) |
| | | default: |
| | | label_money.text = "未知" |
| | | label_totalMoney.text = "未知" |
| | | } |
| | | |
| | | cons_tableHei.constant = Double(m.participant.count) * 100 |
| | | tableView.reloadData() |