// // ApplyCardAgentViewController.swift // xingchuangke // // Created by Virgil on 2019/7/16. // Copyright © 2019 Virgil. All rights reserved. // import UIKit class ApplyCardAgentViewController: UIViewController { /// 0办卡 1:积分 var type = 0 var wkWebView: WKWebView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. let config = WKWebViewConfiguration.init() wkWebView = WKWebView.init(frame: self.view.bounds, configuration: config) self.view.addSubview(wkWebView) let name = type == 0 ? "card" : "jf" let htmlPath = "\(RequestURL.hostMainH5)daili_\(name).html?userLevel=\(CommonValue.getUserLevel())&userId=\(CommonValue.getUserId())" //&userId=\(CommonValue.getUserId()) wkWebView.loadDataForUrl(url: htmlPath) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.tabBarController?.title = self.title } override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { super.init(nibName: "ApplyCardAgentViewController", bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }