Browse Source

活动专家电话会图标

xingzai 3 years ago
parent
commit
6a1049f114
2 changed files with 16 additions and 3 deletions
  1. 13 1
      controllers/activity.go
  2. 3 2
      models/activity_type.go

+ 13 - 1
controllers/activity.go

@@ -2490,7 +2490,19 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp := new(models.GetCygxActivityListRep)
 	resp.Label = label
-	resp.ImgUrl = ""
+	if activityTypeId != "" {
+		activityTypeIdint, err := strconv.Atoi(activityTypeId)
+		if err == nil {
+			detail, errDetail := models.GetActivityTypeDetailById(activityTypeIdint)
+			if errDetail != nil {
+				br.Msg = "获取信息失败"
+				br.ErrMsg = "获取信息失败,Err:" + errDetail.Error()
+				return
+			}
+			resp.ImgUrl = detail.OnlineIco
+			resp.Label = detail.ActivityTypeName
+		}
+	}
 	resp.List = list
 	resp.Paging = page
 	br.Ret = 200

+ 3 - 2
models/activity_type.go

@@ -9,8 +9,9 @@ type ActivityType struct {
 	ActivityTypeName string `description:"活动名称"`
 	//TemplateP        string `description:"活动模板,带P标签"`
 	//Template         string `description:"活动模板"`
-	ShowType string `description:"人数限制类型,1不展示限制,2可选限制,3强制限制"`
-	IsChoose bool   `description:"是否选择"`
+	ShowType  string `description:"人数限制类型,1不展示限制,2可选限制,3强制限制"`
+	IsChoose  bool   `description:"是否选择"`
+	OnlineIco string `description:"线上线下Ico图标"`
 }
 
 type ActivityTypeListResp struct {