MCPcopy Index your code
hub / github.com/TruthHun/DocHub / Pages

Method Pages

controllers/HomeControllers/BaseController.go:149–169  ·  view source on GitHub ↗

单页

()

Source from the content-addressed store, hash-verified

147
148//单页
149func (this *BaseController) Pages() {
150 alias := this.GetString(":page")
151 page, err := models.NewPages().One(alias)
152 if err != nil {
153 helper.Logger.Error(err.Error())
154 this.Abort("404")
155 }
156 if page.Id == 0 || page.Status == false {
157 this.Abort("404")
158 }
159 this.Data["Seo"] = models.NewSeo().GetByPage("PC-Pages", page.Title, page.Keywords, page.Description, this.Sys.Site)
160 page.Vcnt += 1
161 orm.NewOrm().Update(&page, "Vcnt")
162 cs, _ := models.NewCloudStore(false)
163 page.Content = cs.ImageWithDomain(page.Content)
164
165 this.Data["Page"] = page
166 this.Data["Lists"], _, _ = models.NewPages().List(20, 1)
167 this.Data["PageId"] = "wenku-content"
168 this.TplName = "pages.html"
169}

Callers

nothing calls this directly

Calls 5

ImageWithDomainMethod · 0.95
OneMethod · 0.80
GetByPageMethod · 0.80
UpdateMethod · 0.80
ListMethod · 0.45

Tested by

no test coverage detected