| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 | <?phpnamespace App\Http\Controllers\Mobile;use App\Services\Content\LinkService;use App\Services\HomeService;use App\Services\Company\JobsService;use App\Services\Common\CategoryService;use App\Services\Company\CompanyDownResumeService;use App\Services\Common\SearchService;use App\Services\Person\ResumeService;use App\Services\Company\CompanyService;use App\Services\Jobfair\JobfairService;use App\Services\Content\NoticeServer;use App\Services\Content\ArticleService;use App\Services\Common\HotWordService;class QrcodeController extends MobileBaseController{    protected $companyService;    protected $jobsService;    protected $resumeService;    public function __construct(JobsService $jobsService, CompanyService $companyService, ResumeService $resumeService)    {        $this->jobsService = $jobsService;        $this->companyService = $companyService;        $this->resumeService = $resumeService;    }    public function show($hashid)    {        $data = hashid_decode($hashid);        $user_type = $data['utype'];        $user_id   = $data['id'];        if ($user_type == 1) {            //显示企业详细页面            $company_id = $user_id;            try {                $company_info = $this->companyService->getCompanyInfo(array(array('id', '=', $company_id)));            } catch (\Exception $e) {                $back_url = \Illuminate\Support\Facades\URL::previous();                return $this->showMessage('企业不存在', $back_url, true, '上一页', '3');            }            $this->putSeoData('company', $company_info);            //在招职位            $jobs_where = array(                array('company_id','=',$company_info->id),                array('valid','=',1),                array('display','=',1)            );            $jobs_display = config('aix.companyset.comset.show_set.jobs_display');            if ($jobs_display == 1) {                $jobs_where[] = array('audit','=','1');            } else {                $jobs_where[] = array('audit','<>','3');            }            $jobs = $this->jobsService->getOtherJobs($jobs_where);            $company_where = array(                'trade' => $company_info->trade,                'except_id' =>$company_info->id            );            $return_data = array(                'info'=>$company_info,                'jobs'=>$jobs,                'user'=> $company_info,                ''            );            return view('mobile.app.content.jobs.comshow', $return_data);        } else {            //显示个人用户默认简历预览页面            $person_info = $this->resumeService->getPersonInfo($user_id);            if ($person_info && array_has($person_info, 'status') && $person_info['status']==0) {                $back_url = \Illuminate\Support\Facades\URL::previous();                return $this->showMessage($person_info['error'], $back_url, true, '上一页', '3');            }            $user = $person_info['user'];            $del_resume = $person_info['resume'];            $res = $this->resumeService->resumeShow($del_resume->id, '', $user, 'qr');            if (array_has($res, 'status') && $res['status']==0) {                $back_url = \Illuminate\Support\Facades\URL::previous();                return $this->showMessage($res['msg'], $back_url, true, '上一页', '3');            }            $this->putSeoData('resume', $res['resume']);            return view('mobile.app.content.resume.show', ['content'=>$res,'resume'=>$res['resume'],'user'=> $user]);        }    }}
 |