Bladeren bron

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

xingzai 2 jaren geleden
bovenliggende
commit
9f25a288a5
1 gewijzigde bestanden met toevoegingen van 11 en 0 verwijderingen
  1. 11 0
      controllers/activity.go

+ 11 - 0
controllers/activity.go

@@ -2944,6 +2944,17 @@ func (this *ActivityCoAntroller) ActivityListNew() {
 	}
 
 	for k, v := range activityList {
+		if v.ActivityType == 0 {
+			if mapAddress[v.City] != "" {
+				list[k].ImgUrl = mapAddress[v.City]
+			} else {
+				list[k].ImgUrl = mapAddress["其它"]
+			}
+		} else {
+			if mapChart[v.ChartPermissionName] != "" {
+				list[k].ImgUrl = mapChart[v.ChartPermissionName]
+			}
+		}
 		if mapActivityVoice[v.ActivityId] != nil {
 			list[k].AudioLink = true
 			list[k].VoiceList = mapActivityVoice[v.ActivityId]