     }
     
     func handleVideoData() {
+        endHeaderRefreshing()
+        dataController = DHVideoDataController()
+        dataController?.requestVideoAllWithCallback(callback: {
+            self.renderTableViewCell()
+        }())
+    }
+    
+    func endHeaderRefreshing() {
         DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
             self.tableView?.mj_header.endRefreshing()
         }
-        dataController = DHVideoDataController()
-        dataController?.requestVideoAllWithCallback(callback: {
-            self.renderTableViewCell()
-            self.tableView?.mj_footer = MJRefreshAutoNormalFooter(refreshingBlock: {
-                DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
-                    self.tableView?.mj_footer.endRefreshing()
-                }
-                self.dataController?.requestMoreVideo(callback: {
-                    self.tableView?.mj_footer.endRefreshing()
-                    DispatchQueue.main.async(execute: {
-                        self.tableView?.reloadData()
-                    })
-                }())
-            })
-            self.tableView?.mj_header.endRefreshing()
-        }())
     }
     
     func renderTableViewCell() {

        tableView = UITableView(frame: CGRect(x: 0, y: 60 + (menu?.bounds.size.height)!, width: view.bounds.size.width, height: view.bounds.size.height - 60 - (menu?.bounds.size.height)!), style: .plain)
        tableView?.register(UINib(nibName: "DHVideoTableViewCell", bundle: nil), forCellReuseIdentifier: kVideoCellReuseIdentifier)
        tableView?.mj_header = MJRefreshNormalHeader(refreshingBlock: {
            self.handleVideoData()
        })
        view.addSubview(tableView!)
        tableView?.delegate = self

            self.loadingView?.isHidden = true
            self.tableView?.reloadData()
        })
        self.tableView?.mj_footer = MJRefreshAutoNormalFooter(refreshingBlock: {
            DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
                self.tableView?.mj_footer.endRefreshing()
            }
            self.dataController?.requestMoreVideo(callback: {
                self.tableView?.mj_footer.endRefreshing()
                DispatchQueue.main.async(execute: {
                    self.tableView?.reloadData()
                })
                }())
        })
        self.tableView?.mj_header.endRefreshing()
    }
    
    func segmentedMenu(didSelectIndex index: NSInteger) {
