public function get_resume_list()
 {
     //得到职位信息id
     $jobid = $_POST['jobid'];
     $page = $_POST['page'];
     $size = $_POST['number'];
     $start = ($page - 1) * $size;
     $userinfo = $_COOKIE['userinfo'];
     $userinfoArr = unserialize($userinfo);
     $uid = $userinfoArr['userid'];
     $username = $userinfoArr['username'];
     $resumeOb = new \Home\Model\ResumeModel();
     $num = $resumeOb->resume_count($uid);
     //得到列表总条数
     $limit = "{$start},{$size}";
     $result = $resumeOb->resume_list($uid, $limit, $jobid);
     //var_dump($result);
     if (empty($result)) {
         $result = array();
     }
     $data = array('count' => $num, 'result' => $result);
     echo json_encode($data);
 }
 public function push_resume()
 {
     $jobid = $_GET['jobid'];
     //得到职位信息id
     //如果为登陆,跳转到login页面
     $userinfo = $_COOKIE['userinfo'];
     if (empty($userinfo)) {
         setcookie("gourl", "/Home/Webchat/push_resume/jobid/" . $jobid);
         header("location:/Home/Webchatlogin/login");
         die;
     } else {
         setcookie("gourl", "");
         $userinfoArr = unserialize($userinfo);
         $uid = $userinfoArr['userid'];
         $username = $userinfoArr['username'];
     }
     //                if (empty($_SESSION['username'])) {
     //                        //将当前页面地址放进存入session
     //                        setcookie("gourl", "/Home/Webchat/push_resume");
     //                        header("location:/Home/Webchatlogin/login");
     //                        die;
     //                } else {
     //                        setcookie("gourl", "");
     //                        $uid = $_SESSION['userid'];
     //                        $username = $_SESSION['username'];
     //                }
     import("Think.Page");
     //Page类的引入
     $resumeOb = new \Home\Model\ResumeModel();
     $num = $resumeOb->resume_count($uid);
     //得到列表总条数
     $page = new \Think\Page($num, 20);
     $limit = $page->firstRow . ',' . $page->listRows;
     //每页的数据数和内容$limit
     $pageStr = $page->show();
     $result = $resumeOb->resume_list($uid, $limit, $jobid);
     if (empty($result)) {
         $this->assign("emp", 1);
     } else {
         $this->assign("emp", 0);
     }
     $this->assign("empty", '<div class="resultjobs clearfix" style="font-size:17px;text-align:center;line-height:50px;">暂时没有数据</div>');
     $this->assign("jobid", $jobid);
     $this->assign("pageStr", $pageStr);
     $this->assign("result", $result);
     $this->display("./Webchat/listtui");
 }