소스 검색

Merge branch 'master' of http://59.57.98.130:3000/jjhc/jucai

sandm 2 년 전
부모
커밋
ff0e6d620c

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

@@ -1231,7 +1231,7 @@ EOT;
         $form->action(route('audit.pass'));
         $form->disableReset();
         $form->hidden('id', 'ID')->default($id);
-        $form->html('<div>重置的新密码为123456,是否重置?</div>');
+        $form->html('<div>重置的新密码为Aa123456,是否重置?</div>');
         return json_encode(['html'=>$form->render(),'detail'=>'重置密码']);
     }
 
@@ -1243,7 +1243,7 @@ EOT;
             admin_toastr('数据异常', 'error');
             return back();
         }
-        $result = Company::whereIn('id', $arr)->update(['password'=>\Hash::make(123456)]);
+        $result = Company::whereIn('id', $arr)->update(['password'=>\Hash::make('Aa123456')]);
         if ($result) {
             admin_toastr('重置成功', 'success');
             foreach ($arr as $key => $val) {

+ 2 - 2
app/Admin/Controllers/Person/MemberController.php

@@ -706,7 +706,7 @@ EOT;
         $form->action(route('admin.personal.auditPass'));
         $form->disableReset();
         $form->hidden('id', 'ID')->default($id);
-        $form->html('<div>重置的新密码为123456,是否重置?</div>');
+        $form->html('<div>重置的新密码为Aa123456,是否重置?</div>');
         return json_encode(['html'=>$form->render(),'detail'=>'重置密码']);
     }
 
@@ -718,7 +718,7 @@ EOT;
             admin_toastr('数据异常', 'error');
             return back();
         }
-        $result = Member::whereIn('id', $arr)->update(['password'=>\Hash::make(123456)]);
+        $result = Member::whereIn('id', $arr)->update(['password'=>\Hash::make('Aa123456')]);
         if ($result) {
             admin_toastr('重置成功', 'success');
         } else {

+ 2 - 1
app/Http/Controllers/Mobile/Active/RecruitController.php

@@ -60,7 +60,7 @@ class RecruitController extends MobileBaseController
             $district_arr = ["%.{$select_id}%", "%{$select_id}.%"];
             $title        = $citys['select']['name'] . '专区';
         }
-        $whereRaw = "jobs.updated_at > '2022-06-01 00:00:00' and jobs.deleted_at is null and jobs.valid = 1 and jobs.audit = 1 and jobs.display = 1";
+        $whereRaw = "jobs.updated_at > '2022-06-01 00:00:00' and jobs.deleted_at is null and jobs.valid = 1 and jobs.audit = 1 and jobs.display = 1 and education > 68";
         $companys = DB::table('jobs')->join('companys', 'jobs.company_id', '=', 'companys.id')->whereRaw($whereRaw)->groupBy('jobs.company_id')->select('jobs.company_id')->pluck('company_id')->toArray();
 
         $where   = [];
@@ -91,6 +91,7 @@ class RecruitController extends MobileBaseController
                 ['display', '=', 1],
                 ['audit', '=', 1],
                 ['deleted_at', '=', null],
+                ['education', '>', 68],
             ];
 
             $jobs = DB::table('jobs')->where($jobs_where)->get();

+ 2 - 1
app/Http/Controllers/Web/Active/JobfairController.php

@@ -726,7 +726,7 @@ class JobfairController extends WebBaseController
         $params['citycategory'] = 'jjkfq';
 
         $citycategory = 'jjkfq';
-        $whereRaw     = "jobs.updated_at > '2022-06-01 00:00:00' and jobs.deleted_at is null and jobs.valid = 1 and jobs.audit = 1 and jobs.display = 1";
+        $whereRaw     = "jobs.updated_at > '2022-06-01 00:00:00' and jobs.deleted_at is null and jobs.valid = 1 and jobs.audit = 1 and jobs.display = 1 and education > 68";
         $companys     = DB::table('jobs')->join('companys', 'jobs.company_id', '=', 'companys.id')->whereRaw($whereRaw)->groupBy('jobs.company_id')->select('jobs.company_id')->pluck('company_id')->toArray();
 
         $citys        = $this->categoryService->getCitys($citycategory);
