Browse Source

no message

xingzai 9 months ago
parent
commit
c336b5f80b
3 changed files with 8 additions and 6 deletions
  1. 7 5
      controllers/activity.go
  2. 1 0
      models/activity.go
  3. 0 1
      models/activity_signup.go

+ 7 - 5
controllers/activity.go

@@ -1031,11 +1031,6 @@ func (this *ActivityController) SignupAdd() {
 		return
 	}
 	resp.IsResearchSpecial = isResearchSpecial
-	activtyPayTotal := services.GetCygxOrderVirtualAssetdCountTotal(user.Mobile, activityId)
-	if activtyPayTotal > 0 {
-		resp.IsResearchSpecial = false //单场购买的活动设为 false 配合前端样式展示使用
-		resp.IsPayActivity = true
-	}
 
 	if havePower {
 		item := new(models.CygxActivitySignup)
@@ -2518,6 +2513,13 @@ func (this *ActivityController) Check() {
 		return
 	}
 	resp.IsResearchSpecial = isResearchSpecial
+
+	activtyPayTotal := services.GetCygxOrderVirtualAssetdCountTotal(user.Mobile, activityId)
+	if activtyPayTotal > 0 {
+		resp.IsResearchSpecial = false //单场购买的活动设为 false 配合前端样式展示使用
+		resp.IsPayActivity = true
+	}
+
 	if havePower {
 		hasPermission = 1
 		resp.CheckPermission = true

+ 1 - 0
models/activity.go

@@ -265,6 +265,7 @@ type ActivityCheck struct {
 	IsCompanyApply     bool                   `description:"机构是否申请过试用"`
 	IsNeedBusinessCard bool                   `description:"是否需要上传名片"`
 	GoodsList          []*order.CygxGoodsResp `description:"商品信息"`
+	IsPayActivity      bool                   `description:"是否是花钱购买的单场活动"`
 }
 
 type ActivityArticleResp struct {

+ 0 - 1
models/activity_signup.go

@@ -41,7 +41,6 @@ type SignupStatus struct {
 	GoBindEmail       bool   `description:"是否去绑定邮箱"`
 	IsResearch        bool   `description:"是否属于研选"`
 	IsResearchSpecial bool   `description:"是否属于特殊的研选"`
-	IsPayActivity     bool   `description:"是否是花钱购买的单场活动"`
 }
 type ActivitySingnupRep struct {
 	ActivityId int    `description:"活动id"`