Browse Source

残疾人页面

linwu 1 year ago
parent
commit
8b08d09686

+ 121 - 0
app/Http/Controllers/Mobile/Active/DeformityController.php

@@ -0,0 +1,121 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: wuzhenke
+ * Date: 2019/1/17
+ * Time: 16:19
+ */
+
+namespace App\Http\Controllers\Mobile\Active;
+
+use App\Http\Controllers\Mobile\MobileBaseController;
+use App\Services\Common\CategoryService;
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
+
+class DeformityController extends MobileBaseController
+{
+    protected $categoryService;
+
+    public function __construct(CategoryService $categoryService)
+    {
+        $this->categoryService = $categoryService;
+    }
+
+    public function index(Request $request)
+    {
+        //获取分类
+        $filter_where   = [
+            'AIX_education'  => 100,
+            'AIX_experience' => 100,
+        ];
+        $categories     = $this->categoryService->getCategories($filter_where);     //过滤条件信息
+        $categories_res = [];
+        foreach ($categories['AIX_education'] as $k => $v) {
+            if ($k >= 69) {
+                $categories_res['AIX_education'][$k] = $v;
+            }
+        }
+        foreach ($categories['AIX_experience'] as $k => $v) {
+            if ($k < 76) {
+                $categories_res['AIX_experience'][$k] = $v;
+            }
+        }
+
+        //获取数据
+        $where = $this->_dealWhere($request);
+        $list  = DB::table('jobs')->where($where)->orderBy('updated_at', 'desc')->paginate(10);
+
+        //数据处理
+        foreach ($list as $val) {
+            $val->wage_cn       = $val->wage_min . '-' . $val->wage_max . '/月';
+            $val->education_cn  = $val->education ? get_category($val->education) : '不限';
+            $val->experience_cn = $val->experience ? get_category($val->experience) : '不限';
+            $val->category_cn   = get_job_category_cn($val->category);
+            $val->district_cn   = get_district_cn($val->district);
+        }
+
+        //ajax返回
+        if ($request->ajax()) {
+            if ($list->lastPage() < $list->currentPage()) {
+                return response()->json(['status' => 0]);
+            }
+            return response()->json(['status' => 1, 'data' => view('mobile.app.active.ajax.deformity_list', ['list' => $list->items()])->render()]);
+        }
+
+        $return_data['categories'] = $categories_res;
+        $return_data['params']     = $request->input();
+        $return_data['list']       = $list->items();
+        $return_data['wap_title']  = '残疾人就业专区';
+        $return_data['user']       = $this->getUser();
+        return view('mobile.app.active.deformity', $return_data);
+    }
+
+    /**
+     * 搜索条件处理
+     */
+    private function _dealWhere(Request $request)
+    {
+        //搜索条件
+        $where   = [];
+        $where[] = ['is_deformity', '=', 1];
+        $where[] = ['valid', '=', 1];
+        $where[] = ['display', '=', 1];
+
+        //审核状态过滤
+        if (config('aix.companyset.comset.show_set.jobs_display') == 1) {
+            $where[] = ['audit', '=', 1];
+        } else {
+            $where[] = ['audit', '<>', 3];
+        }
+
+        $keyword = $request->input('keyword');
+        if (!empty($keyword)) {
+            $key_name = $request->input('key_name');
+            $where[]  = [$key_name, 'like', "%{$keyword}%"];
+        }
+
+        $education = $request->input('education');
+        if (!empty($education)) {
+            $where[] = ['education', '>=', $education];
+        }
+
+        $experience = $request->input('experience');
+        if (!empty($experience)) {
+            $where[] = ['experience', '=', $experience];
+        }
+
+        return $where;
+    }
+
+    public function getUser()
+    {
+        $user = array();
+        if (auth('web-member')->check()) {
+            $user = auth('web-member')->user();
+        } elseif (auth('web-company')->check()) {
+            $user = auth('web-company')->user();
+        }
+        return $user;
+    }
+}

BIN
public/themes/default/assets/mobile/images/deformity/logo.jpg


BIN
public/themes/default/assets/mobile/images/deformity/qrcode.png


+ 43 - 0
public/themes/default/views/mobile/app/active/ajax/deformity_list.blade.php

