码农笔录博客源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 line
667 B

6 年之前
package controllers
import (
6 年之前
"beeblog/service"
4 年之前
beego "github.com/beego/beego/v2/server/web"
6 年之前
)
type IndexController struct {
beego.Controller
}
6 年之前
func (this *IndexController) Get() {
6 年之前
blogService := service.BlogService{}
3 年之前
timeBlog, _ := blogService.IndexBlogs(27, 0)
6 年之前
this.Data["TimeBlog"] = timeBlog
3 年之前
browsBlog, _ := blogService.IndexBlogs(27, 1)
6 年之前
this.Data["BrowsBlog"] = browsBlog
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 年之前
return
6 年之前
}