|
@@ -170,6 +170,7 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
resp.ChartList = chartList
|
|
|
var result []*models.SearchItem
|
|
|
var total int64
|
|
|
+ var articleIds []int
|
|
|
if listType == 1 || listType == 2 {
|
|
|
|
|
|
|
|
@@ -246,8 +247,10 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
result[k].ImgUrlPc = mapCategoryUrl[v.CategoryId]
|
|
|
}
|
|
|
result[k].Source = 1
|
|
|
+ articleIds = append(articleIds, v.ArticleId)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -270,6 +273,11 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
}
|
|
|
if len(result) == 0 {
|
|
|
result = make([]*models.SearchItem, 0)
|
|
|
+ } else {
|
|
|
+ yxArticleIdMap := services.GetYxArticleIdMap(articleIds)
|
|
|
+ for _, v := range result {
|
|
|
+ v.IsResearch = yxArticleIdMap[v.ArticleId]
|
|
|
+ }
|
|
|
}
|
|
|
page := paging.GetPaging(currentIndex, pageSize, int(total))
|
|
|
resp.Paging = page
|