diff --git a/app/index/controller/TopsNas.php b/app/index/controller/TopsNas.php index ef485cd..447382c 100755 --- a/app/index/controller/TopsNas.php +++ b/app/index/controller/TopsNas.php @@ -469,7 +469,7 @@ class TopsNas extends BaseController unset($val); $this->assign('categorys', $categorys); $this->assign('article', $article); - $this->assign('cid', request()->param('cid')); + $this->assign('cid', request()->param('cid', $article->cid)); } return $this->fetch(); diff --git a/app/index/view/tops_nas/helper.phtml b/app/index/view/tops_nas/helper.phtml index d0fde51..6874f10 100644 --- a/app/index/view/tops_nas/helper.phtml +++ b/app/index/view/tops_nas/helper.phtml @@ -34,8 +34,8 @@ } .narshelpCenterPc .pagetopbg .nhlp-search { width: 35%; - height: 3rem; - border-radius: 1.5625rem; + height: 48px; + border-radius: 24px; background: #5299e1; flex-direction: row; align-items: center; @@ -49,8 +49,8 @@ } .narshelpCenterPc .pagetopbg .nhlp-search .nhlp-ipt { border: none; - width: 85%; - height: 3rem; + width: 86%; + height: 48px; margin-left: 5%; color: #fff; background: transparent; @@ -68,7 +68,7 @@ } .narshelpCenterPc .pagetopbg .nhlp-search input::placeholder { color: #fff; - padding-left: 20%; + text-align: center; font-size: 16px; } .narshelpCenterPc .nhlppart1 { @@ -323,7 +323,7 @@
@@ -348,11 +348,13 @@ {/volist} - 查看更多 - + {if condition="count($vo.articles) >= 3"} + 查看更多 + + {/if}
{/volist} diff --git a/app/index/view/tops_nas/helper_detail.phtml b/app/index/view/tops_nas/helper_detail.phtml index 0c82a72..91f2a7b 100644 --- a/app/index/view/tops_nas/helper_detail.phtml +++ b/app/index/view/tops_nas/helper_detail.phtml @@ -88,7 +88,7 @@ } .narshelpdetailPc .narsssmain .nars-hlp-search input::placeholder { color: #8f9099; - padding-left: 10%; + text-align: center; font-size: 14px; } .narshelpdetailPc .nars-help-content { @@ -153,13 +153,14 @@ .narshelpdetailPc .nars-help-content .nars-hlpdt-ml .sub-list li:first a { padding-top: 0; } - .narshelpdetailPc .nars-help-content .nars-hlpdt-ml .sub-list li a:hover { + .narshelpdetailPc .nars-help-content .nars-hlpdt-ml .sub-list li a:hover, + .narshelpdetailPc .nars-help-content .nars-hlpdt-ml .sub-list li a.active { color: #1f2635; border-bottom: 1px solid #1f2635; } .narshelpdetailPc .nars-help-content .nars-hlpdt-mm { padding: 32px 150px; - max-height: 800px; + max-height: 920px; min-height: 700px; height: auto; flex: 1; @@ -285,7 +286,7 @@
帮助中心 / 使用教程
@@ -304,7 +305,9 @@
@@ -370,25 +373,10 @@ }, 300); }) // 内容 - readerContentTitle(); - $('.sub-list li').click(function() { - var id = $(this).data('id'); - $.ajax({ - url: '{:url("tops_nas/helper_detail")}?id=' + id, - type: 'GET', - dataType: 'JSON', - success: function(r) { - $('#rendered-content div').html(r.data.content); - readerContentTitle(); - } - }) - }) - }); - function readerContentTitle() { - // 清空标题列表 + // 清空标题列表 $("#title-list ul").empty(); // 提取 h1 标题 - var h1Titles = $("#rendered-content").find("h2"); + var h1Titles = $("#rendered-content").find("h3"); h1Titles.each(function(index) { var title = $(this); var titleText = title.text(); @@ -397,12 +385,12 @@ var listItem = $("
  • "); var link = $("", { href: "#" + titleId, - text: (index+1+'. ')+titleText + text: titleText }); listItem.append(link); $("#title-list ul").append(listItem); }); - } + }); \ No newline at end of file