 //
 
 import UIKit
+import SnapKit
 import MJRefresh
 
 class WBBaseViewController: UIViewController {
-    lazy var tableView: UITableView = UITableView(frame: self.view.bounds, style: .plain)
+    lazy var tableView: UITableView = UITableView(frame: CGRect.zero, style: .plain)
     var model: WBVisitorModel?
     var visitorView: WBVisitorView?{
         didSet{

    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        setupUI()
        NotificationCenter.default.addObserver(self, selector: #selector(whenLoginIsSucess), name: NSNotification.Name(rawValue: loginSuccess), object: nil)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.

    
    func setupTableView () {
        view.addSubview(tableView)
        tableView.snp.makeConstraints { (make) in
            make.leading.trailing.equalTo(self.view)
            if #available(iOS 11, *) {
                make.top.equalTo(self.view.safeAreaLayoutGuide.snp.topMargin)
                make.bottom.equalTo(self.view.safeAreaLayoutGuide.snp.bottomMargin)
            }else{
                make.top.equalTo(self.view.snp.topMargin)
                make.bottom.equalTo(self.view.snp.bottomMargin)
            }
        }
        tableView.separatorStyle = .none
        tableView.dataSource = self
        tableView.delegate = self
