// // QualificationsViewController.swift // xingchuangke // // Created by Virgil on 2019/4/22. // Copyright © 2019 Virgil. All rights reserved. // import UIKit class QualificationsViewController: BaseViewController { var wkWebView: WKWebView! @IBOutlet weak var viewMenu: UIView! override func viewDidLoad() { super.viewDidLoad() self.title = "荣誉认证" initNavLeftBackButton() let segment = Virgil_SegmentView(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: 47), titles: ["产品资质", "星创客资质", "我的授权"], defaultColor: CommonUntils.getUIColorFromRGB(rgbValue: 0x333333, alpha: 1.0), currentColor: CommonUntils.getUIColorFromRGB(rgbValue: 0x2094F5, alpha: 1.0), lineHeight: 2, lineIsBottom: true) {[weak self] (index) in if index == 0 { self!.wkWebView.loadDataForUrl(url: "\(RequestURL.sysConfigWeb)?type=product_exhibition") } else if index == 1 { self!.wkWebView.loadDataForUrl(url: "http://img.xingchuangke.net//2beaafc460294a99be34472edb81234c") } else { self!.wkWebView.loadDataForUrl(url: "\(RequestURL.myZhengshu)?userId=\(CommonValue.getUserId())") } } self.viewMenu.addSubview(segment) let config = WKWebViewConfiguration.init() wkWebView = WKWebView.init(frame: CGRect.init(x: 0, y: 47, width: ScreenWidth, height: ScreenHeight - 47), configuration: config) self.view.addSubview(wkWebView) self.wkWebView.loadDataForUrl(url: "\(RequestURL.sysConfigWeb)?type=product_exhibition") } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) } override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { super.init(nibName: "QualificationsViewController", bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }