refactor:重构错误页,优化编辑器,上传新效果图

This commit is contained in:
lifei6671
2018-08-17 18:05:04 +08:00
parent fede48cf51
commit 913354ef17
10 changed files with 17 additions and 20 deletions

View File

@@ -161,7 +161,6 @@ func (c *BaseController) ShowErrorPage(errCode int, errMsg string) {
if errCode >= 200 && errCode <= 510 {
c.CustomAbort(errCode, buf.String())
}else{
c.CustomAbort(200, buf.String())
c.CustomAbort(500, buf.String())
}
}

View File

@@ -120,7 +120,7 @@ func (c *DocumentController) Read() {
doc, err = doc.FromCacheById(docId)
if err != nil {
beego.Error("从缓存中读取文档时失败 ->", err)
c.ShowErrorPage(500, "文档不存在或已删除")
c.ShowErrorPage(404, "文档不存在或已删除")
}
} else {
doc, err = doc.FromCacheByIdentify(id, bookResult.BookId)