()
| 570 | } |
| 571 | |
| 572 | func (this *BaseController) SignToday() { |
| 573 | if this.Member == nil || this.Member.MemberId == 0 { |
| 574 | this.JsonResult(1, "请先登录") |
| 575 | } |
| 576 | reward, err := models.NewSign().Sign(this.Member.MemberId, false) |
| 577 | if err != nil { |
| 578 | this.JsonResult(1, "签到失败:"+err.Error()) |
| 579 | } |
| 580 | this.JsonResult(0, fmt.Sprintf("恭喜您,签到成功,奖励阅读时长 %v 秒", reward)) |
| 581 | } |
| 582 | |
| 583 | func (this *BaseController) forbidGeneralRole() bool { |
| 584 | // 如果只有作者和管理员才能写作的话,那么已创建了书籍的普通用户无法将书籍转为公开或者是私密分享 |
nothing calls this directly
no test coverage detected