Browse Source

no message

xingzai 2 years ago
parent
commit
cdfb1c24ca
1 changed files with 4 additions and 2 deletions
  1. 4 2
      controllers/activity.go

+ 4 - 2
controllers/activity.go

@@ -81,10 +81,12 @@ func (this *ActivityController) LabelTypeList() {
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return
 		return
 	}
 	}
-	if len(speciaItem.List) == 0 {
+
+	if len(speciaItem.List) > 0 {
+		list = append(list, speciaItem)
+	} else {
 		speciaItem.List = make([]*models.CygxActivityLabelList, 0)
 		speciaItem.List = make([]*models.CygxActivityLabelList, 0)
 	}
 	}
-	list = append(list, speciaItem)
 
 
 	resp := new(models.ActivityTypeListHomeResp)
 	resp := new(models.ActivityTypeListHomeResp)
 	resp.List = list
 	resp.List = list