diff --git a/app/service/ContentService.php b/app/service/ContentService.php index d449dd4..2277bc6 100644 --- a/app/service/ContentService.php +++ b/app/service/ContentService.php @@ -471,6 +471,9 @@ class ContentService { if($param['isTop'] != 2){ $where['is_top'] = 1; } + if($param['isTop'] == 2){ + $where['is_top'] = 2; + } // switch ($param['isTop']) { // case 1: diff --git a/public/themes/website/1/zh/demo/news.html b/public/themes/website/1/zh/demo/news.html index e7fed29..a7d4a47 100644 --- a/public/themes/website/1/zh/demo/news.html +++ b/public/themes/website/1/zh/demo/news.html @@ -91,7 +91,7 @@ - {hcTaglib:contentPage2 cid="$current_cate_id" mainField="id,category_id,title,sub_title,thumbnail,content,description,create_time" subField="" name="hc_featured" limit="100" item="content_sub22" sort="sort asc" isTop="1"} + {hcTaglib:contentPage2 cid="$current_cate_id" mainField="id,category_id,title,sub_title,thumbnail,content,description,create_time,is_top" subField="" name="hc_featured" limit="100" item="content_sub22" sort="sort asc" isTop="1"} {/hcTaglib:contentPage2} {php} $news_has_featured = false; @@ -110,8 +110,8 @@ {volist name="hc_featured" id="vo_content"} {php} $content = $vo_content['content'] ?? ''; // 富文本 - $description = $vo_content['description'] ?? ''; - $title = $vo_content['description'] ?? ''; + $description = $vo_content['description'] ?? ''; // 描述 + $title = $vo_content['title'] ?? ''; // 标题 $create_time_str = $vo_content['create_time'] ?? ''; {/php}