12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // IntegralWebViewController.swift
- // xingchuangke
- //
- // Created by Virgil on 2019/5/5.
- // Copyright © 2019 Virgil. All rights reserved.
- //
- import UIKit
- class IntegralWebViewController: BaseViewController {
- var wkWebView: WKWebView!
- override func viewDidLoad() {
- super.viewDidLoad()
- self.title = "积分专区"
- initNavLeftBackButton()
- let config = WKWebViewConfiguration.init()
- wkWebView = WKWebView.init(frame: self.view.bounds, configuration: config)
- self.view.addSubview(wkWebView)
- let urlStr = "\(RequestURL.integralMain)#/?user_level=2&org_id=\(RequestURL.orgId)&user_no=\(CommonValue.getUserId())"
- wkWebView.load(URLRequest(url: URL(string: urlStr)!))
- initNavRightButtonForImage(imgName: "share_common")
- }
- override func btnRightMenuClick() {
- CommonUMengShare.showSharedMenu(viewController: self, title: "立即注册,积分兑钱", desc: "15+家热门银行、超高兑换价、快速结算", icon: UIImage(named: "icon")!, url: "\(RequestURL.userRecCode)?recCode=\(CommonValue.getUserRecCode())")
- }
- override func handleBack() {
- if wkWebView.canGoBack {
- wkWebView.goBack()
- } else {
- super.handleBack()
- }
- }
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- self.tabBarController?.title = self.title
- }
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: "IntegralWebViewController", bundle: nil)
- }
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- }
|