更新文件
This commit is contained in:
@@ -25,15 +25,18 @@ class CategoryController extends Controller
|
|||||||
$template = $category->template;
|
$template = $category->template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pageCount = 15;//每页显示数量
|
||||||
|
//人才
|
||||||
if ($category->type == Category::TYPE_PERSON) {
|
if ($category->type == Category::TYPE_PERSON) {
|
||||||
$directory = 'resume';
|
$directory = 'resume';
|
||||||
|
$pageCount = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
$articles = $category->relations(Category::TYPE_ARTICLE)
|
$articles = $category->relations(Category::TYPE_ARTICLE)
|
||||||
->where('status', 1)
|
->where('status', 1)
|
||||||
->latest('sort')
|
->latest('sort')
|
||||||
->latest('created_at')
|
->latest('created_at')
|
||||||
->paginate();
|
->paginate($pageCount);
|
||||||
|
|
||||||
$parent = $category;
|
$parent = $category;
|
||||||
if (! $category->getChildrenCount() && $category->parent) {
|
if (! $category->getChildrenCount() && $category->parent) {
|
||||||
|
|||||||
@@ -252,13 +252,35 @@
|
|||||||
{{ getOneCategory(17,'title') }}
|
{{ getOneCategory(17,'title') }}
|
||||||
</div>
|
</div>
|
||||||
<img src="assets/index/images/partyIcon_00.png"/>
|
<img src="assets/index/images/partyIcon_00.png"/>
|
||||||
|
<div class="mediaNew-more" data-href="{{ getOneCategory(17,'link') }}">查看更多</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="indexMedia-cont">
|
<div class="indexMedia-cont">
|
||||||
|
@if (getArticlesBYCate(17,3,'one',true)->isNotEmpty())
|
||||||
<div class="ce-img indexMedia-img">
|
<div class="ce-img indexMedia-img">
|
||||||
<span style="background-image: url({{ getOneArticleBYCate(17,'cover_path') }});"></span>
|
<span style="background-image: url({{ getArticlesBYCate(17,3,'one',true)->first()->cover_path}});"></span>
|
||||||
<img src="assets/index/images/partyIcon_03.png">
|
<div class="ce-nowrap indexImg-title">
|
||||||
|
{{getArticlesBYCate(17,3,'one',true)->first()->title }}
|
||||||
</div>
|
</div>
|
||||||
<div class="indexMedia-essay">
|
<!-- <img src="assets/index/images/partyIcon_03.png"> -->
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<ul class="mediaNew">
|
||||||
|
@if (getArticlesBYCate(17,3)->isNotEmpty())
|
||||||
|
@foreach (getArticlesBYCate(17,3) as $article)
|
||||||
|
<li>
|
||||||
|
<a href="{{ $article->link }}" target="_blank" title="{{ $article->title }}">
|
||||||
|
<div class="ce-nowrap-multi indexNews-ul-name"
|
||||||
|
style="font-size: 16px; margin-bottom: 10px">
|
||||||
|
{{ $article->title }}
|
||||||
|
</div>
|
||||||
|
<span>[{{ $article->created_at->format('Y-m-d') }}]</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
<!-- <div class="indexMedia-essay">
|
||||||
<div class="ce-nowrap-multi indexMedia-head">
|
<div class="ce-nowrap-multi indexMedia-head">
|
||||||
{{ getOneArticleBYCate(17,'title') }}
|
{{ getOneArticleBYCate(17,'title') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -266,7 +288,7 @@
|
|||||||
{{ getOneArticleBYCate(17,'description') }}
|
{{ getOneArticleBYCate(17,'description') }}
|
||||||
</div>
|
</div>
|
||||||
<a class="indexMedia-more" href="{{ getOneCategory(17,'link') }}" target="_blank">MORE</a>
|
<a class="indexMedia-more" href="{{ getOneCategory(17,'link') }}" target="_blank">MORE</a>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-4">
|
<div class="col-xs-12 col-md-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user