实现单页文章功能

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

@@ -0,0 +1,31 @@
package controllers
type BlogController struct{
BaseController
}
func (c *BlogController) Index() {
c.Prepare()
}
func (c *BlogController) List() {
c.Prepare()
}
//管理后台
func (c *BlogController) ManageList() {
c.Prepare()
}
//文章设置
func (c *BlogController) ManageSetting() {
c.Prepare()
}
//文章创建或编辑
func (c *BlogController) ManageEdit() {
c.Prepare()
}

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"`