@@ -762,6 +762,7 @@ class JobfairController extends WebBaseController
                 ['display', '=', 1],
                 ['audit', '=', 1],
                 ['deleted_at', '=', null],
+                ['education', '>', 68],
             ];
 
             $jobs = DB::table('jobs')->where($jobs_where)->get();

+ 58 - 52
app/Http/Controllers/Web/Content/ArticleController.php

@@ -1,4 +1,5 @@
 <?php
+
 namespace App\Http\Controllers\Web\Content;
 
 use App\Http\Controllers\Web\WebBaseController;
@@ -25,20 +26,20 @@ class ArticleController extends WebBaseController
      */
     public function __construct(ArticleService $articleService, ArticleCategoryService $articleCategoryService, AdService $adService, NavigationService $navigationService)
     {
-        $this->articleService = $articleService;
+        $this->articleService         = $articleService;
         $this->articleCategoryService = $articleCategoryService;
-        $this->adService = $adService;
-        $this->navigationService = $navigationService;
+        $this->adService              = $adService;
+        $this->navigationService      = $navigationService;
     }
 
     public function index(Request $request, $id = '1', $num = '8', $focus = '3', $recommend = '4', $other_num = '5')
     {
-        $key = $request->input('key');
+        $key       = $request->input('key');
         $categorys = $this->articleCategoryService->getChildCategorys($id, $num);
         $search_id = '';
         if ($categorys) {
-            $search_id = $categorys[0]->id;
-            $search_where = array();
+            $search_id          = $categorys[0]->id;
+            $search_where       = [];
             $search_where['id'] = $search_id;
             if ($id != '1') {
                 $search_where['parent_id'] = $id;
@@ -60,71 +61,76 @@ class ArticleController extends WebBaseController
             $rst = $this->articleService->list($key, '', 10);
         }
 
-        $focus_articles = $this->articleService->getPropertyArticles($focus, $other_num); //热门资讯
+        $focus_articles     = $this->articleService->getPropertyArticles($focus, $other_num); //热门资讯
         $recommend_articles = $this->articleService->getPropertyArticles($recommend, $other_num); //推荐资讯
         //顶部广告位
-        $ad_data = array(
-            'theme'       => 'default',
-            'org'         => 'Home',
-            'alias'       => 'AIX_news_index_top',
-            'num'         => '1'
-        );
+        $ad_data = [
+            'theme' => 'default',
+            'org'   => 'Home',
+            'alias' => 'AIX_news_index_top',
+            'num'   => '1',
+        ];
         $top_ads = $this->adService->getAds($ad_data);
 
-        $return_data = array(
+        $return_data = [
             'articles'           => $rst,
             'categorys'          => $categorys,
             'focus_articles'     => $focus_articles,
             'recommend_articles' => $recommend_articles,
-            'key'                  => $key,
-            'top_ads'              => $top_ads
-        );
+            'key'                => $key,
+            'top_ads'            => $top_ads,
+        ];
         return view('app.content.article.index', $return_data);
     }
 
     public function list(Request $request, $id, $parent_id = '1', $num = '8', $focus = '3', $recommend = '4', $other_num = '5')
     {
-        $key = $request->input('key');
-        $lists = $this->articleService->list($key, $id, '10');
-        $categorys = $this->articleCategoryService->getChildCategorys($parent_id, $num);
-        $focus_articles = $this->articleService->getPropertyArticles($focus, $other_num); //热门资讯
+        $key                = $request->input('key');
+        $info               = $this->articleCategoryService->getInfo($id);
+        $lists              = $this->articleService->list($key, $id, '10');
+        $categorys          = $this->articleCategoryService->getChildCategorys($info['parent_id'], $num);
+        $categorys_child    = $this->articleCategoryService->getChildCategorys($id, 10);
+        $focus_articles     = $this->articleService->getPropertyArticles($focus, $other_num); //热门资讯
         $recommend_articles = $this->articleService->getPropertyArticles($recommend, $other_num); //推荐资讯
+        $bread              = $this->articleCategoryService->getBread($info['id']);
 
         //获取后台职场资讯名称
-        $where = array(
-            'alias'=>'AIX_top',
+        $where        = [
+            'alias'     => 'AIX_top',
             'pagealias' => 'AIX_news',
-            'display'=>'1'
-        );
-        $topNav = $this->navigationService->getTopNav($where);
-        $now_cate = '';
-        $article_cate = array();
+            'display'   => '1',
+        ];
+        $topNav       = $this->navigationService->getTopNav($where);
+        $now_cate     = '';
+        $article_cate = [];
         foreach ($categorys as $k => $v) {
             if ($v->id == $id) {
-                $now_cate = $v->category_name;
+                $now_cate     = $v->category_name;
                 $article_cate = $v;
             }
         }
         $this->putSeoData('article_cate', $article_cate);
 
-        $return_data = array(
-            'articles'=>$lists,
-            'categorys'=>$categorys,
-            'focus_articles'=>$focus_articles,
-            'recommend_articles'=>$recommend_articles,
-            'key'=>$key,
-            'type_id'=>$id,
-            'top_nav'=>$topNav,
-            'now_cate'=>$now_cate,
-        );
+        $return_data = [
+            'articles'           => $lists,
+            'categorys'          => $categorys,
+            'focus_articles'     => $focus_articles,
+            'recommend_articles' => $recommend_articles,
+            'key'                => $key,
+            'type_id'            => $id,
+            'top_nav'            => $topNav,
+            'now_cate'           => $now_cate,
+            'categorys_child'    => $categorys_child,
+            'bread'              => $bread,
+        ];
 
         return view('app.content.article.list', $return_data);
     }
 
     public function show($id, $parent_id = '1', $num = '8', $focus = '3', $recommend = '4', $other_num = '5')
     {
-        $categorys = $this->articleCategoryService->getChildCategorys($parent_id, $num);
-        $focus_articles = $this->articleService->getPropertyArticles($focus, $other_num); //热门资讯
+        $categorys          = $this->articleCategoryService->getChildCategorys($parent_id, $num);
+        $focus_articles     = $this->articleService->getPropertyArticles($focus, $other_num); //热门资讯
         $recommend_articles = $this->articleService->getPropertyArticles($recommend, $other_num); //推荐资讯
 
         $article_info = $this->articleService->getArticleInfo($id);
@@ -135,24 +141,24 @@ class ArticleController extends WebBaseController
 
         $this->putSeoData('article', $article_info);
 
-        $return_data = array(
-            'categorys'=>$categorys,
-            'focus_articles'=>$focus_articles,
-            'recommend_articles'=>$recommend_articles,
-            'type_id'=>$id,
-            'info'=>$article_info,
-            'parent_id'=>$parent_id
-        );
+        $return_data = [
+            'categorys'          => $categorys,
+            'focus_articles'     => $focus_articles,
+            'recommend_articles' => $recommend_articles,
+            'type_id'            => $id,
+            'info'               => $article_info,
+            'parent_id'          => $parent_id,
+        ];
 
         return view('app.content.article.show', $return_data);
     }
 
     public function click($id)
     {
-        $rst = $this->articleService->incrementData(array('id'=>$id), 1, 'click');
-        $data = array('status'=>0);
+        $rst  = $this->articleService->incrementData(['id' => $id], 1, 'click');
+        $data = ['status' => 0];
         if ($rst) {
-            $data = array('status'=>1);
+            $data = ['status' => 1];
         }
         return response()->json($data);
     }

+ 4 - 7
app/Http/Controllers/Web/HomeController.php

@@ -177,7 +177,7 @@ class HomeController extends WebBaseController
 
         //获取工作动态、校园招聘、重要通知的数据
         $article_map = [
-            'type_id'  => [48, 2, 3, 30, 31, 13, 14, 15, 16, 17, 18, 19, 25, 26, 27, 28, 29],
+            'type_id'  => [13, 14, 15, 16, 17, 18, 19, 25, 26, 27, 28, 29, 57, 58, 59],
             'limit'    => 12,
             'titlelen' => 25,
             'dot'      => '...',
@@ -268,22 +268,19 @@ class HomeController extends WebBaseController
         }
 
         //人才新闻
-        $ad_pic_where1[] = ['type_id', '=', 3];
         $ad_pic_where1[] = ['small_img', '<>', ''];
-        $ad_pic1         = Article::where($ad_pic_where1)->orderBy('list_order', 'asc')->orderBy('id', 'desc')->limit(1)->get();
+        $ad_pic1         = Article::where($ad_pic_where1)->whereIn('type_id',[58, 59])->orderBy('list_order', 'asc')->orderBy('id', 'desc')->limit(1)->get();
 
         //人才疗休养活动
         $ad_pic_where2[] = ['r_c_id', '!=', 0];
         $ad_pic_where2[] = ['deleted_at', '=', null];
         $ad_pic_where2[] = ['small_img', '<>', ''];
-        $ad_pic2         = Recuperate::where($ad_pic_where2)->orderBy('list_order', 'asc')->orderBy('id', 'desc')->limit(4)->get();
+        $ad_pic2         = Recuperate::where($ad_pic_where2)->orderBy('list_order', 'desc')->orderBy('id', 'desc')->limit(4)->get();
         //人才疗休养分类
         $Recuperatecategory_arr = RecuperateCategory::where('deleted_at', null)->select('id', 'name')->get()->toArray();
 
         //人才新闻
-        $ad_pic_where3[] = ['type_id', '=', 51];
-        $ad_pic_where3[] = ['small_img', '<>', ''];
-        $ad_pic3         = Article::where($ad_pic_where3)->orderBy('list_order', 'asc')->orderBy('id', 'desc')->limit(4)->get();
+        $ad_pic3         = Article::whereIn('type_id',[58, 59])->orderBy('list_order', 'desc')->orderBy('id', 'desc')->limit(4)->get();
 
         $rcinfos = $this->policyService->getRcInfosByIndex();
 

+ 24 - 0
app/Repositories/ArticleCategoryRepository.php

@@ -31,5 +31,29 @@ class ArticleCategoryRepository extends BaseRepository
         return $this->model->where($where)->orderBy('list_order', 'desc')->orderBy('created_at', 'desc')->limit($limit)->get();
     }
 
