实现设置第一篇文章为项目默认打开的页面

This commit is contained in:
Minho
2018-03-23 10:00:36 +08:00
parent 789a9155d1
commit e56210165f
20 changed files with 151 additions and 106 deletions

View File

@@ -173,6 +173,9 @@ func RegisterFunction() {
beego.AddFuncMap("cdnimg", conf.URLForWithCdnImage)
//重写url生成支持配置域名以及域名前缀
beego.AddFuncMap("urlfor", conf.URLFor)
beego.AddFuncMap("date_format", func(t time.Time,format string) string {
return t.Local().Format(format)
})
}
//解析命令