Răsfoiți Sursa

薪动餐饮

linwu 2 ani în urmă
părinte
comite
33c7114de7

+ 2 - 0
app/Admin/Controllers/Company/CompanyController.php

@@ -528,6 +528,7 @@ EOT;
                 'unique'=>'手机号已经存在'
             ])->setWidth(3)->setMustMark();
             $form->radio('mobile_audit','手机认证')->options([1=>'认证通过',0=>'未认证'])->default(0);
+            $form->radio('is_restaurant','薪动餐饮活动')->options([1=>'参加',2=>'未参加'])->default(0);
             $form->text('landline_tel', '固定号码')->setWidth(3)->help('区号-号码-分机号(以“-”分隔)');
             $form->text('email', 'email')->rules('required|regex:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/|unique:companys', [
                 'required' => 'email为必填信息',
@@ -750,6 +751,7 @@ EOT;
                 )->setWidth(3)->setMustMark();
             $form->mobile('mobile', '手机号码')->help('手机、固话二选一')->setWidth(3);
             $form->radio('mobile_audit','手机认证')->options([1=>'认证通过',0=>'未认证'])->default($district['mobile_audit']);
+            $form->radio('is_restaurant','薪动餐饮活动')->options([1=>'参加',2=>'未参加'])->default($district['is_restaurant']);
             $form->text('landline_tel', '固定号码')->setWidth(3)->help('区号-号码-分机号(以“-”分隔)');
             $form->email('email', 'email')
                 ->rules(

+ 83 - 0
app/Http/Controllers/Mobile/Active/SpringController.php

@@ -661,4 +661,87 @@ class SpringController extends MobileBaseController
             'share_link'      => route('mobile.active.spring_special') . '?citycategory=' . $citycategory,
         ]);
     }
+
+    /**
+     * 薪动餐饮
+     */
+    public function restaurant(Request $request)
+    {
+        $offset = isset($request->page) ? $request->page : 0;
+        $limit  = 8;
+        $title = '薪动餐饮';
+
+        $where   = [];
+        $where[] = ['user_status', '=', 1];
+        $where[] = ['audit', '=', 1];
+        $where[] = ['is_restaurant', '=', 1];
+        $where[] = ['deleted_at', '=', null];
+
+        $list = DB::table('companys')->where($where)->orderBy('sort_index', 'desc')->orderBy('id', 'desc')->offset($limit * $offset)->limit($limit)->get();
+        $more = count($list) >= $limit ? true : false;
+
+        $res = [];
+        foreach ($list as $val) {
+
+            $item = [
+                'id'          => $val->id,
+                'companyname' => $val->companyname,
+                'jobs'        => [],
+                'tag_arr'     => [],
+            ];
+
+            //在招职位
+            $jobs_where = [
+                ['company_id', '=', $val->id],
+                ['valid', '=', 1],
+                ['display', '=', 1],
+                ['audit', '=', 1],
+                ['deleted_at', '=', null],
+            ];
+
+            $jobs = DB::table('jobs')->where($jobs_where)->get();
+            if (!$jobs->isEmpty()) {
+                foreach ($jobs as $value) {
+                    $job = [
+                        'id'        => $value->id,
+                        'jobs_name' => $value->jobs_name,
+                        'amount'    => $value->amount,
+                        'wage'      => $value->wage,
+                        'wage_min'  => $value->wage_min,
+                        'wage_max'  => $value->wage_max,
+                    ];
+                    array_push($item['jobs'], $job);
+                }
+            }
+
+            //企业福利
+            if (!empty($val->tag)) {
+                $tags            = explode(',', $val->tag);
+                $tag_arr         = DB::table('categorys')->whereIn('id', $tags)->limit(3)->get(['demand'])->toArray();
+                $item['tag_arr'] = $tag_arr;
+            }
+
+            array_push($res, $item);
+        }
+
+        if ($request->ajax()) {
+            if (count($res)) {
+                return response()->json(['status' => 1, 'data' => view('mobile.app.active.ajax.ajax_restaurant', [
+                    'res'        => $res,
+                    'more'       => $more,
+                ])->render()]);
+            }
+            return response()->json(['status' => 0]);
+        }
+
+        return view('mobile.app.active.restaurant', [
+            'title'           => $title,
+            'res'             => $res,
+            'more'            => $more,
+            'share_title'     => $title,
+            'share_desc'      => '主招餐饮相关行业的人!',
+            'share_image_url' => theme_asset('mobile/images/online2021/share_logo.jpg'),
+            'share_link'      => route('mobile.active.restaurant'),
+        ]);
+    }
 }

+ 92 - 3
app/Http/Controllers/Web/Active/JobfairController.php

@@ -713,9 +713,9 @@ class JobfairController extends WebBaseController
         $offset = isset($request->page) ? $request->page : 0;
         $limit  = 18;
 
-        $trade        = $request->input('trade');
-        $param_array  = ['trade', 'nature'];
-        $params = [];
+        $trade       = $request->input('trade');
+        $param_array = ['trade', 'nature'];
+        $params      = [];
         if ($request->all()) {
             foreach ($request->all() as $k => $v) {
                 if (in_array($k, $param_array) && $v) {
@@ -817,4 +817,93 @@ class JobfairController extends WebBaseController
             'params'     => $params,
         ]);
     }
+
+    /**薪动餐饮
+     * @param Request $request
+     * @param int $id
+     * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\JsonResponse|\Illuminate\View\View
+     * @throws \Throwable
+     */
+    public function restaurant(Request $request)
+    {
+        $offset = isset($request->page) ? $request->page : 0;
+        $limit  = 18;
+
+
+        $where   = [];
+        $where[] = ['user_status', '=', 1];
+        $where[] = ['audit', '=', 1];
+        $where[] = ['is_restaurant', '=', 1];
+        $where[] = ['deleted_at', '=', null];
+
+        $list         = DB::table('companys')->where($where)->orderBy('sort_index', 'desc')->orderBy('id', 'desc')->offset($limit * $offset)->limit($limit)->get();
+        $total        = DB::table('companys')->where($where)->count();
+
+        $more = count($list) >= $limit ? true : false;
+
+        $res           = [];
+        $total_job     = 0;
+        $total_job_num = 0;
+        foreach ($list as $val) {
+            $item = [
+                'id'          => $val->id,
+                'companyname' => $val->companyname,
+                'jobs'        => [],
+                'tag_arr'     => [],
+            ];
+
+            //在招职位
+            $jobs_where = [
+                ['company_id', '=', $val->id],
+                ['valid', '=', 1],
+                ['display', '=', 1],
+                ['audit', '=', 1],
+                ['deleted_at', '=', null],
+            ];
+
+            $jobs = DB::table('jobs')->where($jobs_where)->get();
+            if ($jobs) {
+                foreach ($jobs as $value) {
+                    $job = [
+                        'id'        => $value->id,
+                        'jobs_name' => $value->jobs_name,
+                        'amount'    => $value->amount,
+                        'wage'      => $value->wage,
+                        'wage_min'  => $value->wage_min,
+                        'wage_max'  => $value->wage_max,
+                    ];
+                    array_push($item['jobs'], $job);
+                    $total_job_num += $value->amount;
+                    $total_job     += 1;
+                }
+            }
+
+            //企业福利
+            if (!empty($val->tag)) {
+                $tags            = explode(',', $val->tag);
+                $tag_arr         = DB::table('categorys')->whereIn('id', $tags)->limit(3)->get(['demand'])->toArray();
+                $item['tag_arr'] = $tag_arr;
+            }
+
+            array_push($res, $item);
+        }
+
+        if ($request->ajax()) {
+            if (count($res)) {
+                return response()->json(['status' => 1, 'data' => view('app.active.ajax.ajax_restaurant', [
+                    'res'        => $res,
+                    'more'       => $more,
+                ])->render()]);
+            }
+            return response()->json(['status' => 0]);
+        }
+
+        return view('app.active.restaurant', [
+            'res'          => $res,
+            'more'         => $more,
+            'total'        => $total,
+            'total_job'    => $total_job,
+        ]);
+
+    }
 }

+ 197 - 178
app/Http/Controllers/Web/Company/CompanyController.php

@@ -61,50 +61,59 @@ class CompanyController extends WebBaseController
      * @param $taskService
      * @param $searchService
      */
