소스 검색

no message

xingzai 2 년 전
부모
커밋
d63c692c15
2개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      controllers/activity.go
  2. 2 0
      models/activity.go

+ 10 - 0
controllers/activity.go

@@ -549,6 +549,7 @@ func (this *ActivityCoAntroller) ScheduleList() {
 		imgUrlChart = vslice[len(vslice)-1]
 		mapChart[chartName] = imgUrlChart
 	}
+
 	for k, v := range list {
 		if strings.Contains(v.ActivityName, "【") {
 			list[k].IsBrackets = 1
@@ -613,6 +614,14 @@ func (this *ActivityCoAntroller) ScheduleList() {
 		br.ErrMsg = "GetActivityVideoResp,Err:" + err.Error()
 		return
 	}
+
+	//处理不同的报名方式按钮回显
+	mapActivitySignup, err := services.GetActivitySignupResp(mapActivityId, user)
+	if err != nil {
+		br.Msg = "获取信息失败"
+		br.ErrMsg = "GetActivitySignupResp,Err:" + err.Error()
+		return
+	}
 	for k, v := range list {
 		if mapActivityVoice[v.ActivityId] != nil {
 			list[k].FileType = 1
@@ -624,6 +633,7 @@ func (this *ActivityCoAntroller) ScheduleList() {
 			list[k].AudioLink = true
 			list[k].VideoDetail = mapActivityVideo[v.ActivityId]
 		}
+		v.SignupType = mapActivitySignup[v.ActivityId]
 		//处理列表的标签是否展示逻辑
 		resp.List = append(resp.List, services.ActivityButtonShow(v))
 	}

+ 2 - 0
models/activity.go

@@ -408,6 +408,7 @@ func GetScheduleAndSpecilList(condition string, pars []interface{}, conditionSpe
 			art.is_can_appointment_minutes,
 			art.activity_type_id,
 			art.limit_people_num,
+			art.is_limit_people,
 			1 AS source_type,
 			art.activity_time, 
 			art.city
@@ -439,6 +440,7 @@ func GetScheduleAndSpecilList(condition string, pars []interface{}, conditionSpe
 			"",
 			"",
 			"",
+			"",
 			2 AS source_type,
 			art.activity_time,
 			""