Browse Source

新闻业置顶bug修复

master
xiaodong 2 weeks ago
parent
commit
e198925fd5
  1. 3
      app/service/ContentService.php
  2. 8
      public/themes/website/1/zh/demo/news.html

3
app/service/ContentService.php

@ -471,6 +471,9 @@ class ContentService {
if($param['isTop'] != 2){ if($param['isTop'] != 2){
$where['is_top'] = 1; $where['is_top'] = 1;
} }
if($param['isTop'] == 2){
$where['is_top'] = 2;
}
// switch ($param['isTop']) { // switch ($param['isTop']) {
// case 1: // case 1:

8
public/themes/website/1/zh/demo/news.html

@ -91,7 +91,7 @@
</div> </div>
</div> </div>
{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} {/hcTaglib:contentPage2}
{php} {php}
$news_has_featured = false; $news_has_featured = false;
@ -110,8 +110,8 @@
{volist name="hc_featured" id="vo_content"} {volist name="hc_featured" id="vo_content"}
{php} {php}
$content = $vo_content['content'] ?? ''; // 富文本 $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'] ?? ''; $create_time_str = $vo_content['create_time'] ?? '';
{/php} {/php}
<div class="swiper-slide n-featured__slide" data-category="company"> <div class="swiper-slide n-featured__slide" data-category="company">
@ -169,7 +169,7 @@
<div class="n-grid"> <div class="n-grid">
{hcTaglib:contentPage2 cid="$current_cate_id" mainField="id,category_id,title,sub_title,thumbnail,content,description,create_time" subField="" name="hc_content" limit="6" item="content_sub22" sort="sort asc" isTop="2"}
{hcTaglib:contentPage2 cid="$current_cate_id" mainField="id,category_id,title,sub_title,thumbnail,content,description,create_time,is_top" subField="" name="hc_content" limit="6" item="content_sub22" sort="sort asc" isTop="2"}
{/hcTaglib:contentPage2} {/hcTaglib:contentPage2}
{volist name="hc_content" id="vo_content"} {volist name="hc_content" id="vo_content"}

Loading…
Cancel
Save