<?php
namespace app\mobile\controller;
use think\facade\Session;
use think\facade\Cache;
use think\facade\Cookie;
use app\common\variable\MsgCode;
use app\common\controller\Jobs as JobsController;
use app\common\controller\Company as CompanyController;
use app\common\controller\Resume as ResumeController;
class Search extends Base
{
    public function searchJobs()
    {
        $G=request()->get();
        $G['uid']=Session::get('User.id');
        $G['resume_id']=Session::get('User.resume_id');
        $Data=JobsController::getJobsList($G);
        if ($Data->items()) {
            return $this->ajaxReturn('',MsgCode::$success,$Data);
        }else{
            return $this->ajaxReturn('暂无数据~',MsgCode::$error);
        }
    }
    public function searchCompany()
    {
        $G=request()->get();
        $G['uid']=Session::get('User.id');
        $G['resume_id']=Session::get('User.resume_id');
        $Data=CompanyController::getCompanyList($G);
        if ($Data->items()) {
            return $this->ajaxReturn('',MsgCode::$success,$Data);
        }else{
            return $this->ajaxReturn('暂无数据~',MsgCode::$error);
        }
    }
    public function searchResume()
    {
        $G=request()->get();
        $G['uid']=Session::get('User.id');
        $G['company_id']=Session::get('User.company_id');
        $Data=ResumeController::getResumeList($G);
        if ($Data->items()) {
            return $this->ajaxReturn('',MsgCode::$success,$Data);
        }else{
            return $this->ajaxReturn('暂无数据~',MsgCode::$error);
        }
    }
}
