fix: pc nas专题帮助中心文件分类选中问题
This commit is contained in:
@@ -290,6 +290,7 @@ class TopicNas extends Common
|
||||
// 获取文章数据
|
||||
$articles = ArticleModel::field([
|
||||
'id',
|
||||
'category_id',
|
||||
'title'
|
||||
])
|
||||
->withSearch(['title'], [
|
||||
|
||||
@@ -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>'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user