+    public function getInfo($id)
+    {
+        $info = $this->model->where('id', $id)->first();
+        return $info;
+    }
+
+    public function getBread($id)
+    {
+        $info = $this->model->where('id', $id)->first();
+        $res  = [['id' => $info['id'], 'name' => $info['category_name']]];
+        if ($info['parent_id'] != 0) {
+            $this->_getBread($info, $res);
+        }
 
+        return $res;
+    }
+
+    private function _getBread($info, &$res)
+    {
+        $cate = $this->model->where('id', $info['parent_id'])->first();
+        array_unshift($res, ['id' => $cate['id'], 'name' => $cate['category_name']]);
+        if ($cate['parent_id'] != 0) {
+            $this->_getBread($cate, $res);
+        }
+    }
 }

+ 13 - 2
app/Services/Content/ArticleCategoryService.php

@@ -1,4 +1,5 @@
 <?php
+
 namespace App\Services\Content;
 
 use App\Repositories\ArticleCategoryRepository;
@@ -23,11 +24,21 @@ class ArticleCategoryService
 
     public function getChildCategorys($id, $limit)
     {
-        $where = array();
+        $where              = [];
         $where['parent_id'] = $id;
-        $list=$this->articleCategoryRepository->getChildCategorys($where, $limit);
+        $list               = $this->articleCategoryRepository->getChildCategorys($where, $limit);
         return $list;
     }
 
