sun-pc-linux 1 month ago
parent
commit
69ef46d9fc
1 changed files with 8 additions and 8 deletions
  1. 8 8
      sku3d/sku3d/api/a-service-img.go

+ 8 - 8
sku3d/sku3d/api/a-service-img.go

@@ -75,14 +75,14 @@ func SearchByFields(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 	page, size, query := UtilQueryPageSize(c)
 
 	// 查询所有分类
-	// confCate := &model.Category{}
-	// cates := []*model.Category{}
-	// repo.RepoDocsSearch(apictx.CreateRepoCtx(), &repo.PageSearchOptions{CollectName: repo.CollectionCategory}, &cates)
-	// confCate.Children = cates
-	// err := parseCategories(query, confCate)
-	// if err != nil {
-	// 	return nil, err
-	// }
+	confCate := &model.Category{}
+	cates := []*model.Category{}
+	repo.RepoDocsSearch(apictx.CreateRepoCtx(), &repo.PageSearchOptions{CollectName: repo.CollectionCategory}, &cates)
+	confCate.Children = cates
+	err := parseCategories(query, confCate)
+	if err != nil {
+		return nil, err
+	}
 
 	pageOption := &repo.PageSearchOptions{
 		CollectName: repo.CollectionMatImages,