fix: pc nas专题帮助中心文件分类选中问题
This commit is contained in:
@@ -290,6 +290,7 @@ class TopicNas extends Common
|
|||||||
// 获取文章数据
|
// 获取文章数据
|
||||||
$articles = ArticleModel::field([
|
$articles = ArticleModel::field([
|
||||||
'id',
|
'id',
|
||||||
|
'category_id',
|
||||||
'title'
|
'title'
|
||||||
])
|
])
|
||||||
->withSearch(['title'], [
|
->withSearch(['title'], [
|
||||||
|
|||||||
@@ -42,7 +42,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="sub-list" {if condition='$ac.id == $Request.get.cid'}style="display: block;"{/if}>
|
<ul class="sub-list" {if condition='$ac.id == $Request.get.cid'}style="display: block;"{/if}>
|
||||||
{volist name="ac.article" id="ar"}
|
{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}
|
{/volist}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,7 +107,7 @@
|
|||||||
html = '<ul>'
|
html = '<ul>'
|
||||||
$.each(r.data, function (k, v) {
|
$.each(r.data, function (k, v) {
|
||||||
html +=
|
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>'
|
html += '</ul>'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
width: fit-content;
|
width: fit-content;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
padding-top: 22px;
|
padding-top: 6px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-left: 41px;
|
margin-left: 41px;
|
||||||
|
|||||||
Reference in New Issue
Block a user