Showing
1 changed file
with
14 additions
and
6 deletions
| ... | @@ -117,13 +117,21 @@ import AVFoundation | ... | @@ -117,13 +117,21 @@ import AVFoundation |
| 117 | couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) | 117 | couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | - couponImage.contentMode = .scaleAspectFill | ||
| 121 | couponImageHeight.constant = 255 //230 // 253 // self.uiscreen.height * 0.25 | 120 | couponImageHeight.constant = 255 //230 // 253 // self.uiscreen.height * 0.25 |
| 122 | 121 | ||
| 123 | if (isMarket == true) { | 122 | if (isMarket == true) { |
| 124 | - nameLabel.text = coupon?.name ?? "" | 123 | + couponImage.contentMode = .scaleAspectFit |
| 125 | - discriptionLabel.text = coupon?.short_description ?? "" | 124 | + |
| 125 | +// nameLabel.text = coupon?.name ?? "" | ||
| 126 | +// discriptionLabel.text = coupon?.short_description ?? "" | ||
| 127 | + | ||
| 128 | + let htmlName = coupon?.inner_text ?? "" | ||
| 129 | + let htmlDiscription = coupon?.description ?? "" | ||
| 130 | + | ||
| 131 | + nameLabel.text = htmlName.htmlToString | ||
| 132 | + discriptionLabel.text = htmlDiscription.htmlToString | ||
| 126 | } else { | 133 | } else { |
| 134 | + couponImage.contentMode = .scaleAspectFill | ||
| 127 | nameLabel.text = couponSetData?.name ?? "" | 135 | nameLabel.text = couponSetData?.name ?? "" |
| 128 | discriptionLabel.text = couponSetData?.short_description ?? "" | 136 | discriptionLabel.text = couponSetData?.short_description ?? "" |
| 129 | } | 137 | } |
| ... | @@ -146,7 +154,7 @@ import AVFoundation | ... | @@ -146,7 +154,7 @@ import AVFoundation |
| 146 | if (merchant._uuid == merchantUuid) { | 154 | if (merchant._uuid == merchantUuid) { |
| 147 | let htmlMerchDescrText = merchant._body | 155 | let htmlMerchDescrText = merchant._body |
| 148 | 156 | ||
| 149 | - if (htmlMerchDescrText != "") { | 157 | + if (isMarket != true && htmlMerchDescrText != "") { |
| 150 | merchantDescrTextView.attributedText = htmlMerchDescrText.htmlToAttributedString | 158 | merchantDescrTextView.attributedText = htmlMerchDescrText.htmlToAttributedString |
| 151 | merchantDescrTextView.font = UIFont(name: "PeridotPE-Regular", size: 16) | 159 | merchantDescrTextView.font = UIFont(name: "PeridotPE-Regular", size: 16) |
| 152 | merchantDescrTextView.textColor = UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00) | 160 | merchantDescrTextView.textColor = UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00) |
| ... | @@ -191,11 +199,11 @@ import AVFoundation | ... | @@ -191,11 +199,11 @@ import AVFoundation |
| 191 | couponCodeLabelHeight.constant = CGFloat(20) | 199 | couponCodeLabelHeight.constant = CGFloat(20) |
| 192 | couponCodeLabelTopSpace.constant = CGFloat(35) | 200 | couponCodeLabelTopSpace.constant = CGFloat(35) |
| 193 | 201 | ||
| 194 | - couponView.isHidden = true | 202 | + couponView.isHidden = false |
| 195 | couponViewHeight.constant = CGFloat(55) | 203 | couponViewHeight.constant = CGFloat(55) |
| 196 | couponViewTopSpace.constant = CGFloat(20) | 204 | couponViewTopSpace.constant = CGFloat(20) |
| 197 | 205 | ||
| 198 | - redeemButton.isHidden = true | 206 | + redeemButton.isHidden = false |
| 199 | redeemButtonHeight.constant = CGFloat(50) | 207 | redeemButtonHeight.constant = CGFloat(50) |
| 200 | // redeemButtonTopSpace.constant = CGFloat(20) | 208 | // redeemButtonTopSpace.constant = CGFloat(20) |
| 201 | } | 209 | } | ... | ... |
-
Please register or login to post a comment