示例#1
0
func (this *MainController) Get() {
	wp := models.NewWebPage("home")
	wp.IncrViewCount()

	this.Data["PageTitle"] = "FANX-HOME"
	this.Data["Website"] = "beego.me"
	this.Data["Email"] = "*****@*****.**"
	this.Data["StaticHost"] = beego.AppConfig.String("static_host")
	this.TplNames = "index.tpl"
}
示例#2
0
func (this *InfoController) Get() {
	wp := models.NewWebPage("info")

	this.Data["PageTitle"] = "FANX-INFO"
	this.Data["StaticHost"] = beego.AppConfig.String("static_host")
	this.Data["ViewCount"] = strconv.Itoa(wp.IncrViewCount())
	this.Data["PageMap"] = wp.GetWebPages()
	this.Data["PageCount"] = wp.GetWebPageCount()

	this.TplNames = "info.tpl"
}