码农笔录博客源码
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

27 lignes
667 B

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