| | |
| | | import UIKit |
| | | import WebKit |
| | | import RxRelay |
| | | import JQTools |
| | | |
| | | class MarketContentViewModel{ |
| | | //购买数量 |
| | |
| | | @IBOutlet weak var label_costCoin: UILabel! |
| | | @IBOutlet weak var cons_footHei: NSLayoutConstraint! |
| | | @IBOutlet weak var webViewHeiCons: NSLayoutConstraint! |
| | | @IBOutlet weak var label_originPrice: UILabel! |
| | | |
| | | private var viewModel = MarketContentViewModel() |
| | | |
| | |
| | | self?.label_info.text = info_Array.joined(separator: "|") |
| | | self?.webView.loadHTMLString(m.good?.detail.jq_wrapHtml() ?? "", baseURL: nil) |
| | | self?.viewModel.detailModel.accept(m) |
| | | |
| | | self?.label_originPrice.isHidden = m.good!.price <= 0 |
| | | |
| | | if !(self?.label_originPrice.isHidden ?? false){ |
| | | self?.label_originPrice.attributedText = AttributedStringbuilder.build().add(string: "¥\(m.good!.price)", withFont: UIFont.init(name: "Impact", size: 14) ?? .systemFont(ofSize: 14, weight: .medium), withColor: UIColor(hexString: "#9A9A9A")!).delLine(color: UIColor(hexString: "#9A9A9A")!).mutableAttributedString |
| | | } |
| | | } |
| | | |
| | | }).disposed(by: disposeBag) |