是否可以免费下载
()
| 106 | |
| 107 | //是否可以免费下载 |
| 108 | func (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 | //文档评论 |
| 119 | func (this *ViewController) Comment() { |
nothing calls this directly
no test coverage detected