From e198925fd58a6243d90fd24b1319ca32044b99f4 Mon Sep 17 00:00:00 2001 From: xiaodong Date: Fri, 4 Sep 2026 09:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=97=BB=E4=B8=9A=E7=BD=AE=E9=A1=B6bu?= =?UTF-8?q?g=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/ContentService.php | 3 +++ public/themes/website/1/zh/demo/news.html | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) 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}