| | |
| | | |
| | | private var type:AgreentType! |
| | | private var content:String! |
| | | private var customTitle:String? |
| | | @IBOutlet weak var webView: WKWebView! |
| | | @IBOutlet weak var cons_webHeight: NSLayoutConstraint! |
| | | @IBOutlet weak var view_btns: UIView! |
| | | |
| | | init(type:AgreentType,content:String? = nil) { |
| | | init(type:AgreentType,customTitle:String? = nil,content:String? = nil) { |
| | | super.init(nibName: nil, bundle: nil) |
| | | self.type = type |
| | | self.content = content |
| | |
| | | |
| | | if type != .other{ |
| | | title = type.titleStr |
| | | |
| | | if customTitle != nil{ |
| | | title = customTitle |
| | | }else{ |
| | | title = type.titleStr |
| | | } |
| | | |
| | | Services.queryProtocol(type,progress: false).subscribe(onNext: {[weak self] result in |
| | | if let text = result.data?.jq_wrapHtml(){ |
| | | self?.webView.loadHTMLString(text, baseURL: nil) |