-    public function __construct(MemberLogRepository $memberLogRepository,CompanyService $companyService, TaskService $taskService, JobsService $jobsService, SmsService $smsService, EmailService $emailService, CompanyImgService $companyImgService, AuditReasonsRepository $auditReasonsRepository, SearchService $searchService, CompanyConsultantService $companyConsultantService,OrganizationService $organizationService,ServiceService $serviceService, DispensingService $dispensingService)
-    {
-        $this->companyService = $companyService;
-        $this->companyImgService= $companyImgService;
-        $this->auditReasonsRepository = $auditReasonsRepository;
-        $this->emailService = $emailService;
-        $this->smsService = $smsService;
-        $this->jobsService = $jobsService;
-        $this->taskService = $taskService;
-        $this->searchService = $searchService;
-        $this->recommend_limit = 10;
-        $this->recommend_need_limit = 50;
+    public function __construct(MemberLogRepository $memberLogRepository, CompanyService $companyService, TaskService $taskService, JobsService $jobsService, SmsService $smsService, EmailService $emailService, CompanyImgService $companyImgService, AuditReasonsRepository $auditReasonsRepository, SearchService $searchService, CompanyConsultantService $companyConsultantService, OrganizationService $organizationService, ServiceService $serviceService, DispensingService $dispensingService)
+    {
+        $this->companyService           = $companyService;
+        $this->companyImgService        = $companyImgService;
+        $this->auditReasonsRepository   = $auditReasonsRepository;
+        $this->emailService             = $emailService;
+        $this->smsService               = $smsService;
+        $this->jobsService              = $jobsService;
+        $this->taskService              = $taskService;
+        $this->searchService            = $searchService;
+        $this->recommend_limit          = 10;
+        $this->recommend_need_limit     = 50;
         $this->companyConsultantService = $companyConsultantService;
-        $this->memberLogRepository=$memberLogRepository;
-        $this->organizationService = $organizationService;
-        $this->serviceService = $serviceService;
-        $this->dispensingService = $dispensingService;
+        $this->memberLogRepository      = $memberLogRepository;
+        $this->organizationService      = $organizationService;
+        $this->serviceService           = $serviceService;
+        $this->dispensingService        = $dispensingService;
     }
 
     //会员中心
     public function index()
     {
-        $user = auth('web-company')->user();
-        $res = $this->companyService->index($user);
+        $user       = auth('web-company')->user();
+        $res        = $this->companyService->index($user);
         $jobs_total = $this->jobsService->jobsTotal($user->id);
-        if (Cache::has('recommend_click_resumes_'.get_subsite_id())) {
-            Cache::forget('recommend_click_resumes_'.get_subsite_id());
+        if (Cache::has('recommend_click_resumes_' . get_subsite_id())) {
+            Cache::forget('recommend_click_resumes_' . get_subsite_id());
         }
         //用于匹配简历的职位
-        $recommend_rst = $this->getRecommendResumes($this->recommend_limit);    //获取推荐简历
+        $recommend_rst            = $this->getRecommendResumes($this->recommend_limit);    //获取推荐简历
         $res['recommend_resumes'] = $recommend_rst['resumes'];
-        $res['match_job'] = $recommend_rst['match_job'];
-        $res['jobsCount'] = $jobs_total;
-        $res['has_job'] = $recommend_rst['has_job'];
-        $res['consultant'] = $this->companyConsultantService->getCompanyConsultant(auth('web-company')->user());
+        $res['match_job']         = $recommend_rst['match_job'];
+        $res['jobsCount']         = $jobs_total;
+        $res['has_job']           = $recommend_rst['has_job'];
+        $res['consultant']        = $this->companyConsultantService->getCompanyConsultant(auth('web-company')->user());
         return view('app.company.company_index', $res);
     }
 
+    //薪动餐饮
+    public function join(Request $request)
+    {
+        $status = $request->input('status');
+        $user   = auth('web-company')->user();
+        DB::table('companys')->where('id', $user->id)->update(['is_restaurant' => $status]);
+        return response()->json(['code'=>0,'message'=>'操作成功']);
+    }
+
 
     public function ajaxSms()
     {
         $res = $this->companyService->ajaxSms(auth('web-company')->user());
-        if($res['id']){
-            $html =  view('app.company.ajax.ajax_sms',['info'=>$res['message']])->render();
+        if ($res['id']) {
+            $html           = view('app.company.ajax.ajax_sms', ['info' => $res['message']])->render();
             $res['message'] = $html;
             return response()->json($res);
         }
@@ -114,26 +123,26 @@ class CompanyController extends WebBaseController
     public function getRecommendResumes($limit = 10)
     {
 
-        $need_limit = $this->recommend_need_limit;
-        $list = array();
-        $user = auth('web-company')->user();
-        $has_job = 1;
+        $need_limit      = $this->recommend_need_limit;
+        $list            = [];
+        $user            = auth('web-company')->user();
+        $has_job         = 1;
         $recommend_order = $this->companyService->getRecommendorder($user);
         $recommend_where = $this->companyService->getRecommendWhere($user);
         if ($recommend_where) {
             //添加30天的时间限制
-            $recommend_where['and'][] = ['updated_at','>=', date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-30 day"))))];
+            $recommend_where['and'][] = ['updated_at', '>=', date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-30 day"))))];
 
             $recommend_resume_lists = $this->searchService->getRecommends($user, 'Resume', $recommend_where, $recommend_order, '', $limit);
-            $rids = $recommend_resume_lists->pluck('id')->toArray();
+            $rids                   = $recommend_resume_lists->pluck('id')->toArray();
             if ($recommend_resume_lists->total() >= $limit) {
                 $list = array_slice($recommend_resume_lists->items(), 0, $limit);
             } else {
                 //获取点击量高的简历
-                $click_where = $this->companyService->getRecommendResumeWhere(array());
+                $click_where   = $this->companyService->getRecommendResumeWhere([]);
                 $click_resumes = $this->searchService->search('Resume', $click_where, $recommend_order, '', $need_limit);
                 $click_resumes = $click_resumes->items();
-                Cache::forever('recommend_click_resumes_'.get_subsite_id(), $click_resumes);
+                Cache::forever('recommend_click_resumes_' . get_subsite_id(), $click_resumes);
                 //去除已有简历
                 if ($click_resumes && $rids) {
                     foreach ($click_resumes as $k => $v) {
@@ -143,47 +152,48 @@ class CompanyController extends WebBaseController
                     }
                 }
                 $recommend_resumes = $recommend_resume_lists->items();
-                $recommend_total = $recommend_resume_lists->total();
-                $need_resumes = array_slice($click_resumes, 0, $need_limit - $recommend_total);
-                $all_resumes = array_merge($recommend_resumes, $need_resumes);
-                $list = array_slice($all_resumes, 0, $limit);
+                $recommend_total   = $recommend_resume_lists->total();
+                $need_resumes      = array_slice($click_resumes, 0, $need_limit - $recommend_total);
+                $all_resumes       = array_merge($recommend_resumes, $need_resumes);
+                $list              = array_slice($all_resumes, 0, $limit);
             }
         } else {
             //没有可匹配的职位
             $has_job = 0;
         }
-        return array(
-            'resumes' => $list,
-            'match_job' => array(),
-            'has_job'   => $has_job
-        );
+        return [
+            'resumes'   => $list,
+            'match_job' => [],
+            'has_job'   => $has_job,
+        ];
     }
+
     public function ajaxGetRecommendResumes(Request $request)
     {
-        $limit = $this->recommend_limit;
+        $limit      = $this->recommend_limit;
         $need_limit = $this->recommend_need_limit;
-        $page   = $request->input('page');
-        $has_job = 1;
-        $user = auth('web-company')->user();
-        $order_by = $this->companyService->getRecommendorder($user);
-        $list = array();
+        $page       = $request->input('page');
+        $has_job    = 1;
+        $user       = auth('web-company')->user();
+        $order_by   = $this->companyService->getRecommendorder($user);
+        $list       = [];
 
         $recommend_where = $this->companyService->getRecommendWhere($user);
         if ($recommend_where) {
-            $recommend_where['and'][] = ['updated_at','>=', date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-30 day"))))];
+            $recommend_where['and'][] = ['updated_at', '>=', date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-30 day"))))];
 
             $recommend_resume_lists = $this->searchService->getRecommends($user, 'Resume', $recommend_where, $order_by, '', $need_limit, 1);
-            $rids = $recommend_resume_lists->pluck('id')->toArray();
-            $next_page = (int)$page + 1;
+            $rids                   = $recommend_resume_lists->pluck('id')->toArray();
+            $next_page              = (int)$page + 1;
 
-            if ($recommend_resume_lists->total() >= $next_page*$limit) {
-                $list = array_slice($recommend_resume_lists->items(), $page*$limit, $limit);
+            if ($recommend_resume_lists->total() >= $next_page * $limit) {
+                $list = array_slice($recommend_resume_lists->items(), $page * $limit, $limit);
             } else {
-                $click_resumes = Cache::get('recommend_click_resumes_'.get_subsite_id());
+                $click_resumes = Cache::get('recommend_click_resumes_' . get_subsite_id());
 
                 if ($click_resumes === null) {
-                    $click_resumes = $this->searchService->getClickResumes($order_by, array(), $need_limit);
-                    Cache::forever('recommend_click_resumes_'.get_subsite_id(), $click_resumes);
+                    $click_resumes = $this->searchService->getClickResumes($order_by, [], $need_limit);
+                    Cache::forever('recommend_click_resumes_' . get_subsite_id(), $click_resumes);
                 }
                 if ($click_resumes && $rids) {
                     foreach ($click_resumes as $k => $v) {
@@ -194,12 +204,12 @@ class CompanyController extends WebBaseController
                 }
 
                 $recommend_resumes = $recommend_resume_lists->items();
-                $recommend_total = $recommend_resume_lists->total();
-                $need_resumes = array_slice($click_resumes, 0, $need_limit - $recommend_total);
-                $all_resumes = array_merge($recommend_resumes, $need_resumes);
-                $list = array_slice($all_resumes, $page*$limit, $limit);
+                $recommend_total   = $recommend_resume_lists->total();
+                $need_resumes      = array_slice($click_resumes, 0, $need_limit - $recommend_total);
+                $all_resumes       = array_merge($recommend_resumes, $need_resumes);
+                $list              = array_slice($all_resumes, $page * $limit, $limit);
                 if (!$list) {
-                    $list = array_slice($all_resumes, 0, $limit);
+                    $list      = array_slice($all_resumes, 0, $limit);
                     $next_page = 1;
                 }
             }
@@ -207,11 +217,11 @@ class CompanyController extends WebBaseController
         } else {
             $has_job = 0;
         }
-        $match_job =0;
+        $match_job                = 0;
         $recommend_rst['resumes'] = $list;
         $recommend_rst['has_job'] = $has_job;
-        $html = view('app.company.ajax.ajax_resume_list', $recommend_rst)->render();
-        $return_data = array( 'status'=>1, 'html' => $html,'match_job'=>$match_job,'page'=>$next_page);
+        $html                     = view('app.company.ajax.ajax_resume_list', $recommend_rst)->render();
+        $return_data              = ['status' => 1, 'html' => $html, 'match_job' => $match_job, 'page' => $next_page];
         return response()->json($return_data);
     }
 
@@ -236,7 +246,7 @@ class CompanyController extends WebBaseController
      */
     public function companyInfo()
     {
-        $user = auth('web-company')->user();
+        $user        = auth('web-company')->user();
         $companyInfo = $this->companyService->companyInfo($user);
         return view('app.company.company_info', $companyInfo);
     }
@@ -249,7 +259,7 @@ class CompanyController extends WebBaseController
     public function companySave(CompanyValidatorRequest $request)
     {
         $data = $request->except('_method', '_token');
-        $res = $this->companyService->companySave($data, auth('web-company')->user());
+        $res  = $this->companyService->companySave($data, auth('web-company')->user());
         return response()->json($res);
     }
 
@@ -263,7 +273,7 @@ class CompanyController extends WebBaseController
         $user = auth('web-company')->user();
         if ($request->method() == 'GET') {
             $mobile = $this->companyService->authMobile($user);
-            return response()->json(['status'=>1,'data'=>view('app.company.ajax.ajax_auth_mobile', $mobile)->render()]);
+            return response()->json(['status' => 1, 'data' => view('app.company.ajax.ajax_auth_mobile', $mobile)->render()]);
         }
         return $this->companyService->verifyCode($request->mobile, $user);
     }
@@ -290,14 +300,15 @@ class CompanyController extends WebBaseController
         $user = auth('web-company')->user();
         return $this->companyService->logoDel($user);
     }
+
     /**企业风采
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
      */
     public function companyImg()
     {
         $user = auth('web-company')->user();
-        $res = $this->companyImgService->list($user->id);
-        return view('app.company.company_img', ['imgList'=>$res]);
+        $res  = $this->companyImgService->list($user->id);
+        return view('app.company.company_img', ['imgList' => $res]);
     }
 
     /**
@@ -333,7 +344,7 @@ class CompanyController extends WebBaseController
     {
         $user = auth('web-company')->user();
 
-        return $this->companyImgService->saveRemark($request,$user);
+        return $this->companyImgService->saveRemark($request, $user);
     }
 
     /**
@@ -346,10 +357,10 @@ class CompanyController extends WebBaseController
     {
         if ($request->type) {
             $user = auth('web-company')->user();
-            return $this->companyImgService->delImg($id,$user);
+            return $this->companyImgService->delImg($id, $user);
         }
-        $tip='被删除后将无法恢复,您确定要删除该风采照片吗?';
-        return view('app.company.ajax.ajax_warning', ['tip'=>$tip]);
+        $tip = '被删除后将无法恢复,您确定要删除该风采照片吗?';
+        return view('app.company.ajax.ajax_warning', ['tip' => $tip]);
     }
 
     /**
@@ -360,13 +371,13 @@ class CompanyController extends WebBaseController
      */
     public function companyAuth($anew = '')
     {
-        $user = auth('web-company')->user();
-        $companyInfo = $this->companyService->getInfoById($user);
+        $user                = auth('web-company')->user();
+        $companyInfo         = $this->companyService->getInfoById($user);
         $companyInfo->reason = $this->auditReasonsRepository->getAuditReasons(auth('web-company')->user()->id, 8);
-        if ($anew=='anew') {
+        if ($anew == 'anew') {
             $companyInfo->audit = 0;
         }
-        return view('app.company.company_auth', ['companyInfo'=>$companyInfo, 'anew'=>$anew]);
+        return view('app.company.company_auth', ['companyInfo' => $companyInfo, 'anew' => $anew]);
     }
 
     public function certificate(Request $request)
@@ -382,7 +393,7 @@ class CompanyController extends WebBaseController
      */
     public function companySecurity()
     {
-        $user = auth('web-company')->user();
+        $user        = auth('web-company')->user();
         $companyInfo = $this->companyService->companySecurity($user);
         return view('app.company.company_security', $companyInfo);
     }
@@ -393,11 +404,11 @@ class CompanyController extends WebBaseController
      */
     public function loginLog()
     {
-        $user = auth('web-company')->user();
-        $loginLog = $this->companyService->companyLoginLog($user);
-        $companyInfo = $user;
+        $user                    = auth('web-company')->user();
+        $loginLog                = $this->companyService->companyLoginLog($user);
+        $companyInfo             = $user;
         $companyInfo['loginLog'] = $loginLog;
-        return view('app.company.login_log', ['companyInfo'=>$companyInfo]);
+        return view('app.company.login_log', ['companyInfo' => $companyInfo]);
     }
 
     /**我的消息
@@ -408,7 +419,7 @@ class CompanyController extends WebBaseController
     {
         $user = auth('web-company')->user();
         $data = $request->all();
-        $res = $this->companyService->comPms($data, $user);
+        $res  = $this->companyService->comPms($data, $user);
         return view('app.company.company_pms', $res);
     }
 
@@ -432,7 +443,7 @@ class CompanyController extends WebBaseController
 
     public function msgDelete()
     {
-        if (request()->method()=='POST') {
+        if (request()->method() == 'POST') {
             $res = $this->companyService->msgDelete(request()->all());
             if ($res) {
                 return $this->sendSuccessResponse('删除成功!');
@@ -440,20 +451,20 @@ class CompanyController extends WebBaseController
                 return $this->sendErrorResponse('删除失败!');
             }
         } else {
-            return view('app.person.ajax.resume_delete', ['tpis'=>'删除后将无法恢复,您确定要删除选择的咨询消息吗?']);
+            return view('app.person.ajax.resume_delete', ['tpis' => '删除后将无法恢复,您确定要删除选择的咨询消息吗?']);
         }
     }
 
 
     public function companyPmsDel(Request $request)
     {
-        if ($request->method()== 'POST') {
+        if ($request->method() == 'POST') {
             $user = auth('web-company')->user();
 
-            return $this->companyService->companyPmsDel($request,$user);
+            return $this->companyService->companyPmsDel($request, $user);
         }
         $tip = "被删除后将无法恢复,您确定要删除选中的系统消息吗?";
-        return response()->json(['status'=>1,'data'=>['html'=>view('app.company.ajax.ajax_warning', ['tip'=>$tip])->render()]]);
+        return response()->json(['status' => 1, 'data' => ['html' => view('app.company.ajax.ajax_warning', ['tip' => $tip])->render()]]);
     }
 
     public function companyPmsCheck(Request $request)
@@ -467,7 +478,7 @@ class CompanyController extends WebBaseController
     public function companyPmsConsult()
     {
         $res = $this->companyService->companyPmsConsult(auth('web-company')->user());
-        return view('app.company.company_pmsconsult', ['content'=>$res]);
+        return view('app.company.company_pmsconsult', ['content' => $res]);
     }
 
     /**
@@ -476,7 +487,7 @@ class CompanyController extends WebBaseController
     public function modifyUsername()
     {
         $user = auth('web-company')->user();
-        $res = $this->companyService->modifyUserName($user);
+        $res  = $this->companyService->modifyUserName($user);
         return view('app.company.ajax.username', $res);
     }
 
@@ -515,7 +526,7 @@ class CompanyController extends WebBaseController
             return $this->sendErrorResponse('密码修改失败!');
         }
         if ($user->mobile) {
-            $this->smsService->sendSms($user->mobile, Smser::TEMPLATE_SMS_EDITPWD, ['sitename'=>subsite_config('aix.system.site.site.site_name'),'newpassword'=>$request->password]);
+            $this->smsService->sendSms($user->mobile, Smser::TEMPLATE_SMS_EDITPWD, ['sitename' => subsite_config('aix.system.site.site.site_name'), 'newpassword' => $request->password]);
         }
         return $this->sendSuccessResponse('密码修改成功!');
     }
@@ -527,7 +538,7 @@ class CompanyController extends WebBaseController
 
     public function authMobile()
     {
-        $user = auth('web-company')->user();
+        $user   = auth('web-company')->user();
         $mobile = $this->companyService->authMobile($user);
         return view('app.company.ajax.ajax_auth_mobile', $mobile);
     }
@@ -540,34 +551,34 @@ class CompanyController extends WebBaseController
     public function verifyCode(CompanyValidatorRequest $request)
     {
         $mobile = $request->mobile;
-        $id = $request->id;
+        $id     = $request->id;
         if (!$this->companyService->checkMobileAudit($id, $mobile)->isEmpty()) {
-            return response()->json(['status'=>0, 'msg'=>'手机已验证']);
+            return response()->json(['status' => 0, 'msg' => '手机已验证']);
         }
         $this->smsService->sendAuthSms($mobile, smser::TEMPLATE_AUTH_CHECK);
-        return response()->json(['status'=>1]);
+        return response()->json(['status' => 1]);
     }
 
     public function mobileAudit(CompanyValidatorRequest $request)
     {
-        $user = auth('web-company')->user();
-        $mobile = $request->mobile;
+        $user       = auth('web-company')->user();
+        $mobile     = $request->mobile;
         $verifyCode = $request->verifycode;
-        $res = $this->smsService->checkAuthSms($mobile, smser::TEMPLATE_AUTH_CHECK, $verifyCode);
+        $res        = $this->smsService->checkAuthSms($mobile, smser::TEMPLATE_AUTH_CHECK, $verifyCode);
         if (!$res) {
-            return response()->json(['status'=>0,'msg'=>'验证码错误']);
+            return response()->json(['status' => 0, 'msg' => '验证码错误']);
         }
         $res = $this->companyService->verifyCode($mobile, $user);
-        if ($res['status']==1) {
-            $this->memberLogRepository->createLog($user,8002,"");
+        if ($res['status'] == 1) {
+            $this->memberLogRepository->createLog($user, 8002, "");
 
             if (isset($res['data'])) {
-                return response()->json(['status'=>1,'msg'=>'手机认证成功','data'=>['mobile'=>$mobile, 'points'=>$res['data']['points']]]);
+                return response()->json(['status' => 1, 'msg' => '手机认证成功', 'data' => ['mobile' => $mobile, 'points' => $res['data']['points']]]);
             } else {
-                return response()->json(['status'=>1,'msg'=>'手机认证成功','data'=>['mobile'=>$mobile]]);
+                return response()->json(['status' => 1, 'msg' => '手机认证成功', 'data' => ['mobile' => $mobile]]);
             }
         } else {
-            return response()->json(['status'=>0,'msg'=>'手机认证失败']);
+            return response()->json(['status' => 0, 'msg' => '手机认证失败']);
         }
     }
 
@@ -579,9 +590,9 @@ class CompanyController extends WebBaseController
     {
         $user = auth('web-company')->user();
         if (!$email = $this->companyService->authEmail($user)) {
-            return response()->json(['status'=>0,'msg'=>'参数错误!']);
+            return response()->json(['status' => 0, 'msg' => '参数错误!']);
         }
-        return response()->json(['status'=>1,'msg'=>'查询成功!','data'=>view('app.company.ajax.ajax_auth_email', $email)->render()]);
+        return response()->json(['status' => 1, 'msg' => '查询成功!', 'data' => view('app.company.ajax.ajax_auth_email', $email)->render()]);
     }
 
     /**认证Email 及修改状态
@@ -591,17 +602,17 @@ class CompanyController extends WebBaseController
     public function emailSend(CompanyValidatorRequest $request)
     {
         $email = $request->email;
-        $id = $request->id;
+        $id    = $request->id;
         if (!$this->companyService->checkEmailAudit($id, $email)->isEmpty()) {
-            return response()->json(['status'=>0, 'msg'=>'email已验证!']);
+            return response()->json(['status' => 0, 'msg' => 'email已验证!']);
         }
         $user = auth('web-company')->user();
-        $this->memberLogRepository->createLog($user,8001,"");
+        $this->memberLogRepository->createLog($user, 8001, "");
 
         $this->emailService->setAuthTag('company')
             ->setCallback('App\Services\Company\CompanyService', 'sendAuthEmailHook', [$email, auth('web-company')->user()])
             ->sendAuthMail($email, EmailService::TEMPLATE_VALIDATION);
-        return response()->json(['status'=>1]);
+        return response()->json(['status' => 1]);
     }
 
     /**签到
@@ -610,153 +621,161 @@ class CompanyController extends WebBaseController
     public function sign()
     {
         $user = auth('web-company')->user();
-        $res = $this->companyService->signIn($user);
-        return response()->json(['status'=>$res['code'],'msg'=>$res['msg'],'data'=>$res['info']]);
+        $res  = $this->companyService->signIn($user);
+        return response()->json(['status' => $res['code'], 'msg' => $res['msg'], 'data' => $res['info']]);
     }
 
     public function ajaxResumeSearch(Request $request)
     {
-        $key = $request->input('key', '');
+        $key         = $request->input('key', '');
         $search_type = $request->input('search_type', 'precise');
-        return response()->json(['status'=>1,'data'=>route(url_rewrite('AIX_resumelist'), ['key'=>$key, 'search_type'=>$search_type])]);
+        return response()->json(['status' => 1, 'data' => route(url_rewrite('AIX_resumelist'), ['key' => $key, 'search_type' => $search_type])]);
     }
 
 
     public function unBindThird(Request $request)
     {
         $alias = $request->alias;
-        $user = auth('web-company')->user();
+        $user  = auth('web-company')->user();
         return $this->companyService->unBindThird($alias, $user);
     }
 
     //企业联系人信息
     public function contact(Request $request)
     {
-        $user = auth('web-company')->user();
-        $contacts = $this->companyService->companyContact($user, 10);
-        $return_data = array(
-            'contacts' => $contacts
-        );
+        $user        = auth('web-company')->user();
+        $contacts    = $this->companyService->companyContact($user, 10);
+        $return_data = [
+            'contacts' => $contacts,
+        ];
 
         return view('app.company.company_contact', $return_data);
     }
+
     //企业联系人信息ajax请求
-    public function ContactAjax(){
-        $user = auth('web-company')->user();
+    public function ContactAjax()
+    {
+        $user     = auth('web-company')->user();
         $contacts = $this->companyService->companyContact($user, 10);
 
         return response()->json($contacts);
     }
+
     public function showContact(Request $request)
     {
-        $id = $request->input('id');
+        $id  = $request->input('id');
         $rst = $this->companyService->getContactInfo($id, auth('web-company')->user());
         if (array_has($rst, 'status') && $rst['status'] == 1) {
-            $contact = $rst['contact'];
+            $contact      = $rst['contact'];
             $landline_tel = dealContactPhone($contact->landline_tel);
-            $html = view('app.company.ajax.show_contact', ['contact'=>$contact, 'landline_tel'=>$landline_tel])->render();
-            $return_data = array( 'status'=>1, 'data' => $html);
+            $html         = view('app.company.ajax.show_contact', ['contact' => $contact, 'landline_tel' => $landline_tel])->render();
+            $return_data  = ['status' => 1, 'data' => $html];
             return response()->json($return_data);
 
         } else {
             return response()->json($rst);
         }
     }
+
     public function deleteContact(Request $request)
     {
-        $id = $request->input('id');
-        $ids = is_array($id)?$id:explode(",", $id);
+        $id  = $request->input('id');
+        $ids = is_array($id) ? $id : explode(",", $id);
         return $this->companyService->companyContactDel($ids, auth('web-company')->user());
     }
+
     public function editContact(Request $request)
     {
         if ($request->method() == 'POST') {
             $user = auth('web-company')->user();
 
-            $id = $request->input('id');
+            $id   = $request->input('id');
             $data = $request->except('_token', '_method');
-            $rst = $this->companyService->updateContact($data,$user);
+            $rst  = $this->companyService->updateContact($data, $user);
             if ($rst) {
-                $return_data = array('status'=>1, 'msg'=>'修改成功');
+                $return_data = ['status' => 1, 'msg' => '修改成功'];
             } else {
-                $return_data = array('status'=>0, 'msg'=>'修改失败');
+                $return_data = ['status' => 0, 'msg' => '修改失败'];
             }
             return response()->json($return_data);
         } else {
-            $id = $request->input('id');
+            $id  = $request->input('id');
             $rst = $this->companyService->getContactInfo($id, auth('web-company')->user());
             if (array_has($rst, 'status') == 1) {
                 $return_data = ['contact' => $rst['contact']];
-                $html = view('app.company.ajax.add_contact', $return_data)->render();
-                $return_data = array( 'status'=>1, 'data' => $html);
+                $html        = view('app.company.ajax.add_contact', $return_data)->render();
+                $return_data = ['status' => 1, 'data' => $html];
                 return response()->json($return_data);
             } else {
                 return $rst;
             }
         }
     }
+
     public function addContact(Request $request)
     {
         if ($request->method() == 'POST') {
-            $contact = $request->input('contact', '');
+            $contact   = $request->input('contact', '');
             $telephone = $request->input('telephone', '');
             $tel_first = $request->input('tel_first', '');
-            $tel_next = $request->input('tel_next', '');
-            $tel_last = $request->input('tel_last', '');
-            $email = $request->input('email', '');
-            $qq = $request->input('qq', '');
-            $address = $request->input('address', '');
+            $tel_next  = $request->input('tel_next', '');
+            $tel_last  = $request->input('tel_last', '');
+            $email     = $request->input('email', '');
+            $qq        = $request->input('qq', '');
+            $address   = $request->input('address', '');
 
             if (!$contact) {
-                $return_data = array( 'status'=>0, 'msg' => '请输入联系人信息');
+                $return_data = ['status' => 0, 'msg' => '请输入联系人信息'];
             }
             //座机和手机号至少填写一项
             if (!$email) {
-                $return_data = array( 'status'=>0, 'msg' => '请输入联系邮箱');
+                $return_data = ['status' => 0, 'msg' => '请输入联系邮箱'];
             }
             if (!$address) {
-                $return_data = array( 'status'=>0, 'msg' => '请输入联系地址');
+                $return_data = ['status' => 0, 'msg' => '请输入联系地址'];
             }
 
-            if (!empty($tel_first) && !empty($tel_next)){
-                $landline_tel=$tel_first."-".$tel_next;
-                if (!empty($tel_last)){ $landline_tel.="-".$tel_last; }
-            }else{
-                $landline_tel="";
+            if (!empty($tel_first) && !empty($tel_next)) {
+                $landline_tel = $tel_first . "-" . $tel_next;
+                if (!empty($tel_last)) {
+                    $landline_tel .= "-" . $tel_last;
+                }
+            } else {
+                $landline_tel = "";
             }
 
-            $set_data = array(
+            $set_data = [
                 'company_id'   => (int)auth('web-company')->user()->id,
                 'contact'      => $contact,
                 'telephone'    => $telephone,
                 'landline_tel' => $landline_tel,
                 'email'        => $email,
                 'qq'           => $qq,
-                'address'      => $address
-            );
-            $rst = $this->companyService->addContact($set_data);
+                'address'      => $address,
+            ];
+            $rst      = $this->companyService->addContact($set_data);
             if ($rst) {
-                $return_data = array('status'=>1, 'msg'=>'添加成功');
+                $return_data = ['status' => 1, 'msg' => '添加成功'];
             } else {
-                $return_data = array('status'=>0, 'msg'=>'添加失败');
+                $return_data = ['status' => 0, 'msg' => '添加失败'];
             }
             return response()->json($return_data);
         } else {
-            $return_data = ['contact'=>''];
-            $html = view('app.company.ajax.add_contact', $return_data)->render();
-            $return_data = array( 'status'=>1, 'data' => $html);
+            $return_data = ['contact' => ''];
+            $html        = view('app.company.ajax.add_contact', $return_data)->render();
+            $return_data = ['status' => 1, 'data' => $html];
             return response()->json($return_data);
         }
     }
 
     public function myCode(Request $requset)
     {
-        $id = $requset->id?$requset->id:0;
+        $id   = $requset->id ? $requset->id : 0;
         $user = $this->getLoginUser();
-        if ($user->id!=$id) {
-            return response()->json(['status'=>0,'img'=>'企业不存在!']);
+        if ($user->id != $id) {
+            return response()->json(['status' => 0, 'img' => '企业不存在!']);
         }
-        return response()->json(['status'=>1,'img'=>get_qrcode_html(route('mobile.firm.com.wzp.index',['id'=>$id]))]);
+        return response()->json(['status' => 1, 'img' => get_qrcode_html(route('mobile.firm.com.wzp.index', ['id' => $id]))]);
     }
 
     //服务广场
@@ -769,7 +788,7 @@ class CompanyController extends WebBaseController
     {
         $service_list = $this->serviceService->list();
 
-        return view('app.company.company_share',['service_list'=>$service_list]);
+        return view('app.company.company_share', ['service_list' => $service_list]);
     }
 
     public function dispensing()
@@ -779,40 +798,40 @@ class CompanyController extends WebBaseController
 
     public function dispensingList()
     {
-        $user = auth('web-company')->user();
+        $user           = auth('web-company')->user();
         $dispensingList = $this->dispensingService->list($user);
-        return view('app.company.company_dispensingList',['dispensing'=>$dispensingList]);
+        return view('app.company.company_dispensingList', ['dispensing' => $dispensingList]);
     }
 
     public function dispensingAdd(Request $request)
     {
         $data = $request->except('_method', '_token');
-        return $this->dispensingService->save($data,auth('web-company')->user());
+        return $this->dispensingService->save($data, auth('web-company')->user());
     }
 
     public function dispensingEdit(Request $request)
     {
-        if(request()->method()=='POST'){
+        if (request()->method() == 'POST') {
             $data = $request->except('_method', '_token');
-            return $this->dispensingService->save($data,auth('web-company')->user());
+            return $this->dispensingService->save($data, auth('web-company')->user());
 
-        }else{
-            $id = $request->input('id');
-            $user = auth('web-company')->user();
-            $where['id'] = $id;
-            $where['uid'] = $user->id;
+        } else {
+            $id             = $request->input('id');
+            $user           = auth('web-company')->user();
+            $where['id']    = $id;
+            $where['uid']   = $user->id;
             $dispensingInfo = $this->dispensingService->dispensingInfo($where);
-            if(!$dispensingInfo){
+            if (!$dispensingInfo) {
                 return $this->showMessage('没有这个需求!', route('com.dispensingList'), true);
             }
 
-            return view('app.company.company_dispensingEdit',['dispensing'=>$dispensingInfo]);
+            return view('app.company.company_dispensingEdit', ['dispensing' => $dispensingInfo]);
         }
     }
 
     public function dispensingDel(Request $request)
     {
-        $id = $request->id;
+        $id   = $request->id;
         $user = auth('web-company')->user();
         return $this->dispensingService->dispensingDel($id, $user);
     }

+ 34 - 0
public/themes/default/views/app/active/ajax/ajax_restaurant.blade.php

@@ -0,0 +1,34 @@
+@foreach($res as $key=>$val)
+    <div class="online2021_content">
+        <h3 class="substring">{{ $val['companyname'] or '' }}</h3>
+        <p class="online2021_line">
+            <span class="line_left">招聘岗位</span>
+            <span class="line_right more"><a href="{{route('jobs.company',['id'=>$val['id']])}}">更多>></a></span>
+        </p>
+        @for($i=0;$i<3;$i++)
+            <p class="online2021_line">
+                <span class="line_left">{{empty($val['jobs'][$i]) ? '' : $val['jobs'][$i]['jobs_name']}}</span>
+                <span class="line_right">
+                    @if(!empty($val['jobs'][$i]))
+                        @if($val['jobs'][$i]['wage'] == '-1')
+                            面议
+                        @else
+                            ¥{{$val['jobs'][$i]['wage_min']}}-{{$val['jobs'][$i]['wage_max']}}
+                        @endif
+                    @endif
+                </span>
+            </p>
+        @endfor
+        <p class="online2021_line end">
+            @foreach($val['tag_arr'] as $tag)
+                <span class="tag">{{$tag->demand}}</span>
+            @endforeach
+        </p>
+        <a href="{{route('jobs.company',['id'=>$val['id']])}}">
+            <div class="btn">
+                <img src="{{theme_asset('mobile/images/online2021/bg_btn.png')}}"/>
+                投递简历
+            </div>
+        </a>
+    </div>
+@endforeach

+ 306 - 0
public/themes/default/views/app/active/restaurant.blade.php

@@ -0,0 +1,306 @@
+@extends('module.layouts.content')
+
+@push('meta')
+
+@endpush
+
+@push('css')
+    <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
+    <link href="{{theme_asset('app/css/jobfair/newjobfair.css')}}" rel="stylesheet"/>
+    <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/company/company_ajax_dialog.css')}}"/>
+    <link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/common_ajax_dialog.css')}}"/>
+    <link href="{{theme_asset('app/css/jobs/jobs.css')}}" rel="stylesheet"/>
+    <style>
+        body {background: url('{{theme_asset("app/images/online2021/bg_list.jpg")}}');}
+        .header{width:100%;max-width: 1920px;min-width: 1200px;position: relative;z-index: 99;}
+        .header img{width:100%;max-width:1920px;margin:0 auto;display:block;}
+        .newjobfair {position: relative;top: -380px;}
+        .jobfair_detail_show {z-index: 100;position: relative;}
+    </style>
+@endpush
+
+@push('js')
+    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak={{ subsite_config('aix.system.map.map.map_ak') }}&s=1"></script>
+@endpush
+
+@section('content')
+    <div class="header">
+        <img src="{{theme_asset('app/images/online2021/list_header_2023.png')}}?v=3">
+    </div>
+    <div class="newjobfair">
+        <div class="com-se-filter" style="margin-top:0;padding-top: 200px;">
+
+
+        </div>
+
+        <div class="jobfair_detail_show">
+            <div class="tabs_show">
+                <div class="tabs_show_item" id="join_com" style="display: block">
+                    @if(count($res))
+                        <div class="load_more_body">
+                            @foreach($res as $key=>$val)
+                                <div class="online2021_content">
+                                    <h3 class="substring">{{ $val['companyname'] or '' }}</h3>
+                                    <p class="online2021_line">
+                                        <span class="line_left">招聘岗位</span>
+                                        <span class="line_right more"><a href="{{route('jobs.company',['id'=>$val['id']])}}">更多>></a></span>
+                                    </p>
+                                    @for($i=0;$i<3;$i++)
+                                        <p class="online2021_line">
+                                            <span class="line_left">{{empty($val['jobs'][$i]) ? '' : $val['jobs'][$i]['jobs_name']}}</span>
+                                            <span class="line_right">
+                                                @if(!empty($val['jobs'][$i]))
+                                                    @if($val['jobs'][$i]['wage'] == '-1')
+                                                        面议
+                                                    @else
+                                                        ¥{{$val['jobs'][$i]['wage_min']}}-{{$val['jobs'][$i]['wage_max']}}
+                                                    @endif
+                                                @endif
+                                            </span>
+                                        </p>
+                                    @endfor
+                                    <p class="online2021_line end">
+                                        @foreach($val['tag_arr'] as $tag)
+                                            <span class="tag">{{$tag->demand}}</span>
+                                        @endforeach
+                                    </p>
+                                    <a href="{{route('jobs.company',['id'=>$val['id']])}}">
+                                        <div class="btn">
+                                            <img src="{{theme_asset('mobile/images/online2021/bg_btn.png')}}" />
+                                            投递简历
+                                        </div>
+                                    </a>
+                                </div>
+                            @endforeach
+                        </div>
+                    @endif
+                        @if($more)
+                            <div class="load_more_footer">
+                                <span page="1" >加载更多</span>
+                            </div>
+                        @else
+                            <div class="load_more_footer">
+                                <span page="1" >-----没有更多了-----</span>
+                            </div>
+                        @endif
+                </div>
+            </div>
+        </div>
+
+
+
+    </div>
+@endsection
+@section('script')
+    <script type="text/javascript" src="{{theme_asset('app/js/jquery.jobslist.js')}}"></script>
+    <script type="text/javascript" src="{{theme_asset('app/js/jquery.highlight-3.js')}}"></script>
+    <script type="text/javascript" src="{{theme_asset('app/js/jquery.autocomplete.js')}}"></script>
+    <script>
+        $(function(){
+            // 搜索类型切换
+            $('.J_sli_jc').click(function() {
+                $(this).addClass('select').siblings().removeClass('select');
+                var indexValue = $('.J_sli_jc').index(this);
+                var typeValue = $.trim($(this).data('type'));
+                if (typeValue == 'company') {
+                    $('#ajax_search_location').attr('action', "{{route('jobs.companyList', array('list_type'=>'AIX_companylist'))}}");
+                    $('#company_hotword').show();
+                    $('#job_hotword').hide();
+                    $.getJSON("{{route('list.type')}}",{action:'hotword',type:2});
+                } else {
+                    $('#ajax_search_location').attr('action', "{{route('jobs', array('list_type'=>'AIX_jobslist'))}}");
+                    $('#job_hotword').show();
+                    $('#company_hotword').hide();
+                    $.getJSON("{{route('list.type')}}",{action:'hotword',type:1});
+                }
+                $('input[name="search_type"]').val(typeValue);
+            });
+
+
+            $('.com-sel-line').eq($('.com-sel-line').length-1).addClass('last');
+            if ($('.J_selected .slist').length) {
+                $('.J_selected').show();
+            }
+        });
+
+        var filter = {
+            expr: function(o){
+                var cls = this.replace(o.item || ".wf_element"),
+                    leftCls = this.replace(o.leftItem || ".wf_temp"),
+                    rightCls = this.replace(o.rightItem || ".wf_rank");
+                $.extend($.expr[':'],{
+                    node:function(a){
+                        return $(a).hasClass(cls);
+                    },
+                    leftNode: function(a){
+                        return $(a).hasClass(leftCls);
+                    },
+                    rightNode: function(a){
+                        return $(a).hasClass(rightCls);
+                    }
+                });
+            },
+            replace: function(cls){
+                var regExp = /[.#]/g,
+                    whitespace = /\s/g;
+                if(whitespace.test(cls)){
+                    cls = cls.split(' ')[0];
+                }
+                return cls.replace(regExp, '');
+            }
+        }
+        function Waterfall(o){
+            this.target = o.target || $('#waterfall_main');
+            this.targetItem = o.targetItem || '.wf_box';
+            this.colWidth = o.colWidth || 0;
+            this.colCount = o.colCount || 4;
+            filter.expr(o);
+            this.init();
+        }
+        Waterfall.prototype = {
+            init:function(){
+                var self = this,
+                    col = [],
+                    nodes = self.target.find(":node"),
+                    leftNodes = self.target.find(":leftNode"),
+                    rightNodes = self.target.find(":rightNode"),
+                    nodeLen = nodes.length,
+                    leftLen = leftNodes.length,
+                    rightLen = rightNodes.length;
+                for(var i = 0; i < self.colCount; i++){
+                    col[i] = 0;
+                    if(i == 0 && leftLen){
+                        for(var j = 0; j < leftLen; j++){
+                            col[i] += leftNodes.eq(j).outerHeight(true);
+                        }
+                    }
+                    if(i == self.colCount - 1 && rightLen){
+                        for(var j = 0; j < rightLen; j++){
+                            col[i] += rightNodes.eq(j).outerHeight(true);
+                        }
+                    }
+                }
+                nodes.each(function(){
+                    this.h = $(this).outerHeight(true);
+                    if($(this).hasClass(filter.replace(self.targetItem))){
+                        var ming = self.getMinCol(col);
+                        $(this).css({"left": ming * self.colWidth, "top": col[ming]});
+                        col[ming] += this.h;
+                    }
+                });
+                self.target.css('height', self.maxHeight(col));
+            },
+            setColWidth:function(wid){
+                this.colWidth = wid;
+            },
+            setColCount:function(col){
+                this.colCount = col;
+            },
+            maxHeight:function(arr){
+                var len = arr.length,temp = arr[0];
+                for(var i= 1; i < len; i++){
+                    if(temp < arr[i]){
+                        temp = arr[i];
+                    }
+                }
+                return temp;
+            },
+            getMinCol:function(arr){
+                var ca = arr,cl = ca.length,temp = ca[0],minc = 0;
+                for(var ci = 0; ci < cl; ci++){
+                    if(temp > ca[ci]){
+                        temp = ca[ci];
+                        minc = ci;
+                    }
+                }
+                return minc;
+            }
+        };
+
+        var content = $('#waterfall_main');
+        var item = content.find('.wf_element'),
+            itemWidth = item.outerWidth(),/*取瀑布流元素宽*/
+            contentWidth = 1162, /*取容器宽*/
+            list_sum = parseInt(contentWidth / itemWidth),
+            list_sum_margin = list_sum - 1, /*取元素间距的值*/
+            left = (contentWidth - itemWidth * list_sum) / list_sum_margin;
+        if(itemWidth * list_sum > contentWidth){
+            list_sum -= 1;
+            left = contentWidth - itemWidth * list_sum;
+        }
+        var colWidth = itemWidth + left;
+        var waterfall = new Waterfall({
+            //设定列宽度
+            "colWidth": colWidth,
+            //设定显示列数
+            "colCount": 2
+        });
+        content.on('mouseenter', '.wf_box', function(){
+            $(this).addClass('wf_hov');
+        }).on('mouseleave', '.wf_box', function(){
+            $(this).removeClass('wf_hov');
+        });
+
+        @if($more)
+        /**
+         * 监听网页滚动事件
+         */
+        var f = true;
+
+
+        $(window).on("scroll",function () {
+            var isShow = $("#join_com").is(":visible");
+            if($(".load_more_footer span").hasClass("end")){
+                return false;
+            }
+            var h = document.documentElement.clientHeight || document.body.clientHeight;
+            var sh = document.documentElement.scrollTop || document.body.scrollTop;
+            var t1 = document.querySelector(".load_more_footer").offsetTop- sh;
+            //可视区域
+            if (t1 < h && isShow  && f ) {
+                s();
+            }
+        });
+        var s = function () {
+            var page = $(".load_more_footer span").attr('page');
+            @if (array_has($params, 'citycategory'))
+                var city = '{{array_get($params, 'citycategory')}}';
+            @else
+                var city = ''
+            @endif
+            @if (array_has($params, 'trade'))
+            var trade = '{{array_get($params, 'trade')}}';
+                    @else
+            var trade = ''
+            @endif
+            $.ajax({
+                type:"get",
+                url:"{{ route('active.jobfair.spring') }}",
+                data:{
+                    page:page,
+                    citycategory:city,
+                    trade:trade
+                },
+                beforeSend:function () {
+                    f = false;
+                    $(".load_more_footer span").html('正在加载').addClass("loading");
+                },
+                success:function (result) {
+                    if(result.status==1){
+                        $(".load_more_body").append(result.data);
+                        $(".load_more_footer span").attr('page',parseInt(page)+1);
+                        $(".load_more_footer span").html('加载更多').removeClass("loading");
+                        waterfall.init();
+                    }else {
+                        $(".load_more_footer span").html('-----没有更多了-----').removeClass("loading").addClass("end");
+                    }
+                },
+                complete:function () {
+                    f = true;
+                }
+            })
+        }
+        @endif
+
+    </script>
+@endsection

+ 12 - 3
public/themes/default/views/app/company/company_index.blade.php

@@ -137,6 +137,11 @@
                                 |<a href="{{ route('com.security') }}" class="btns btn3 ok">邮箱已认证</a>
                             @else
                                 |<a href="{{ route('com.security') }}" class="btns btn3">邮箱未认证</a>
+                            @endif
+                                @if($user->is_restaurant == 1)
+                                    |<a href="javascript:void(0);" data-status="2" class="join btns ok">退出薪动餐饮</a>
+                                @else
+                                    |<a href="javascript:void(0);" data-status="1" class="join btns ok">参加薪动餐饮</a>
                             @endif
                             {{--TODO 微信认证--}}
                         </div>
@@ -288,7 +293,14 @@
     <script type="text/javascript" src="{{ theme_asset('app/js/company/fusioncharts/fusioncharts.theme.fint.js') }}"></script>
     <script type="text/javascript" src="{{theme_asset('app/lib/layui-v2.5.4/layui.all.js')}}"></script>
     <script>
+
         $(function () {
+            $('.join').click(function(){
+                var status = $(this).data('status');
+                $.get("{{ route('com.join') }}",{status:status},function(data){
+                    location.reload();
+                },'json')
+            });
             $.ajax({
                 headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
                 url: "{{ route('com.ajaxSms') }}",
@@ -468,9 +480,6 @@
                 return false;
             }
         });
-        
-        
-        
 
     </script>
 @endsection

+ 34 - 0
public/themes/default/views/mobile/app/active/ajax/ajax_restaurant.blade.php

@@ -0,0 +1,34 @@
+@foreach($res as $key=>$val)
+    <div class="online2021_content">
+        <h3 class="substring">{{ $val['companyname'] or '' }}</h3>
+        <p class="online2021_line">
+            <span class="line_left substring">招聘岗位</span>
+            <span class="line_right more"><a href="{{route('mobile.jobs.company',['id'=>$val['id']])}}">更多>></a></span>
+        </p>
+        @for($i=0;$i<3;$i++)
+            <p class="online2021_line">
+                <span class="line_left substring">{{empty($val['jobs'][$i]) ? '' : $val['jobs'][$i]['jobs_name']}}</span>
+                <span class="line_right substring">
+                    @if(!empty($val['jobs'][$i]))
+                        @if($val['jobs'][$i]['wage'] == '-1')
+                            面议
+                        @else
+                            ¥{{$val['jobs'][$i]['wage_min']}}-{{$val['jobs'][$i]['wage_max']}}
+                        @endif
+                    @endif
+                </span>
+            </p>
+        @endfor
+        <p class="online2021_line end">
+            @foreach($val['tag_arr'] as $tag)
+                <span class="tag">{{$tag->demand}}</span>
+            @endforeach
+        </p>
+        <a href="{{route('mobile.jobs.company',['id'=>$val['id']])}}">
+            <div class="btn">
+                <img src="{{theme_asset('mobile/images/online2021/bg_btn.png')}}"/>
+                投递简历
+            </div>
+        </a>
+    </div>
+@endforeach

+ 182 - 0
public/themes/default/views/mobile/app/active/restaurant.blade.php

@@ -0,0 +1,182 @@
+@extends('mobile.module.layouts.empty')
+
+@push('meta')
+
+@endpush
+
+@push('css')
+    <link rel="stylesheet" href="{{theme_asset('mobile/css/online2021_special.css')}}">
+    <link href="{{ theme_asset('mobile/css/jobs.css') }}" rel="stylesheet">
+    <style>
+        .drop_content a{color: #666666;text-decoration: none;}
+        .con-filter .f-box.f-box-trade{
+            height: 8.7rem;
+        }
+        .con-filter .f-box-trade div.f-box-inner{
+            height: 7rem;
+        }
+        .load_more_footer{
+            width: 100%;
+            text-align: center;
+            line-height: 1rem;
+            color:white;
+        }
+        .bottom-nav-bar .nav-bar-cell .bar-cell {
+            width: 33.3%;
+        }
+    </style>
+@endpush
+
+@push('js')
+    <script src="{{ theme_asset('mobile/js/dropload.min.js') }}"></script>
+@endpush
+@section('content')
+    <div class="online2021_header">
+        <img src="{{theme_asset('mobile/images/spring/header_2023.jpg')}}?v=3">
+    </div>
+    <div class="online2021_title">
+        <p>{{$title}}</p>
+    </div>
+    <div id="join_com" style="position: relative;top: -40px;">
+        @if(count($res))
+            <div class="load_more_body">
+                @foreach($res as $key=>$val)
+                    <div class="online2021_content">
+                        <h3 class="substring">{{ $val['companyname'] or '' }}</h3>
+                        <p class="online2021_line">
+                            <span class="line_left">招聘岗位</span>
+                            <span class="line_right more"><a href="{{route('mobile.jobs.company',['id'=>$val['id']])}}">更多>></a></span>
+                        </p>
+                        @for($i=0;$i<3;$i++)
+                        <p class="online2021_line">
+                            <span class="line_left substring">{{empty($val['jobs'][$i]) ? '' : $val['jobs'][$i]['jobs_name']}}</span>
+                            <span class="line_right substring">
+                            @if(!empty($val['jobs'][$i]))
+                                @if($val['jobs'][$i]['wage'] == '-1')
+                                    面议
+                                @else
+                                        ¥{{$val['jobs'][$i]['wage_min']}}-{{$val['jobs'][$i]['wage_max']}}
+                                @endif
+                            @endif
+                            </span>
+                        </p>
+                        @endfor
+                        <p class="online2021_line end">
+                            @foreach($val['tag_arr'] as $tag)
+                                <span class="tag">{{$tag->demand}}</span>
+                            @endforeach
+                        </p>
+                        <a href="{{route('mobile.jobs.company',['id'=>$val['id']])}}">
+                            <div class="btn">
+                                <img src="{{theme_asset('mobile/images/online2021/bg_btn.png')}}" />
+                                投递简历
+                            </div>
+                        </a>
+                    </div>
+                @endforeach
+            </div>
+        @endif
+
+        @if($more)
+            <div class="load_more_footer">
+                <span page="1" >加载更多</span>
+            </div>
+        @else
+            <div class="load_more_footer">
+                <span page="1" >-----没有更多了-----</span>
+            </div>
+        @endif
+    </div>
+    @include('mobile.module.section.online_footer')
+
+
+    <script type="text/javascript" src="{{theme_asset('mobile/js/QSfilter.js')}}"></script>
+    <script type="text/javascript" src="{{theme_asset('mobile/js/qsCategory.js')}}"></script>
+    <script type="text/javascript" charset="utf-8" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
+    <script src="{{ theme_asset('mobile/js/dropload.min.js') }}"></script>
+    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak={{subsite_config('aix.system.map.map.map_ak')}}&s=1"></script>
+@endsection
+@section('script')
+    <script>
+        function goPage() {
+            var toSearchPage = "{{route('mobile.active.spring_special')}}";
+            window.location.href = toSearchPage + '?'+$('#searchForm').serialize();
+        }
+
+        // 除更多和读取缓存之外的下拉列表
+        $('.f-item-normal').on('click', function () {
+            var thisType = $(this).data('type');
+            var thisTitle = $(this).data('title');
+            var thisCode = $(this).data('code');
+            $('.f-normal-code-' + thisType).val(thisCode);
+            $('.f-normal-txt-' + thisType).text(thisTitle);
+            $('body').removeClass('filter-fixed');
+            $('.f-box-' + thisType).addClass('qs-hidden');
+            $('.js-filter').removeClass('active');
+            $('#f-mask').hide();
+            goPage();
+        });
+
+        // 点击筛选
+        $('#f-do-filter').on('click', function () {
+            goPage();
+        });
+        $('.js-filter').on('click', function () {
+            $('.f-more-content').removeClass('qs-actionsheet-toggle');
+            $('.f-box-more').removeClass('qs-actionsheet-toggle-left');
+            var filter = new QSfilter($(this));
+            document.getElementById('f-mask').ontouchstart = function(e){ e.preventDefault(); }
+        });
+
+        @if($more)
+        /**
+         * 监听网页滚动事件
+         */
+        var f = true;
+
+
+        $(window).on("scroll",function () {
+            var isShow = true;//$("#join_com").is(":visible");
+            if($(".load_more_footer span").hasClass("end")){
+                return false;
+            }
+            var h = document.documentElement.clientHeight || document.body.clientHeight;
+            var sh = document.documentElement.scrollTop || document.body.scrollTop;
+            var t1 = document.querySelector(".load_more_footer").offsetTop- sh;
+            //可视区域
+            if (t1 < h && isShow  && f ) {
+                s();
+            }
+        });
+        var s = function () {
+            var page = $(".load_more_footer span").attr('page');
+            $.ajax({
+                type:"get",
+                url:"{{ route('mobile.active.spring_special',$params) }}",
+                data:{
+                    page:page
+                },
+                beforeSend:function () {
+                    f = false;
+                    $(".load_more_footer span").html('正在加载').addClass("loading");
+                },
+                success:function (result) {
+                    if(result.status==1){
+                        $(".load_more_body").append(result.data);
+                        // console.log(result.data);
+                        $(".load_more_footer span").attr('page',parseInt(page)+1);
+                        $(".load_more_footer span").html('加载更多').removeClass("loading");
+                    }else {
+                        $(".load_more_footer span").html('-----没有更多了-----').removeClass("loading").addClass("end");
+                    }
+
+                },
+                complete:function () {
+                    f = true;
+                }
+            })
+        }
+        @endif
+
+    </script>
+@endsection

+ 2 - 0
routes/mobile.php

@@ -99,6 +99,8 @@ Route::group([
         $router->get('spring_jkq_login', 'Mobile\Active\SpringController@jkq_login')->name('mobile.active.spring_jkq_login');
         $router->get('spring_jkq_wechat_back', 'Mobile\Active\SpringController@jkq_wechat_back')->name('mobile.active.spring_jkq_wechat_back');
         $router->get('spring_special/live', 'Mobile\Active\SpringController@special_live')->name('mobile.active.spring_special_live');
+        //薪动餐饮
+        $router->get('restaurant', 'Mobile\Active\SpringController@restaurant')->name('mobile.active.restaurant');
 
         /*泉职大*/
         $router->any('quanzhida', 'Mobile\Active\QuanzhidaController@index')->name('mobile.quanzhida');

+ 2 - 0
routes/web.php

@@ -22,6 +22,7 @@ Route::get('home/declare', 'Web\HomeController@declare')->name('declare'); //优
 //新春招聘会
 Route::get('active/jobfair/online2020', 'Web\Active\JobfairController@online2020')->name('active.jobfair.online2020');
 Route::get('active/jobfair/spring', 'Web\Active\JobfairController@spring')->name('active.jobfair.spring');
+Route::get('active/jobfair/restaurant', 'Web\Active\JobfairController@restaurant')->name('active.jobfair.restaurant'); //薪动餐饮
 Route::get('active/jobfair/spring_main', 'Web\Active\JobfairController@spring_main')->name('active.jobfair.spring_main');
 Route::get('active/jobfair/spring_jkq', 'Web\Active\JobfairController@spring_jkq')->name('active.jobfair.spring_jkq');
 Route::get('active/jobfair/ai_recruit', 'Web\Active\JobfairController@ai_recruit')->name('active.jobfair.ai_recruit');
@@ -462,6 +463,7 @@ Route::group([
 
             Route::group(['middleware'=>'companyAuth'],function (Router $router){
                 $router->get('com/index','Web\Company\CompanyController@index')->name('com.index');//会员中心
+                $router->get('com/join','Web\Company\CompanyController@join')->name('com.join');//会员中心
 
                 $router->post('com/ajax_sms', 'Web\Company\CompanyController@ajaxSms')->name('com.ajaxSms');//获取企业消息。