实现单页文章功能

This commit is contained in:
lifei6671
2018-07-13 16:46:40 +08:00
parent 5b5d150d8a
commit 3f6555ac82
4 changed files with 152 additions and 26 deletions

View File

@@ -172,11 +172,20 @@ func (c *DocumentController) Read() {
docInfo += ";更新于 "
docInfo += doc.ModifyTime.Local().Format("2006-01-02 15:04")
if strings.TrimSpace(doc.Release) != "" {
doc.Release += "<div class=\"wiki-bottom\">文档更新时间: " + doc.ModifyTime.Local().Format("2006-01-02 15:04") + "</div>";
doc.Release += "<div class=\"wiki-bottom\">文档更新时间: " + doc.ModifyTime.Local().Format("2006-01-02 15:04") +" &nbsp;&nbsp;作者:";
if docCreator != nil {
if docCreator.RealName != "" {
doc.Release += docCreator.RealName
}else{
doc.Release += docCreator.Account
}
}
doc.Release += "</div>"
}
}
if c.IsAjax() {
var data struct {
DocTitle string `json:"doc_title"`