码农笔录博客源码
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

31 wiersze
815 B

6 lat temu
package controllers
import (
"github.com/astaxie/beego"
6 lat temu
"beeblog/service"
6 lat temu
)
type IndexController struct {
beego.Controller
}
6 lat temu
func (this *IndexController) Get() {
6 lat temu
blogService := service.BlogService{}
timeBlog, _ := blogService.IndexBlogs(12, 0)
6 lat temu
this.Data["TimeBlog"] = timeBlog
6 lat temu
browsBlog, _ := blogService.IndexBlogs(12, 1)
6 lat temu
this.Data["BrowsBlog"] = browsBlog
6 lat temu
likeBlog, _ := blogService.IndexBlogs(12, 2)
6 lat temu
this.Data["LikeBlog"] = likeBlog
6 lat temu
commentBlog, _ := blogService.IndexBlogs(12, 3)
6 lat temu
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"
6 lat temu
return
6 lat temu
}