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

Method Follow

controllers/UserController.go:97–118  ·  view source on GitHub ↗

关注

()

Source from the content-addressed store, hash-verified

95
96//关注
97func (this *UserController) Follow() {
98 page, _ := this.GetInt("page")
99 pageSize := 18
100 if page < 1 {
101 page = 1
102 }
103 fans, totalCount, _ := new(models.Fans).GetFollowList(this.UcenterMember.MemberId, page, pageSize)
104 if totalCount > 0 {
105 html := utils.NewPaginations(conf.RollPage, int(totalCount), pageSize, page, beego.URLFor("UserController.Follow", ":username", this.UcenterMember.Account), "")
106 this.Data["PageHtml"] = html
107 } else {
108 this.Data["PageHtml"] = ""
109 }
110 this.GetSeoByPage("ucenter-follow", map[string]string{
111 "title": "关注 - " + this.UcenterMember.Nickname,
112 "keywords": "用户关注," + this.UcenterMember.Nickname,
113 "description": this.Sitename + "专注于文档在线写作、协作、分享、阅读与托管,让每个人更方便地发布、分享和获得知识。",
114 })
115 this.Data["Fans"] = fans
116 this.Data["Tab"] = "follow"
117 this.TplName = "user/fans.html"
118}
119
120//粉丝和关注
121func (this *UserController) Fans() {

Callers

nothing calls this directly

Calls 3

NewPaginationsFunction · 0.92
GetFollowListMethod · 0.80
GetSeoByPageMethod · 0.80

Tested by

no test coverage detected