fix: 文章模块bug修复

This commit is contained in:
2025-06-07 14:24:10 +08:00
parent dd8f9523c7
commit bfafc74a1b
3 changed files with 3 additions and 2 deletions

View File

@@ -37,6 +37,7 @@ class Article extends Common
])
->type('image')
->visible(['id', 'title', 'image', 'link'])
->enabled()
->find();
View::assign('banner', $banner);
@@ -64,7 +65,6 @@ class Article extends Common
])
->withSearch(['title'], ['title' => $param['keywords']??null])
->category($param['cid']??$categorys[0]['id'])
->where('release_time', '<=', date('Y-m-d H:i:s'))
->order(['sort' => 'asc', 'release_time' => 'desc', 'id' => 'desc'])
->paginate([
'list_rows' => $param['size'],

View File

@@ -20,7 +20,7 @@
<div class="atmleft">
<div class="blog_title">
<h2>{$detail.title}</h2>
<p>{$detail.desc}</p>
<p>{$detail.release_time}</p>
</div>
<!-- 文本渲染-->
<div class="blog_content">{$detail.content|raw}</div>

View File

@@ -36,6 +36,7 @@
<img src="{$ar.image}" />
<h3>{$ar.title}</h3>
<p>{$ar.desc}</p>
<p>{$ar.release_time}</p>
</a>
</div>
{/volist}