MCPcopy Create free account
hub / github.com/TruthHun/DocHub / DownFree

Method DownFree

controllers/HomeControllers/ViewController.go:108–116  ·  view source on GitHub ↗

是否可以免费下载

()

Source from the content-addressed store, hash-verified

106
107//是否可以免费下载
108func (this *ViewController) DownFree() {
109 if this.IsLogin > 0 {
110 did, _ := this.GetInt("id")
111 if free := models.NewFreeDown().IsFreeDown(this.IsLogin, did); free {
112 this.ResponseJson(true, fmt.Sprintf("您上次下载过当前文档,且仍在免费下载有效期(%v天)内,本次下载免费", this.Sys.FreeDay))
113 }
114 }
115 this.ResponseJson(false, "不能免费下载,不在免费下载期限内")
116}
117
118//文档评论
119func (this *ViewController) Comment() {

Callers

nothing calls this directly

Calls 2

IsFreeDownMethod · 0.80
ResponseJsonMethod · 0.45

Tested by

no test coverage detected