MCPcopy Index your code
hub / github.com/TruthHun/BookStack / Fans

Method Fans

controllers/UserController.go:121–142  ·  view source on GitHub ↗

粉丝和关注

()

Source from the content-addressed store, hash-verified

119
120//粉丝和关注
121func (this *UserController) Fans() {
122 page, _ := this.GetInt("page")
123 pageSize := 18
124 if page < 1 {
125 page = 1
126 }
127 fans, totalCount, _ := new(models.Fans).GetFansList(this.UcenterMember.MemberId, page, pageSize)
128 if totalCount > 0 {
129 html := utils.NewPaginations(conf.RollPage, int(totalCount), pageSize, page, beego.URLFor("UserController.Fans", ":username", this.UcenterMember.Account), "")
130 this.Data["PageHtml"] = html
131 } else {
132 this.Data["PageHtml"] = ""
133 }
134 this.GetSeoByPage("ucenter-fans", map[string]string{
135 "title": "粉丝 - " + this.UcenterMember.Nickname,
136 "keywords": "用户粉丝," + this.UcenterMember.Nickname,
137 "description": this.Sitename + "专注于文档在线写作、协作、分享、阅读与托管,让每个人更方便地发布、分享和获得知识。",
138 })
139 this.Data["Fans"] = fans
140 this.Data["Tab"] = "fans"
141 this.TplName = "user/fans.html"
142}

Callers

nothing calls this directly

Calls 3

NewPaginationsFunction · 0.92
GetFansListMethod · 0.80
GetSeoByPageMethod · 0.80

Tested by

no test coverage detected