| | |
| | | self.btn.imageView?.contentMode = .scaleAspectFit |
| | | self.btn.titleLabel?.font = UIFont.systemFont(ofSize: 15, weight: .medium) |
| | | self.webView.loadHTMLString(data.content.jq_wrapHtml(), baseURL: nil) |
| | | |
| | | self.btn.isHidden = data.turnId == 0 |
| | | self.model = data |
| | | } |
| | | }).disposed(by: disposeBag) |
| | | view.backgroundColor = .white |
| | | |
| | | } |
| | | |
| | |
| | | webView = WKWebView(frame: .zero) |
| | | view.addSubview(webView) |
| | | webView.snp.makeConstraints { make in |
| | | make.edges.equalToSuperview() |
| | | make.edges.equalToSuperview().inset(UIEdgeInsets(top: 0, left: 0, bottom: 75, right: 0)) |
| | | } |
| | | |
| | | btn = UIButton(type: .custom) |
| | | btn.backgroundColor = Def_ThemeColor |
| | | btn.addTarget(self, action: #selector(jumpAction), for: .touchUpInside) |
| | | btn.setTitle("查看详情", for: .normal) |
| | | btn.setTitleColor(.white, for: .normal) |
| | | btn.cornerRadius = 20 |
| | | view.addSubview(btn) |