first commit
此提交包含在:
@@ -0,0 +1,125 @@
|
||||
<#def title = "扬彩帮助中心"/>
|
||||
<#def keywords = "帮助中心"/>
|
||||
<#def desc = "扬彩帮助中心"/>
|
||||
<#--头部起始-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>扬彩知识库</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="Keywords" content="知识库" />
|
||||
<meta name="Description" content="扬彩知识库" />
|
||||
<link rel="shortcut icon" type="image/ico" href="/favicon.ico">
|
||||
${Styles.src(zhiqim.css)}
|
||||
${Scripts.src(zhiqim.js)}
|
||||
${Styles.src(context.getRootPath("/zinc/css/yangcai_question_main_v1.4.0R2018031701.css"))}
|
||||
${Scripts.src(context.getRootPath("/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js"))}
|
||||
</head>
|
||||
|
||||
</div>
|
||||
<!--固定的111margin-->
|
||||
<div style="margin-top:10px"></div>
|
||||
<script>
|
||||
Z.onload(function()
|
||||
{
|
||||
//左侧分类列表点击事件
|
||||
Z(".sidebar p").click(function()
|
||||
{
|
||||
var $thisUl = Z(this).next("ul");
|
||||
var hasChild = ($thisUl.find("li").length > 0)?(1):(0);
|
||||
if (hasChild)
|
||||
{
|
||||
var $ulDisplay = $thisUl.css("display");
|
||||
var $thisIcon = Z(this).find(".z-font");
|
||||
$thisUl.slideToggle().siblings("ul").slideUp();
|
||||
if ($ulDisplay == "block")
|
||||
return Z(".sidebar p>.z-font").removeClass("z-arrowhead-up").addClass("z-arrowhead-down");
|
||||
Z(".sidebar p>.z-font").removeClass("z-arrowhead-up").addClass("z-arrowhead-down");
|
||||
$thisIcon.removeClass("z-arrowhead-down").addClass("z-arrowhead-up");
|
||||
}
|
||||
else
|
||||
selectCategory(Z(this).attr("data-id"));
|
||||
});
|
||||
|
||||
//定义搜索框
|
||||
var search = new Z.SearchAutoList();
|
||||
search.elem = "searchinput";
|
||||
search.className = "SearchPresenter";
|
||||
search.methodName = "search";
|
||||
search.callback = function(){doSearchAjax(this.value);};
|
||||
search.execute();
|
||||
})
|
||||
|
||||
//分类选择
|
||||
function selectCategory(id){
|
||||
window.location.href = "/question.htm?categoryId=" + id;
|
||||
}
|
||||
|
||||
//文章显示
|
||||
function getArticle(categoryId,articleId)
|
||||
{
|
||||
window.location.href = "/question.htm?categoryId=" + categoryId + "&articleId=" + articleId;
|
||||
}
|
||||
|
||||
//执行搜索
|
||||
function doSearchAjax(str)
|
||||
{
|
||||
window.location.href = "/search.htm?keyword=" + str;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<#--容器开始-->
|
||||
<!-- 左边导航 -->
|
||||
<div class="sidebar" style="position: fixed;left: 0;top:0;bottom: 0;width:15%;margin-top:10px">
|
||||
<p data-id="0" class="<#if categoryId == 0>z-selected</#if>">热门问题</p>
|
||||
<#for category : categoryList>
|
||||
<#if category.getCategoryLevel() == 2>
|
||||
<p data-id="${category.getCategoryId()}" class="<#if category.getCategoryId()==categoryId>z-selected</#if>">
|
||||
<#if parentList.get(categoryList.indexOf(category))><i class="z-font <#if selectedList.get(categoryList.indexOf(category))>z-arrowhead-up<#else>z-arrowhead-down</#if> z-float-left z-mg-r10"></i></#if>${category.getCategoryName()}
|
||||
</p>
|
||||
<ul style="display:<#if selectedList.get(categoryList.indexOf(category))>block<#else>none</#if>;">
|
||||
<#for child : childrenList>
|
||||
<#if child.getParentId() == category.getCategoryId()>
|
||||
<li <#if categoryId == child.getCategoryId()>class="z-selected"</#if> onclick="selectCategory(${child.getCategoryId()})">${child.getCategoryName()}</li>
|
||||
</#if>
|
||||
</#for>
|
||||
</ul>
|
||||
</#if>
|
||||
</#for>
|
||||
</div>
|
||||
|
||||
<!-- 右边主体 -->
|
||||
<div class="mainbody" style="width:84%;" >
|
||||
<!-- 搜索框 -->
|
||||
<div class="mainsearch">
|
||||
<span class="z-show-ib" id="search_wrap">
|
||||
<input id="searchinput" placeholder="输入问题关键词" type="text" class="z-input z-xlarge"><button onclick="doSearchAjax(searchinput.value)" class="z-button"></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="questionbody" id="questionbody">
|
||||
<!-- 显示文章 -->
|
||||
<#if articleStr != null>
|
||||
<div class="article">
|
||||
${articleStr}</br>
|
||||
</div>
|
||||
<div class="article" >
|
||||
${content}
|
||||
</div>
|
||||
<!-- 显示列表 -->
|
||||
<#elseif !articleList.isEmpty()>
|
||||
<dl class="article-list">
|
||||
<#for article : articleList>
|
||||
<dd><a href="javascript:{getArticle(${article.getCategoryId()},${article.getArticleId()})}">${article.getArticleTitle()}</a><span style="float:right">${article.getArticleTime().toString().substring(0, article.getArticleTime().toString().length() - 2)}</span></dd>
|
||||
</#for>
|
||||
</dl>
|
||||
<#else>
|
||||
<h2 style="font-weight:normal;">没有找到相关项目</h2>
|
||||
</#if>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
新增問題並參考
封鎖使用者