+    public function getInfo($id)
+    {
+        $info = $this->articleCategoryRepository->getInfo($id);
+        return $info;
+    }
 
+    public function getBread($id)
+    {
+        $list = $this->articleCategoryRepository->getBread($id);
+        return $list;
+    }
 }

+ 7 - 1
public/themes/default/assets/app/css/article/article.css

@@ -169,4 +169,10 @@
 .news .l .newslist .listb.news_noimg .br,.newslip .l .newslist .listb.news_noimg .br{ margin-left:20px; width:820px;}
 .news .l .newslist .listb.news_noimg .br .t,.news .l .newslist .listb.news_noimg .br .summary,.newslip .l .newslist .listb.news_noimg .br .t,.newslip .l .newslist .listb.news_noimg .br .summary,.newslip .l .newslist .listb.news_noimg .br .time{ width:800px;}
 .newslist .listb.news_noimg .br .t{width: 500px !important;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float: left;}
-.listb.news_noimg .br .time{width: 300px !important;float: left;}
+.listb.news_noimg .br .time{width: 300px !important;float: left;}
+
+/*二级分类*/
+.erji_category{border:1px #EEEEEE solid;width:838px;border-top:0;padding:10px;}
+.erji_category *{-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
+.erji_category a{margin:5px 15px;display:inline-block;}
+.erji_category a:hover,.erji_category a.select{color:#dd4250;}

+ 13 - 3
public/themes/default/views/app/content/article/list.blade.php

@@ -38,6 +38,15 @@
                 @endif
                 <div class="clear"></div>
             </div>
+
+            @if(!empty($categorys_child))
+                <div id="erjifenlei" class="erji_category">
+                    @foreach($categorys_child as $k=>$v)
+                        <a href="{{route('news.list',['id'=>$v->id])}}" @if($v->id == $type_id) class="select" @endif>{{$v->category_name}}</a>
+                    @endforeach
+                </div>
+            @endif
+
             <div class="newslist">
 
                 @if($key)
@@ -47,9 +56,10 @@
                 @else
                     <div class="link_gray6 tit">
                         <a href="/">网站首页</a>
-                        <span>></span><a href="{{route(url_rewrite($top_nav->pagealias))}}">{{$top_nav->title}}</a>
-                        @if($now_cate)
-                            <span>></span><a href="#">{{$now_cate}}</a>
+                        @foreach($bread as $k=>$v)
+                            <span>></span><a href="{{route('news.list',['id'=>$v['id']])}}">{{$v['name']}}</a>
+                        @endforeach
+                        @if($bread)
                         @endif
 
                     </div>

+ 23 - 28
public/themes/default/views/app/index.blade.php

@@ -124,8 +124,8 @@
             <div class="home_navlist">
                 <a href="/" class="select">首页</a>
                 <a href="{{route('city')}}">城市概况</a>
-                <a href="{{route('news.list',['id'=>3])}}">聚才动态</a>
-                <a href="{{route(url_rewrite('AIX_jobslist'))}}">招聘广场</a>
+                <a href="{{route('news.list',['id'=>58])}}">单位招聘</a>
+                <a href="{{route(url_rewrite('AIX_jobslist'))}}">求职广场</a>
                 <a href="{{route('knowall')}}">网上办事</a>
                 <a href="{{route('policy.list',['id'=>1])}}">人才政策</a>
                 <a href="http://peixun.jinjianghc.com/" target="_blank">培训教育</a>
@@ -421,34 +421,29 @@
                     @endif
                 </div>
                 <div class="home_news_list">
-                    @if(array_has($articles, '3') && $articles['3'])
-                        @foreach($articles['3'] as $k=>$v)
-                            @if($k<4)
-                                <div class="home_news_item">
-                                    <div class="news_time">
-                                        <div class="news_day">{{date('d',strtotime($v->created_at))}}</div>
-                                        <div class="news_year">{{date('Y/m月',strtotime($v->created_at))}}</div>
-                                    </div>
-                                    <div class="news_info">
-                                        @if(empty($v->is_url))
-                                            <a href="{{route('news.show',['id'=>$v->id])}}" target="_blank"
-                                               class="news_title substring" title="{{$v->title}}">{{$v->title}}</a>
-                                            <div class="news_content">{!!  cut_str(strip_tags(htmlspecialchars_decode($v->content,ENT_QUOTES)),'80',0,'...') !!}</div>
-                                        @else
-                                            <a href="{{$v->is_url}}" target="_blank"
-                                               class="news_title substring" title="{{$v->title}}">{{$v->title}}</a>
-                                            <div class="news_content">{!!  cut_str(strip_tags(htmlspecialchars_decode($v->content,ENT_QUOTES)),'80',0,'...') !!}</div>
-                                        @endif
-                                    </div>
-                                    <div class="clear"></div>
-                                </div>
-                            @endif
-
-                        @endforeach
-                    @endif
+                    @foreach($ad_pic3 as $k=>$v)
+                        <div class="home_news_item">
+                            <div class="news_time">
+                                <div class="news_day">{{date('d',strtotime($v->created_at))}}</div>
+                                <div class="news_year">{{date('Y/m月',strtotime($v->created_at))}}</div>
+                            </div>
+                            <div class="news_info">
+                                @if(empty($v->is_url))
+                                    <a href="{{route('news.show',['id'=>$v->id])}}" target="_blank"
+                                       class="news_title substring" title="{{$v->title}}">{{$v->title}}</a>
+                                    <div class="news_content">{!!  cut_str(strip_tags(htmlspecialchars_decode($v->content,ENT_QUOTES)),'80',0,'...') !!}</div>
+                                @else
+                                    <a href="{{$v->is_url}}" target="_blank"
+                                       class="news_title substring" title="{{$v->title}}">{{$v->title}}</a>
+                                    <div class="news_content">{!!  cut_str(strip_tags(htmlspecialchars_decode($v->content,ENT_QUOTES)),'80',0,'...') !!}</div>
+                                @endif
+                            </div>
+                            <div class="clear"></div>
+                        </div>
+                    @endforeach
                 </div>
                 <div class="clear"></div>
-                <a href="{{route('news.list',['id'=>3])}}" class="box_more" target="_blank">查看更多&gt;</a>
+                <a href="{{route('news.list',['id'=>58])}}" class="box_more" target="_blank">查看更多&gt;</a>
             </div>
             <div class="trends_box" style="display: none;">
                 @if(!$recruit->isEmpty())

+ 3 - 3
public/themes/default/views/app/index_old.blade.php

@@ -114,11 +114,11 @@
                 <a href="{{route('city')}}" class="nli J_hoverbut">
                     <li class="index_li">城市概况</li>
                 </a>
-                <a href="{{route('news.list',['id'=>3])}}" class="nli J_hoverbut">
-                    <li class="index_li">聚才动态</li>
+                <a href="{{route('news.list',['id'=>58])}}" class="nli J_hoverbut">
+                    <li class="index_li">单位招聘</li>
                 </a>
                 <a href="{{route(url_rewrite('AIX_jobslist'))}}" class="nli J_hoverbut">
-                    <li class="index_li">招聘广场</li>
+                    <li class="index_li">求职广场</li>
                 </a>
                 <a href="{{route('knowall')}}" class="nli J_hoverbut">
                     <li class="index_li">网上办事</li>

+ 2 - 2
public/themes/default/views/module/section/nav_header.blade.php

@@ -11,8 +11,8 @@
             <ul class="link_gray6 nowrap">
                 <li class="nli J_hoverbut @if($current_url=='/')select @endif"><a href="/">首页</a></li>
                 <li class="nli J_hoverbut @if(strripos( url($current_url), route('city')) !== false) select  @endif"><a href="{{route('city')}}">城市概况</a></li>
-                <li class="nli J_hoverbut @if(strripos( url($current_url), route('news.list',['id'=>3])) !== false) select  @endif"><a href="{{route('news.list',['id'=>3])}}">聚才动态</a></li>
-                <li class="nli J_hoverbut @if(strripos( url($current_url), route('jobs')) !== false) select  @endif"><a href="{{route(url_rewrite('AIX_jobslist'))}}">招聘广场</a></li>
+                <li class="nli J_hoverbut @if(strripos( url($current_url), route('news.list',['id'=>3])) !== false) select  @endif"><a href="{{route('news.list',['id'=>58])}}">单位招聘</a></li>
+                <li class="nli J_hoverbut @if(strripos( url($current_url), route('jobs')) !== false) select  @endif"><a href="{{route(url_rewrite('AIX_jobslist'))}}">求职广场</a></li>
                 <li class="nli J_hoverbut @if(strripos( url($current_url), route('knowall')) !== false) select  @endif"><a href="{{route('knowall')}}">网上办事</a></li>
                 <li class="nli J_hoverbut @if(strripos( url($current_url), route('policy.list',['id'=>1])) !== false) select  @endif"><a href="{{route('policy.list',['id'=>1])}}">人才政策</a></li>
                 <li class="nli J_hoverbut"><a href="http://peixun.jinjianghc.com/" target="_blank">培训教育</a></li>