feat: 导出增加分类显示

This commit is contained in:
augushong
2025-06-27 12:52:47 +08:00
parent a955283b73
commit 23f6db5b48
2 changed files with 8 additions and 0 deletions

View File

@@ -201,6 +201,9 @@ class Post extends Common
View::assign('post', $model_post); View::assign('post', $model_post);
View::assign('list_post_platform', $list_post_platform); View::assign('list_post_platform', $list_post_platform);
$list_post_category = PostCategory::with('category')->where('post_id', $id)->select();
View::assign('list_post_category', $list_post_category);
return View::fetch(); return View::fetch();
} }

View File

@@ -81,6 +81,11 @@
class="article-body" class="article-body"
id="article-body" id="article-body"
> >
<h4 id="category">
{volist name='list_post_category' id='vo'}
<p>{$vo.category.title} : {$vo.category.desc}</p>
{/volist}
</h4>
<h1 id="post-title">{$post.title}</h1> <h1 id="post-title">{$post.title}</h1>
<div id="post-desc"> <div id="post-desc">
{$post.desc} {$post.desc}