12345678910111213141516171819202122232425262728293031323334353637383940 |
- import UIKit
- class ApplyCardAgentViewController: UIViewController {
-
- var type = 0
- var wkWebView: WKWebView!
- override func viewDidLoad() {
- super.viewDidLoad()
-
- 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())"
- 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")
- }
- }
|