xingzai vor 2 Jahren
Ursprung
Commit
f8d6fdac68
2 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. 4 0
      controllers/activity.go
  2. 4 0
      controllers/home.go

+ 4 - 0
controllers/activity.go

@@ -88,6 +88,10 @@ func (this *ActivityController) LabelTypeList() {
 		return
 	}
 
+	if len(speciaItem.List) == 0 {
+		speciaItem.List = make([]*models.CygxActivityLabelList, 0)
+	}
+
 	list = append(list, speciaItem)
 	//if len(speciaItem.List) > 0 {
 	//

+ 4 - 0
controllers/home.go

@@ -282,6 +282,10 @@ func (this *MobileHomeController) NewList() {
 	//condition += " AND source = 'activityvoice' "
 	condition += " AND publish_date  < ? "
 	pars = append(pars, time.Now().AddDate(0, 0, 30))
+
+	if user.CompanyId <= 1 {
+
+	}
 	total, err := models.GetResourceDataCount(condition, pars)
 	if err != nil {
 		br.Msg = "获取失败"