Browse Source

Merge remote-tracking branch 'origin/master'

zmw 4 months ago
parent
commit
3cf568f31c

+ 93 - 0
app/Http/Controllers/Api/Config/BiController.php

@@ -14,6 +14,15 @@ use Illuminate\Support\Facades\DB;
 
 class BiController extends ApiBaseController
 {
+    public function __construct()
+    {
+        header('Access-Control-Allow-Origin:*');
+        header('Access-Control-Allow-Methods:GET,POST,PUT,DELETE');
+        header('Access-Control-Allow-Headers:Origin, Content-Type, Cookie, Accept, X-CSRF-TOKEN');
+        header('Access-Control-Allow-Credentials:true');
+
+    }
+
     public function jkq()
     {
         $data = [];
@@ -405,6 +414,90 @@ class BiController extends ApiBaseController
         return response()->json($data);
     }
 
+    public function company()
+    {
+        $data = [];
+        //企业数和岗位数
+        $company_count       = Company::count();
+        $job_count           = Jobs::count();
+        $data['total_count'] = [
+            ['name' => '企业数', 'count' => $company_count],
+            ['name' => '岗位数', 'count' => $job_count]
+        ];
+
+        //企业所属行业
+        $company_trade_data  = Company::select(['trade', DB::raw('count(trade) as count')])->groupBy('trade')->get();
+        $company_trade       = [];
+        $company_trade_other = 0;
+        foreach ($company_trade_data as $v) {
+            switch ($v['trade']) {
+                case 11:
+                    $company_trade[] = ['name' => '贸易/进出口', 'count' => $v['count']];
+                    break;
+                case 13:
+                    $company_trade[] = ['name' => '消费品(食/饮/烟酒)', 'count' => $v['count']];
+                    break;
+                case 14:
+                    $company_trade[] = ['name' => '服装/纺织/皮革', 'count' => $v['count']];
+                    break;
+                case 19:
+                    $company_trade[] = ['name' => '制药/生物工程', 'count' => $v['count']];
+                    break;
+                case 21:
+                    $company_trade[] = ['name' => '医疗设备/器械', 'count' => $v['count']];
+                    break;
+                case 36:
+                    $company_trade[] = ['name' => '酒店/旅游', 'count' => $v['count']];
+                    break;
+                case 37:
+                    $company_trade[] = ['name' => '交通/运输/物流', 'count' => $v['count']];
+                    break;
+                default:
+                    $company_trade_other += $v['count'];
+                    break;
+            }
+        }
+        $company_trade[]       = ['name' => '其他', 'count' => $company_trade_other];
+        $data['company_trade'] = $company_trade;
+
+        //企业需求工种
+        $job_category_data  = Jobs::select(['topclass', DB::raw('count(topclass) as count')])->groupBy('topclass')->get();
+        $job_category       = [];
+        $job_category_other = 0;
+        foreach ($job_category_data as $v) {
+            switch ($v['topclass']) {
+                case 1:
+                    $job_category[] = ['name' => '销售|市场|客服|贸易', 'count' => $v['count']];
+                    break;
+                case 74:
+                    $job_category[] = ['name' => '计算机|通信', 'count' => $v['count']];
+                    break;
+                case 96:
+                    $job_category[] = ['name' => '服装/纺织/皮革', 'count' => $v['count']];
+                    break;
+                case 116:
+                    $job_category[] = ['name' => '生产|质管|技工', 'count' => $v['count']];
+                    break;
+                case 136:
+                    $job_category[] = ['name' => '电子|电气|能源|化工', 'count' => $v['count']];
+                    break;
+                case 225:
+                    $job_category[] = ['name' => '医疗|制药|环保', 'count' => $v['count']];
+                    break;
+                case 258:
+                    $job_category[] = ['name' => '学生|社工|科研|农业|其他', 'count' => $v['count']];
+                    break;
+                default:
+                    $job_category_other += $v['count'];
+                    break;
+            }
+        }
+        $job_category[]       = ['name' => '其他', 'count' => $job_category_other];
+        $data['job_category'] = $job_category;
+
+        return response()->json($data);
+    }
+
     private function _valueToKey($arr, $key)
     {
         $res = [];

+ 9 - 14
app/Http/Controllers/Mobile/Health/RecruitController.php

@@ -42,7 +42,7 @@ class RecruitController extends MobileBaseController
         $categories   = $this->categoryService->getCategories($filter_where);     //过滤条件信息
 
         //默认参数
-        $param_array = ['health_type', 'keyword', 'wage', 'experience', 'education'];
+        $param_array = ['keyword', 'wage', 'experience', 'education'];
         $params      = [];
         if ($request->all()) {
             foreach ($request->all() as $k => $v) {
@@ -69,12 +69,6 @@ class RecruitController extends MobileBaseController
         if (!empty($params['education'])) {
             $where[] = ['education', '=', $params['education']];
         }
-        if (!empty($params['health_type'])) {
-            $where[] = ['health_type', '=', $params['health_type']];
-        } else {
-            $where[]               = ['health_type', '=', 1];
-            $params['health_type'] = 1;
-        }
 
         $list = Jobs::where($where)->orderBy('updated_at', 'desc')->paginate($size);
         if ($list->total() > 0) {
@@ -142,7 +136,7 @@ class RecruitController extends MobileBaseController
 
     public function quanjiSave(Request $request)
     {
-        $field = [
+        $empty_check = [
             'realname'     => '姓名',
             'sex'          => '性别',
             'mobile'       => '联系方式',
@@ -150,15 +144,16 @@ class RecruitController extends MobileBaseController
             'native_place' => '籍贯',
             'education'    => '学历',
             'school'       => '毕业学校',
-            'dep'          => '院系',
             'pro_type'     => '专业',
-            'pro_text'     => '具体专业',
-            'title'        => '在校任职',
-            'attachment'   => '简历',
             'remark'       => '求职意向',
         ];
-        $data  = $request->only(array_keys($field));
-        foreach ($field as $k => $v) {
+        $field       = array_merge($empty_check, [
+            'pro_text'   => '具体专业',
+            'title'      => '在校任职',
+            'attachment' => '简历',
+        ]);
+        $data        = $request->only(array_keys($field));
+        foreach ($empty_check as $k => $v) {
             if (empty($data[$k])) {
                 return response()->json(['status' => 0, 'msg' => $v . '不能为空']);
             }

+ 23 - 9
app/Http/Controllers/Mobile/Ic/IndexController.php

@@ -4,30 +4,44 @@ namespace App\Http\Controllers\Mobile\Ic;
 
 use App\Http\Controllers\Mobile\MobileBaseController;
 use App\Models\Article;
+use App\Models\Jobs;
+use App\Services\Company\JobsService;
 
 class IndexController extends MobileBaseController
 {
+    protected $jobsService;
+
+    /**
+     * JobsController constructor.
+     * @param $categoryService
+     */
+    public function __construct( JobsService $jobsService)
+    {
+        $this->jobsService     = $jobsService;
+    }
+
     public function index()
     {
         //引才动态
-        $attract_list = Article::where('type_id',65)
+        $attract_list = Article::where('type_id',67)
             ->where('is_display',1)
             ->orderBy('list_order','desc')
             ->orderBy('id','desc')
             ->limit(5)
             ->get();
 
-        //晋卫咨询
-        $gongzhonghao_list = Article::where('type_id',66)
-            ->where('is_display',1)
-            ->orderBy('list_order','desc')
-            ->orderBy('id','desc')
-            ->limit(5)
-            ->get();
+        //招聘列表
+        $size  = 10;
+        $list = Jobs::where('is_ic',1)->orderBy('updated_at', 'desc')->limit(5)->get();
+        if ($list->isEmpty()) {
+            $recruit_list = [];
+        } else {
+            $recruit_list = $this->jobsService->dealjobFilelds($list);
+        }
 
         return view('mobile.app.ic.index',[
             'attract_list'=>$attract_list,
-            'gongzhonghao_list'=>$gongzhonghao_list,
+            'recruit_list'=>$recruit_list,
         ]);
     }
 

BIN
public/themes/default/assets/mobile/images/ic/index_header.jpg


+ 3 - 0
public/themes/default/views/mobile/app/health/jinjiang.blade.php

@@ -841,6 +841,9 @@
             let id = $(this).data('id');
             $('.module-box').hide();
             $('#'+id).show();
+            player.pause();
+            player1.pause();
+            player2.pause();
         });
     </script>
 @endsection

+ 3 - 12
public/themes/default/views/mobile/app/health/recruit/quanji.blade.php

@@ -130,15 +130,6 @@
             <div class="arrow"></div>
             <div class="clear"></div>
         </div>
-        <div class="list_height plist-txt notarrow">
-            <div class="pic"></div>
-            <div class="tit font14">院系<span class="font_red_light">*</span></div>
-            <div class="describe font13">
-                <input type="text" id="dep" name="dep" placeholder="请输入院系"  value="">
-            </div>
-            <div class="arrow"></div>
-            <div class="clear"></div>
-        </div>
         <div class="list_height plist-txt js-actionParent">
             <div class="pic"></div>
             <div class="tit font14">专业<span class="font_red_light">*</span></div>
@@ -169,7 +160,7 @@
         </div>
         <div class="list_height plist-txt notarrow">
             <div class="pic"></div>
-            <div class="tit font14">具体专业<span class="font_red_light">*</span></div>
+            <div class="tit font14">具体专业</div>
             <div class="describe font13">
                 <input type="text" id="pro_text" name="pro_text" placeholder="请输入具体专业"  value="">
             </div>
@@ -178,7 +169,7 @@
         </div>
         <div class="list_height plist-txt notarrow">
             <div class="pic"></div>
-            <div class="tit font14">在校任职<span class="font_red_light">*</span></div>
+            <div class="tit font14">在校任职</div>
             <div class="describe font13">
                 <input type="text" id="title" name="title" placeholder="请输入在校担任职务" value="">
             </div>
@@ -187,7 +178,7 @@
         </div>
         <div class="list_height form-item">
             <div class="pic"></div>
-            <div class="tit font14">简历<span class="font_red_light">*</span></div>
+            <div class="tit font14">简历</div>
             <div class="describe font13">
                 <span id="uploadPicButton">双击上传文件</span>
                 <input type="file" id="uploadFile" accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,text/plain,application/pdf" style="display: none;">

+ 31 - 27
public/themes/default/views/mobile/app/ic/attract/ajax_attract_list.blade.php

@@ -1,30 +1,34 @@
 @if($articles->total())
     @foreach($articles as $k=>$v)
-        <div class="news-list-item for-event" onclick="window.location='{{route("mobile.ic.attract.show",["id"=>$v->id])}}';">
-            <div class="news-info">
-                <div class="thumbnail">
-                    @if($v->small_img)
-                        <img src="{{upload_asset($v->small_img)}}?{{time()}}" border="0">
-                    @else
-                        <img src="{{theme_asset('mobile/images/no_img_news.png')}}?{{time()}}" border="0">
-                    @endif
-                </div>
-                <div class="info">
-                    <div class="line-one substring">{!! $v->title !!}</div>
-                    <div class="line-two font12 substring">
-                        <div>&nbsp;</div>
-                    </div>
-                    <div class="line-three font12">
-                        {!!  cut_str(strip_tags(htmlspecialchars_decode($v->content,ENT_QUOTES)),'130',0,'...') !!}
+        @if(empty($v['is_url']))
+            <div class="news-list-item for-event" onclick="location.href='{{route("mobile.health.attract.show",["id"=>$v->id])}}';">
+                @else
+                    <div class="news-list-item for-event" onclick="location.href='{{$v['is_url']}}';">
+                        @endif
+                        <div class="news-info">
+                            <div class="thumbnail">
+                                @if($v->small_img)
+                                    <img src="{{upload_asset($v->small_img)}}?{{time()}}" border="0">
+                                @else
+                                    <img src="{{theme_asset('mobile/images/no_img_news.png')}}?{{time()}}" border="0">
+                                @endif
+                            </div>
+                            <div class="info">
+                                <div class="line-one substring">{!! $v->title !!}</div>
+                                <div class="line-two font12 substring">
+                                    <div>&nbsp;</div>
+                                </div>
+                                <div class="line-three font12">
+                                    {!!  cut_str(strip_tags(htmlspecialchars_decode($v->content,ENT_QUOTES)),'130',0,'...') !!}
+                                </div>
+                            </div>
+                            <div class="clear"></div>
+                        </div>
                     </div>
-                </div>
-                <div class="clear"></div>
-            </div>
-        </div>
-        <div class="list-split-block"></div>
-    @endforeach
-@else
-    <div class="list-empty link_blue">
-        抱歉,暂时没有找到相关资讯!
-    </div>
-@endif
+                    <div class="list-split-block"></div>
+                    @endforeach
+                    @else
+                        <div class="list-empty link_blue">
+                            抱歉,暂时没有找到相关资讯!
+                        </div>
+        @endif

+ 74 - 36
public/themes/default/views/mobile/app/ic/index.blade.php

@@ -5,6 +5,8 @@
 
 @push('css')
     <link href="{{ theme_asset('mobile/css/index.css') }}" rel="stylesheet">
+    <link href="{{ theme_asset('mobile/css/common.css') }}" rel="stylesheet">
+    <link href="{{ theme_asset('mobile/css/jobs.css') }}" rel="stylesheet">
     <style>
         .swiper-container,.swiper-container img{
             width: 100%;
@@ -19,15 +21,13 @@
         .nav.green {background: linear-gradient(135deg, #a8e063, #56ab2f);}
         .nav.black {background: linear-gradient(135deg, #292a3a, #536976);}
 
-        .module-title .module-title-nav {width: 100%;}
+        .module-title .module-title-nav {width: 50%;}
     </style>
     <link href="{{ theme_asset('app/css/swiper.min.css') }}" rel="stylesheet">
-    <link href="https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.min.css" rel="stylesheet"/>
 @endpush
 
 @push('js')
 
-    <script src="https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js"></script>
 @endpush
 
 @section('content')
@@ -50,42 +50,88 @@
         </div>
     </div>
 {{--    导航按钮--}}
-    <div class="nav-list">
-        <a href="{{route('mobile.ic.jinjiang')}}" class="nav blue">认识晋江</a>
-        <a href="{{route('mobile.ic.hospital.index')}}" class="nav red">园区概况</a>
-        <a href="{{route('mobile.ic.recruit.list')}}" class="nav yellow">招聘列表</a>
-        <a href="{{route('mobile.ic.teach.index')}}" class="nav purple">宣讲会/招聘会报名</a>
-        <a href="https://rcmap.jucai.gov.cn/mobile/pages/policy/search" class="nav green">人才服务</a>
-        <a href="https://lw_test.jinjianghc.com/mobile/jfm/policy1.html?type=3" class="nav black">人才政策</a>
-    </div>
+{{--    <div class="nav-list">--}}
+{{--        <a href="{{route('mobile.ic.jinjiang')}}" class="nav blue">认识晋江</a>--}}
+{{--        <a href="{{route('mobile.ic.hospital.index')}}" class="nav red">园区概况</a>--}}
+{{--        <a href="{{route('mobile.ic.recruit.list')}}" class="nav yellow">招聘列表</a>--}}
+{{--        <a href="{{route('mobile.ic.teach.index')}}" class="nav purple">宣讲会/招聘会报名</a>--}}
+{{--        <a href="https://rcmap.jucai.gov.cn/mobile/pages/policy/search" class="nav green">人才服务</a>--}}
+{{--        <a href="https://lw_test.jinjianghc.com/mobile/jfm/policy1.html?type=3" class="nav black">人才政策</a>--}}
+{{--    </div>--}}
 
 <!--新闻-->
-<div class="module">
+<div class="module" style="margin-top:0;">
     <div class="module-title font14">
-        <a href="javascript:;" class="module-title-nav font14 active f-left" data-id="emergency">引才动态</a>
-{{--        <a href="javascript:;" class="module-title-nav font14 f-left" data-id="gongzhonghao">晋卫资讯</a>--}}
+        <a href="javascript:;" class="module-title-nav font14 active f-left" data-id="recruit">招聘列表</a>
+        <a href="javascript:;" class="module-title-nav font14 f-left" data-id="emergency">引才资讯</a>
         <div class="clear"></div>
     </div>
-    <div class="mobile_index_news module-box" id="emergency">
+    <div class="module-box" id="recruit">
+            @foreach($recruit_list as $key => $val)
+                <a href="{{route("mobile.ic.recruit.show", ["id"=>$val->id])}}">
+                    <div class="job-list-item for-event">
+                        <div class="info">
+                            <div class="line-one">
+                                <div class="job-name substring font16">
+                                    {{$val->jobs_name}}
+                                    @if($val->emergency==1)
+                                        <img src="{{theme_asset('mobile/images/231.png')}}"/>
+                                    @endif
+                                </div>
+
+                                <div class="refresh-time font12 font_red_light">{!! daterange(time(), $val->refresh_time, 'Y-m-d', "#FF3300") !!}</div>
+                                <div class="clear"></div>
+                            </div>
+                            <div class="line-two font14">
+                                <div class="salary">{{$val->wage_cn}}</div>
+                                <div class="category font_gray6 substring">{{$val->category_cn}}</div>
+                                <div class="clear"></div>
+                            </div>
+                            @if($val->tag_cn)
+                                <div class="line-three fontag">
+                                    @foreach($val->tag_cn as $k => $v)
+                                        @if($k<=2)
+                                            <div class="job-tag tg{{$k+1}}">{{$v}}</div>
+                                        @endif
+                                    @endforeach
+                                    <div class="clear"></div>
+                                </div>
+                            @else
+                                <div class="line-four font_gray6 font13">
+                                    {{$val->education_cn}} / {{$val->experience_cn}} / 年龄{{$val->age_cn}}
+                                </div>
+                            @endif
+                            <div class="apply-btn">申请</div>
+                        </div>
+                        <div class="company font13">
+                            <div class="company-name font_gray6 substring">
+                                {{$val->company_name}}
+                            </div>
+                            <div class="district font_gray6 substring">
+                                {{$val->district_cn}}
+                            </div>
+                            <div class="clear"></div>
+                        </div>
+                    </div>
+                    <div class="list-split-block"></div>
+                </a>
+            @endforeach
+            <div onclick="window.location='{{route("mobile.ic.recruit.list")}}';" style="text-align:center;height:.8rem;line-height:.8rem;background:#fff;">查看更多</div>
+    </div>
+    <div class="mobile_index_news module-box" id="emergency" style="display: none;">
         <ul>
             <li>
                 @foreach($attract_list as $v)
-                    <a href="{{route("mobile.ic.attract.show")}}?id={{$v['id']}}" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v['title'], 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v['created_at']))}}</span></a>
+                    @if(empty($v['is_url']))
+                        <a href="{{route("mobile.ic.attract.show")}}?id={{$v['id']}}" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v['title'], 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v['created_at']))}}</span></a>
+                    @else
+                        <a href="{{$v['is_url']}}" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v['title'], 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v['created_at']))}}</span></a>
+                    @endif
                 @endforeach
             </li>
         <div onclick="window.location='{{route("mobile.ic.attract.index")}}';" style="text-align:center;height:.8rem;line-height:.8rem;background:#fff;">查看更多</div>
         </ul>
     </div>
-{{--    <div class="mobile_index_news module-box" id="gongzhonghao" style="display: none;">--}}
-{{--        <ul>--}}
-{{--            <li>--}}
-{{--                @foreach($gongzhonghao_list as $v)--}}
-{{--                    <a href="{{$v['is_url']}}" rel="nofollow noopener noreferrer"><b>&gt;</b>{{cut_str($v['title'], 15, 0, '...')}}<span class="jc_rt">{{date('Y-m-d',strtotime($v['created_at']))}}</span></a>--}}
-{{--                @endforeach--}}
-{{--            </li>--}}
-{{--            <div onclick="window.location='{{route("mobile.ic.gongzhonghao.index")}}';" style="text-align:center;height:.8rem;line-height:.8rem;background:#fff;">查看更多</div>--}}
-{{--        </ul>--}}
-{{--    </div>--}}
 </div>
 <!--新闻 end-->
 @endsection
@@ -93,21 +139,13 @@
 @section('script')
 {{--    <script type="text/javascript" src="{{theme_asset('app/js/swiper.min.js')}}"></script>--}}
     <script>
-        var player = TCPlayer('player-container-id', {
-            sources: [{
-                src: '{{ theme_asset('mobile/021622e9b328fade2c7a0f394440fe38.mp4') }}?v=1', // 播放地址
-            }],
-            autoplay: true,
-            licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1251164517_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
-            posterImage: true,
-            bigPlayButton: true,
-            poster: "{{ theme_asset('mobile/images/health_thumb.jpg') }}",
-        });
+
         //    初始化SWiper
         // var mySwiper = new Swiper('.swiper-container',{
         //     autoplay:3000,
         // });
         $('.module-title-nav').click(function() {
+            console.log(11);
             $('.module-title-nav').removeClass('active');
             $(this).addClass('active');
             let id = $(this).data('id');

+ 2 - 2
public/themes/default/views/mobile/app/ic/recruit/will.blade.php

@@ -20,7 +20,7 @@
                 <div class="n-tit-box">
                     就业意向
                 </div>
-                <div class="return js-back for-event" data-href="{{route('mobile.health.recruit.index')}}"></div>
+                <div class="return js-back for-event" data-href="{{route('mobile.ic.recruit.index')}}"></div>
             </div>
         </div>
     </div>
@@ -62,7 +62,7 @@
         });
         $('#btnSave').click(function() {
             alert('提交成功');
-            location.href = "{{route('mobile.health.recruit.index')}}";
+            location.href = "{{route('mobile.ic.recruit.list')}}";
         });
     </script>
 @endsection

+ 1 - 1
public/themes/default/views/mobile/module/section/html_health_end.blade.php

@@ -12,7 +12,7 @@
 </script>
 <script>
     $('#toGongzhonghao').click(function() {
-        location.href = "https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=Mzg5MzI1NTkyMA==#wechat_redirect";
+        location.href = "https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU4Njg1NjU0NQ==#wechat_redirect";
     });
     $('a[href]').click(function(){
         var f = $(this).attr('href');

+ 1 - 0
routes/api.php

@@ -71,6 +71,7 @@ Route::group([
     $router->any('option/districts', 'Api\Config\OptionController@district')->name('config.option.district');
     $router->any('bi/jkq', 'Api\Config\BiController@jkq')->name('config.bi.jkq');
     $router->any('bi/agg', 'Api\Config\BiController@agg')->name('config.bi.agg');
+    $router->any('bi/company', 'Api\Config\BiController@company')->name('config.bi.company');
 });
 
 //CRM接口