{php} /** * 首页内容视图 */ {/php}
{php} // 显示置顶文章 if (!empty($topArticles)) { foreach ($topArticles as $article) { echo \think\facade\View::fetch('component/post_item', [ 'post' => $article, 'user' => $user, 'siteConfig' => $siteConfig, 'postLikes' => $postLikes ?? [], 'postComments' => $postComments ?? [], 'postLikedMap' => $postLikedMap ?? [] ]); } } // 显示普通文章 if (!empty($articles)) { foreach ($articles as $article) { echo \think\facade\View::fetch('component/post_item', [ 'post' => $article, 'user' => $user, 'siteConfig' => $siteConfig, 'postLikes' => $postLikes ?? [], 'postComments' => $postComments ?? [], 'postLikedMap' => $postLikedMap ?? [] ]); } } {/php}
{php}$kqsyFlag = isFlag($siteConfig['kqsy'] ?? 0);{/php} {if condition="$kqsyFlag === 0"} {/if} {if condition="$lnkztFlag === 0"} {/if} {notempty name="user"} {/notempty}
{if condition="$kqsyFlag === 0"}
{/if}