瀏覽代碼

no message

xingzai 3 年之前
父節點
當前提交
85ce92bd49
共有 1 個文件被更改,包括 11 次插入12 次删除
  1. 11 12
      controllers/activity.go

+ 11 - 12
controllers/activity.go

@@ -511,18 +511,17 @@ func (this *ActivityCoAntroller) SignupAdd() {
 						}
 					}
 				}
-
-				total, err = models.GetActivitySignupCount(uid, activityId)
-				if err != nil {
-					br.Msg = "获取失败"
-					br.ErrMsg = "获取失败,Err:" + err.Error()
-					return
-				}
-				if total > 0 {
-					br.Msg = "您已报名这个活动"
-					return
-				}
 				if signupStatus == "Success" {
+					total, err = models.GetActivitySignupCount(uid, activityId)
+					if err != nil {
+						br.Msg = "获取失败"
+						br.ErrMsg = "获取失败,Err:" + err.Error()
+						return
+					}
+					if total > 0 {
+						br.Msg = "您已报名这个活动"
+						return
+					}
 					item.UserId = uid
 					item.ActivityId = activityId
 					item.CreateTime = time.Now()
@@ -538,8 +537,8 @@ func (this *ActivityCoAntroller) SignupAdd() {
 						br.ErrMsg = "操作失败,Err:" + errSignup.Error()
 						return
 					}
+					resp.HaqveJurisdiction = true
 				}
-				resp.HaqveJurisdiction = true
 			} else {
 				resp.PopupMsg = "您暂无权限参加【" + activityInfo.ChartPermissionName + "】行业活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile
 				resp.SellerMobile = companyItem.Mobile