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" }
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" }