Browse Source

fix:bug

dev
Tooooommy 4 years ago
parent
commit
3d2c67fc27
  1. 20
      controllers/client/login.go

20
controllers/client/login.go

@ -123,16 +123,16 @@ func (t *UserCtl) WxLogin() {
t.CheckErr(err)
// 校验邀请函是否开启
invitation := new(models.Invitation)
exist, err = invitation.GetInvitationByActivityId(activityId)
t.CheckErr(err)
//t.Assert(exist, code.MSG_INVITE_SETTING_NOT_EXIST, "邀请函设置不存在")
if exist { // 存在邀请函
letter := new(models.InvitationLetter)
exist, err = letter.GetByUserIdAndActivityId(user.Id, activity.Id, activity.ArchId, activity.RehearsalId)
t.CheckErr(err)
t.Assert(exist, code.MSG_INVITE_LETTER_NOT_EXIST, "您尚未接受过邀请")
}
//invitation := new(models.Invitation)
//exist, err = invitation.GetInvitationByActivityId(activityId)
//t.CheckErr(err)
////t.Assert(exist, code.MSG_INVITE_SETTING_NOT_EXIST, "邀请函设置不存在")
//if exist { // 存在邀请函
// letter := new(models.InvitationLetter)
// exist, err = letter.GetByUserIdAndActivityId(user.Id, activity.Id, activity.ArchId, activity.RehearsalId)
// t.CheckErr(err)
// t.Assert(exist, code.MSG_INVITE_LETTER_NOT_EXIST, "您尚未接受过邀请")
//}
sign := new(models.SignUp)
exist, err = sign.GetByActivityId(activityId)

Loading…
Cancel
Save