xingzai vor 1 Jahr
Ursprung
Commit
b225182903
2 geänderte Dateien mit 9 neuen und 9 gelöschten Zeilen
  1. 4 5
      controllers/collection.go
  2. 5 4
      models/apply_collection.go

+ 4 - 5
controllers/collection.go

@@ -34,15 +34,14 @@ func (this *CollectionController) BannerList() {
 
 	resp := new(models.CollectionBannerListResp)
 	var listA []*models.CollectionBannerResp
-	var listB []*models.CollectionBannerResp
+	listB := new(models.CollectionBannerResp)
 	listA = []*models.CollectionBannerResp{
 		&models.CollectionBannerResp{Title: "B1", IndexImg: "https://hzstatic.hzinsights.com/banner/yx/web_1.png", Path: "/index/"},
 		&models.CollectionBannerResp{Title: "B2", IndexImg: "https://hzstatic.hzinsights.com/banner/yx/web_2.png", Path: ""},
 	}
-
-	listB = []*models.CollectionBannerResp{
-		&models.CollectionBannerResp{Title: "B2", IndexImg: "https://hzstatic.hzinsights.com/banner/yx/web_3.png", Path: "/index/"},
-	}
+	listB.Title = "B2"
+	listB.IndexImg = "https://hzstatic.hzinsights.com/banner/yx/web_3.png"
+	listB.IsShowSustainable = true
 	resp.ListA = listA
 	resp.ListB = listB
 	br.Ret = 200

+ 5 - 4
models/apply_collection.go

@@ -6,14 +6,15 @@ import (
 )
 
 type CollectionBannerResp struct {
-	Title    string `description:"标题"`
-	IndexImg string `description:"小程序封面图"`
-	Path     string `description:"小程序路径"`
+	Title             string `description:"标题"`
+	IndexImg          string `description:"小程序封面图"`
+	Path              string `description:"小程序路径"`
+	IsShowSustainable bool   `description:"是否展示限免标签"`
 }
 
 type CollectionBannerListResp struct {
 	ListA []*CollectionBannerResp
-	ListB []*CollectionBannerResp
+	ListB *CollectionBannerResp
 }
 
 type CollectionDetailResp struct {