码农笔录博客源码
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

30 líneas
761 B

hace 6 años
package controllers
import (
"github.com/astaxie/beego"
hace 6 años
"beeblog/service"
hace 6 años
)
type IndexController struct {
beego.Controller
}
hace 6 años
func (this *IndexController) Get() {
hace 6 años
timeBlog, _ := service.IndexBlogs(12, 0)
this.Data["TimeBlog"] = timeBlog
browsBlog, _ := service.IndexBlogs(12, 1)
this.Data["BrowsBlog"] = browsBlog
likeBlog, _ := service.IndexBlogs(12, 2)
this.Data["LikeBlog"] = likeBlog
commentBlog, _ := service.IndexBlogs(12, 3)
this.Data["CommBlog"] = commentBlog
this.Data["UserId"] = this.GetSession("userid")
this.Data["HeadImg"] = this.GetSession("headimg")
this.Data["NickName"] = this.GetSession("nickname")
this.Data["IsLogin"] = this.GetSession("nickname") != nil
this.Data["IsHome"] = true
this.TplName = "index.html"
hace 6 años
return
hace 6 años
}