mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-17 18:31:21 +08:00
1、优化文档缓存逻辑
2、新增标签管理功能 3、优化部分页面显示效果
This commit is contained in:
@@ -123,7 +123,15 @@ func (c *BaseController) BaseUrl() string {
|
||||
//显示错误信息页面.
|
||||
func (c *BaseController) ShowErrorPage(errCode int, errMsg string) {
|
||||
c.TplName = "errors/error.tpl"
|
||||
|
||||
c.Data["ErrorMessage"] = errMsg
|
||||
c.Data["ErrorCode"] = errCode
|
||||
c.StopRun()
|
||||
|
||||
var buf bytes.Buffer
|
||||
|
||||
if err := beego.ExecuteViewPathTemplate(&buf, "document/export.tpl", beego.BConfig.WebConfig.ViewsPath, map[string]interface{}{"ErrorMessage": errMsg, "errCode": errCode, "BaseUrl": conf.BaseUrl}); err != nil {
|
||||
c.Abort("500")
|
||||
}
|
||||
|
||||
c.CustomAbort(200,buf.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user