| | |
| | | @IBOutlet weak var label_datetime: UILabel! |
| | | @IBOutlet weak var img_intro: UIImageView! |
| | | @IBOutlet weak var cons_imgIntroHei: NSLayoutConstraint! |
| | | |
| | | // @IBOutlet weak var img_intro2: UIImageView! |
| | | // @IBOutlet weak var cons_imgIntro2Hei: NSLayoutConstraint! |
| | | |
| | | @IBOutlet weak var label_price: UILabel! |
| | | @IBOutlet weak var label_originPrice: UILabel! |
| | | @IBOutlet weak var label_coin: UILabel! |
| | |
| | | guard let weakSelf = self else { return } |
| | | if let model = data.data{ |
| | | weakSelf.weeklyItemDetailModel = model |
| | | // weakSelf.img_cover.sd_setImage(with: URL(string: model.detailDrawing)) |
| | | weakSelf.label_name.text = model.coursePackageName |
| | | weakSelf.label_address.text = model.storeNameAddr |
| | | weakSelf.label_courseNum.text = "\(model.classHours)课时" |
| | |
| | | weakSelf.label_coin.isHidden = model.wanpaiGold == 0 |
| | | weakSelf.label_originPrice.isHidden = model.costPrice == 0 |
| | | |
| | | if model.discountPrice > 0{ |
| | | weakSelf.label_price.text = model.discountPrice.currency() |
| | | weakSelf.label_originPrice.attributedText = AttributedStringbuilder.build().add(string: model.costPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")) |
| | | .delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString |
| | | }else{ |
| | | weakSelf.label_price.text = model.costPrice.currency() |
| | | } |
| | | |
| | | weakSelf.label_vip.attributedText = AttributedStringbuilder.build().add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: model.vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString |
| | | |
| | | weakSelf.label_coin.attributedText = AttributedStringbuilder.build().add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: "\(model.wanpaiGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString |
| | | // if model.discountPrice > 0{ |
| | | // weakSelf.label_price.text = model.discountPrice.currency() |
| | | // weakSelf.label_originPrice.attributedText = AttributedStringbuilder.build().add(string: model.costPrice.currency(), withFont: UIFont.systemFont(ofSize: 16, weight: .semibold), withColor: UIColor(hexStr: "#C6C6C6")) |
| | | // .delLine(color: UIColor(hexStr: "#C6C6C6")).mutableAttributedString |
| | | // }else{ |
| | | // weakSelf.label_price.text = model.costPrice.currency() |
| | | // } |
| | | // |
| | | // weakSelf.label_vip.attributedText = AttributedStringbuilder.build().add(string: "会员价:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: model.vipPrice.currency(), withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString |
| | | // |
| | | // weakSelf.label_coin.attributedText = AttributedStringbuilder.build().add(string: "玩湃币:", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#3F3F3F")).add(string: "\(model.wanpaiGold)币", withFont: UIFont.systemFont(ofSize: 14, weight: .semibold), withColor: UIColor(hexStr: "#F21313")).mutableAttributedString |
| | | |
| | | weakSelf.img_intro.sd_setImage(with: URL(string: model.detailDrawing)) {[weak self] image, error, type, url in |
| | | if let img = image{ |