Bladeren bron

活动进行中的图片进行更换

xingzai 2 jaren geleden
bovenliggende
commit
ed0522c38f
1 gewijzigde bestanden met toevoegingen van 7 en 6 verwijderingen
  1. 7 6
      controllers/activity.go

+ 7 - 6
controllers/activity.go

@@ -2943,24 +2943,25 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 		}
 	}
 
-	for k, v := range activityList {
+	for _, v := range activityList {
 		if v.ActivityType == 0 {
 			if mapAddress[v.City] != "" {
-				list[k].ImgUrl = mapAddress[v.City]
+				v.ImgUrl = mapAddress[v.City]
 			} else {
-				list[k].ImgUrl = mapAddress["其它"]
+				v.ImgUrl = mapAddress["其它"]
 			}
 		} else {
 			if mapChart[v.ChartPermissionName] != "" {
-				list[k].ImgUrl = mapChart[v.ChartPermissionName]
+				v.ImgUrl = mapChart[v.ChartPermissionName]
 			}
 		}
 		if mapActivityVoice[v.ActivityId] != nil {
-			list[k].AudioLink = true
-			list[k].VoiceList = mapActivityVoice[v.ActivityId]
+			v.AudioLink = true
+			v.VoiceList = mapActivityVoice[v.ActivityId]
 		}
 		resp.List = append(resp.List, services.ActivityButtonShow(v))
 	}
+
 	//添加活动搜索记录
 	if keyWord != "" {
 		go services.AddActivitykeyWordSearch(keyWord, user)