1. 判断封面图片

    • 使用 {pboot:if('[news:isico]'==1)} 判断是否存在封面图片。
    • 如果存在,则显示封面图片。
  2.    <!-- 判断封面图片是否为空 -->
            {pboot:if('[news:isico]'==1)}
                <div class="card-img scare-img">
                    <a href="{:url('news/detail', ['id'=>$news['id']])}">
                        <img src="{:config('site_url')}/{$news['ico']}" alt="{$news['title']}" width="100%">
                    </a>
                </div>
            {/pboot:if}