@@ -0,0 +1,43 @@
+@if($list)
+    @foreach($list as $key => $val)
+        <a href="{{route($sub_site."mobile.jobs.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}}{{$val->id}}
+                    </div>
+                    <div class="refresh-time font12 font_red_light">{!! daterange(time(), strtotime($val->created_at), '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>
+                <div class="line-four font_gray6 font13">
+                    {{$val->education_cn}} / {{$val->experience_cn}}
+                </div>
+                <div class="apply-btn apply_jobs">申请</div>
+            </div>
+            <div class="company font13">
+                <div class="company-name font_gray6 substring">
+                    {{$val->company_name}}
+                </div>
+                <div class="district font_gray6 @if(array_get($params, 'range') !='') ranged @endif substring">
+                    @if(array_get($params, 'range') !='')
+                        {{$val->map_range or ''}}
+                    @else
+                        {{$val->district_cn}}
+                    @endif
+                </div>
+                <div class="clear"></div>
+            </div>
+        </div>
+        <div class="list-split-block"></div>
+    @endforeach
+    {{--分页信息--}}
+@else
+    <div class="list-split-block"></div>
+    <div class="list-empty link_blue">抱歉,没有找到符合您条件的职位!<br />放宽搜索条件也许有更多合适您的职位哦~</div>
+@endif

+ 298 - 0
public/themes/default/views/mobile/app/active/deformity.blade.php

@@ -0,0 +1,298 @@
+@extends('mobile.module.layouts.content')
+@push('meta')
+
+@endpush
+
+@push('css')
+    <link href="{{ theme_asset('mobile/css/common.css') }}" rel="stylesheet">
+    <link href="{{ theme_asset('mobile/css/jobs.css') }}" rel="stylesheet">
+    <style>
+        .drop_content a{color: #666666;text-decoration: none;}
+        .qspageso {display:block;position:static;}
+        .qspageso .topbg .soselect {left: .35rem;}
+        .qspageso .topbg .soimput {margin-left:0;width: 5.5rem;}
+        .qspageso .topbg .choose-s-type-group {left:auto;height: 1.6rem;}
+        .job-list-item .info .line-two .salary {width: 40%;}
+        .job-list-item .info .line-two .category {width: 40%;}
+        .alw-layer {background-image:none;}
+        .alw-layer img{width: 70%;margin: 0 auto;margin-top: 200px;display: block;}
+        .to_lottery {width:50px;height:50px;position:fixed;bottom:1.5rem;right:20px;line-height:45px;background:#B2001A;text-align:center;border-radius:50%;z-index:999;font-size:.38rem;font-weight:600;color:#FEFDD2;border: 2px solid #eee;text-decoration: none;}
+    </style>
+@endpush
+
+@push('js')
+
+@endpush
+
+@section('content')
+
+    <img src="{{theme_asset('mobile/images/deformity/logo.jpg')}}" width="100%" />
+    <div class="qspageso link_gray6">
+        <div class="topbg">
+            <input value="@if(array_get($params, 'keyword')){{$params['keyword']}}@endif" type="text" class="soimput" id="J_soinput" placeholder="请输入关键字">
+            <div class="soselect qs-relative for-event">
+            <span class="for-type-txt">
+                搜职位
+            </span>
+                <input type="hidden" class="for-type-code" id="key_name" name="key_name" value="@if(array_get($params, 'key_name')){{$params['key_name']}}@else {{'jobs_name'}} @endif">
+            </div>
+
+            <div class="so-close js-so-close"></div>
+
+            <div class="rightbtn-so for-event" id="J_submit">搜索</div>
+
+            <div class="choose-s-type-group">
+                <div class="choose-s-type-cell qs-relative">
+                    <div class="qs-center qs-relative">
+                        <div class="choose-s-type-list font14" data-code="jobs_name" data-title="职位">职位</div>
+                    </div>
+                    <div class="qs-center">
+                        <div class="choose-s-type-list sl2 font14" data-code="company_name" data-title="公司">公司</div>
+                    </div>
+                </div>
+            </div>
+            <div class="search_ajax"><ul id="search_mes"></ul></div>
+        </div>
+    </div>
+
+    {{--过滤条件--}}
+    <div class="filter-group x2 filter-outer">
+        <div id="f-mask"></div>
+        <div class="filter-outer">
+            <div class="filter-list js-filter" data-tag="1">
+                <div class="filter-cell">
+                    <div class="filter-cell-txt f-normal-txt-eduction">
+                        @if(array_get($params,'education')=='')
+                            学历要求
+                        @else
+                            {{ $categories['AIX_education'][$params['education']]['demand'] }}
+                        @endif
+                    </div>
+                </div>
+            </div>
+            <div class="filter-list js-filter" data-tag="2">
+                <div class="filter-cell">
+                    <div class="filter-cell-txt f-normal-txt-experience">
+                        @if(array_get($params,'experience')=='')
+                            经验
+                        @else
+                            {{ $categories['AIX_experience'][$params['experience']]['demand'] }}
+                        @endif
+                    </div>
+                </div>
+            </div>
+
+            <div class="clear"></div>
+
+            <div class="qs-actionmore"></div>
+
+            <form id="searchForm" action="" method="get">
+                <input type="hidden" class="" name="keyword" value="@if(array_get($params, 'keyword')){{$params['keyword']}}@endif">
+                <input type="hidden" class="" name="key_name" value="@if(array_get($params, 'key_name')){{$params['key_name']}}@endif">
+                <input type="hidden" class="f-normal-code-education" name="education" value="{{$params['education'] or ''}}">
+                <input type="hidden" class="f-normal-code-experience" name="experience" value="{{$params['experience'] or ''}}">
+            </form>
+        </div>
+        <div class="con-filter">
+            <div class="f-box f-box-city"></div>
+            <div class="f-box f-box-wage">
+                <div class="f-box-inner">
+                    @if($categories['AIX_education'])
+                        @foreach($categories['AIX_education'] as $k=>$v)
+                            <li>
+                                <a class="f-item f-item-normal @if(array_get($params,'education')==$v['id']) select @endif" href="javascript:;" data-type="education" data-code="{{$v['id']}}" data-title="{{$v['demand']}}">
+                                    {{$v['demand']}}
+                                </a>
+                            </li>
+                        @endforeach
+                    @endif
+                </div>
+                <div class="f-btn-submit qs-center">
+                    <div onclick="window.location='{{route("mobile.deformity",array_merge($params, array("education"=>"")))}}';" class="qs-btn qs-btn-inline qs-btn-medium qs-btn-orange">
+                        不限
+                    </div>
+                </div>
+            </div>
+            <div class="f-box f-box-experience">
+                <div class="f-box-inner">
+                    @if($categories['AIX_experience'])
+                        @foreach($categories['AIX_experience'] as $k=>$v)
+                            <li>
+                                <a class="f-item f-item-normal @if(array_get($params,'experience')==$v['id']) select @endif" href="javascript:;" data-type="experience" data-code="{{$v['id']}}" data-title="{{$v['demand']}}">
+                                    {{$v['demand']}}
+                                </a>
+                            </li>
+                        @endforeach
+                    @endif
+                </div>
+                <div class="f-btn-submit qs-center">
+                    <div onclick="window.location='{{route($sub_site."mobile.deformity",array_merge($params, array("experience"=>"")))}}';" class="qs-btn qs-btn-inline qs-btn-medium qs-btn-orange">
+                        不限
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    {{--职位列表--}}
+    <div class="drop_content">
+        <div class="add_data">
+            @include('mobile.app.active.ajax.deformity_list')
+        </div>
+    </div>
+
+    <div class="alw-layer">
+        <img src="{{theme_asset('mobile/images/deformity/qrcode.png')}}" alt="">
+    </div>
+
+    <a href="javascript:void(0);" class="to_lottery" onclick="share()">就业</a>
+
+    <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="http://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>
+        $('#J_submit').click(function(){
+            var keyword = $('#J_soinput').val();
+            var key_name = $('#key_name').val();
+            location.href = '{{url('mobile/active/deformity')}}?key_name=' + key_name + '&keyword=' + keyword;
+        });
+
+        // 更多列表左右切换
+        $('.js-more-l').on('click', function () {
+            var targetId = $(this).data('id');
+            $('.f-box-more').toggleClass('qs-actionsheet-toggle-left');
+            $('#' + targetId).toggleClass('qs-actionsheet-toggle');
+        })
+        $('.f-more-back-btn').on('click', function () { // 更多列表切换返回
+            $('.f-box-more').toggleClass('qs-actionsheet-toggle-left');
+            $('.f-more-content').removeClass('qs-actionsheet-toggle');
+        })
+        $('.f-more-back-a').on('click', function () { // 更多列表项点击
+            var thisType = $(this).data('type');
+            var thisTitle = $(this).data('title');
+            var thisCode = $(this).data('code');
+            $('.f-more-l-code-' + thisType).val(thisCode);
+            $('.f-more-l-txt-' + thisType).text(thisTitle);
+            $('.f-box-more').toggleClass('qs-actionsheet-toggle-left');
+            $('.f-more-content').removeClass('qs-actionsheet-toggle');
+        })
+        // 除更多和读取缓存之外的下拉列表
+        $('.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();
+        })
+        // 清空已选分类
+        $('.js-clearjob-jobcategory').on('click', function () {
+            $('.qs-recover-code-job').val('');
+            goPage();
+        })
+        // 跳转方法
+        function goPage() {
+            var toSearchPage = "{{route($sub_site.'mobile.deformity')}}";
+            window.location.href = toSearchPage + '?'+$('#searchForm').serialize();
+        }
+        // 点击筛选
+        $('#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(); }
+        });
+        /* 显示分享 覆盖层 */
+        function share() {
+            $(".alw-layer").show();
+        }
+        //分享按钮
+        $(".alw-layer").on("click", function() {
+            $(this).hide();
+        });
+
+        $(function(){
+            var page = 1;
+            $('.drop_content').dropload({
+                scrollArea : window,
+                domUp : {
+                    domClass   : 'dropload-up',
+                    domRefresh : '<div class="dropload-refresh">加载中...</div>',
+                    domUpdate  : '<div class="dropload-update">加载中...</div>',
+                    domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中...</div>'
+                },
+                domDown : {
+                    domClass   : 'dropload-down',
+                    domRefresh : '<div class="dropload-refresh">加载中...</div>',
+                    domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中...</div>',
+                    domNoData  : '<div class="dropload-noData">没有更多数据~~</div>'
+                },
+                loadUpFn : function(me){
+                    page = 1;
+                            @if($params)
+                    var mobile_url ='{{ url($current_url) }}&page='+page;
+                            @else
+                    var mobile_url ='{{ url($current_url) }}?page='+page;
+                    @endif
+                        mobile_url = mobile_url.replace(/&amp;/g,"&");
+                    $.ajax({
+                        type: 'GET',
+                        url: mobile_url,
+                        dataType: 'json',
+                        success: function(result){
+                            if (result.status ==1) {
+                                $('.add_data').html(result.data);
+                            } else {
+                                me.lock();
+                                me.noData();
+                            }
+                            me.resetload();
+                        },
+                        error: function(xhr, type){
+                            me.resetload();
+                        }
+                    });
+                },
+                loadDownFn : function(me){
+                    page++;
+                            @if($params)
+                    var mobile_url ='{{ url($current_url) }}&page='+page;
+                            @else
+                    var mobile_url ='{{ url($current_url) }}?page='+page;
+                    @endif
+                        mobile_url = mobile_url.replace(/&amp;/g,"&");
+                    $.ajax({
+                        type: 'GET',
+                        url: mobile_url,
+                        dataType: 'json',
+                        success: function(result){
+                            if (result.status ==1) {
+                                $('.add_data').append(result.data);
+                            } else {
+                                me.lock();
+                                me.noData();
+                            }
+                            me.resetload();
+                        },
+                        error: function(xhr, type){
+                            me.resetload();
+                        }
+                    });
+                },
+                threshold : 50
+            });
+        });
+    </script>
+@endsection

+ 3 - 0
routes/mobile.php

@@ -104,6 +104,9 @@ Route::group([
 
         /*泉职大*/
         $router->any('quanzhida', 'Mobile\Active\QuanzhidaController@index')->name('mobile.quanzhida');
+
+        /*残联*/
+        $router->any('deformity', 'Mobile\Active\DeformityController@index')->name('mobile.deformity');
     });
 });