mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
增加通用结尾
This commit is contained in:
@@ -214,7 +214,7 @@ class Post extends Base
|
|||||||
|
|
||||||
$list_post_category_id = $this->getAttr('categorys')->column('category_id');
|
$list_post_category_id = $this->getAttr('categorys')->column('category_id');
|
||||||
|
|
||||||
$list_start_post = Post::where('category_id', 'in', $list_post_category_id)->cache(600)->where('status', 1)->select();
|
$list_start_post = Post::where('category_id', 'in', $list_post_category_id)->where('type', 'category-start')->cache(600)->where('status', 1)->select();
|
||||||
|
|
||||||
foreach ($list_start_post as $k_start_post => $v_start_post) {
|
foreach ($list_start_post as $k_start_post => $v_start_post) {
|
||||||
$start_content .= $v_start_post->content_html;
|
$start_content .= $v_start_post->content_html;
|
||||||
@@ -222,4 +222,15 @@ class Post extends Base
|
|||||||
|
|
||||||
return $start_content;
|
return $start_content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getEndContentAttr()
|
||||||
|
{
|
||||||
|
$end_content = '';
|
||||||
|
$list_post_category_id = $this->getAttr('categorys')->column('category_id');
|
||||||
|
$list_end_post = Post::where('category_id', 'in', $list_post_category_id)->where('type', 'category-end')->cache(600)->where('status', 1)->select();
|
||||||
|
foreach ($list_end_post as $k_end_post => $v_end_post) {
|
||||||
|
$end_content.= $v_end_post->content_html;
|
||||||
|
}
|
||||||
|
return $end_content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
<article class="ul-content entry heti heti--classic">
|
<article class="ul-content entry heti heti--classic">
|
||||||
{$post->start_content|raw}
|
{$post->start_content|raw}
|
||||||
{$post->content_html_show|raw}
|
{$post->content_html_show|raw}
|
||||||
|
{$post->end_content|raw}
|
||||||
|
|
||||||
{:\\app\\common\\tools\\PostBlock::copyright($post)}
|
{:\\app\\common\\tools\\PostBlock::copyright($post)}
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
Reference in New Issue
Block a user