fix: pc nas专题帮助中心文件分类选中问题

This commit is contained in:
2025-06-19 16:51:58 +08:00
parent 446ec81410
commit 1fec0dcc42
3 changed files with 11 additions and 3 deletions

View File

@@ -290,6 +290,7 @@ class TopicNas extends Common
// 获取文章数据
$articles = ArticleModel::field([
'id',
'category_id',
'title'
])
->withSearch(['title'], [

View File

@@ -42,7 +42,14 @@
</div>
<ul class="sub-list" {if condition='$ac.id == $Request.get.cid'}style="display: block;"{/if}>
{volist name="ac.article" id="ar"}
<li><a href="{:url('/index/topic/nas/help_detail', ['id' => $ar.id])}" style="padding-top: 6px;">{$ar.title}</a></li>
<li>
<a
href="{:url('/index/topic/nas/help_detail', ['cid' => $ac.id, 'id' => $ar.id])}"
{eq name="ar.id" value="$Request.get.id"}class="active"{/eq}
>
{$ar.title}
</a>
</li>
{/volist}
</ul>
</div>
@@ -100,7 +107,7 @@
html = '<ul>'
$.each(r.data, function (k, v) {
html +=
'<li><a href="{:url(\'/index/topic/nas/help_detail\')}?id=' + v.id + '">' + v.title + '</a></li>'
'<li><a href="{:url(\'/index/topic/nas/help_detail\')}?cid=' + v.category_id + '&id=' + v.id + '">' + v.title + '</a></li>'
})
html += '</ul>'
}

View File

@@ -155,7 +155,7 @@
width: fit-content;
display: block;
margin: 0 10px;
padding-top: 22px;
padding-top: 6px;
text-decoration: none;
color: #333;
margin-left: 41px;