码农笔录博客源码
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 lines
667 B

преди 6 години
package controllers
import (
преди 6 години
"beeblog/service"
преди 3 години
beego "github.com/beego/beego/v2/server/web"
преди 6 години
)
type IndexController struct {
beego.Controller
}
преди 6 години
func (this *IndexController) Get() {
преди 5 години
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 години
}