Browse Source

fix:bug

token_replace
Tooooommy 5 years ago
parent
commit
779cd208b9
  1. 16
      controllers/client/sign.go

16
controllers/client/sign.go

@ -90,9 +90,23 @@ func (t *SignCtl) CheckSign() {
func (t *SignCtl) Setting() {
activityId := t.MustGetInt("activity_id")
areaId := t.MustGetInt("area_id")
activity := &models.Activity{}
exist, err := models.Get(activity, activityId)
t.CheckErr(err)
t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在")
area := &models.AreaStore{}
exist, err = models.Get(area, areaId)
t.CheckErr(err)
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "此直播间已被删除")
if activity.MoreAreaMode == define.StatusClose && area.IsMainArea != 1 {
t.ERROR("多地区功能关闭,链接失效,请打开后再试", code.MSG_AREASTORE_CLOSED)
}
service := new(models.ModuleService)
exist, err := service.GetByName(define.MODULE_SIGNIN)
exist, err = service.GetByName(define.MODULE_SIGNIN)
t.CheckErr(err)
t.Assert(exist, code.MSG_MODULE_NOT_EXIST, "签到模块不存在")
historyIds, err := models.GetModuleServiceHistoryIdsByIdAndName(service.Id, service.Name)

Loading…
Cancel
Save