浏览代码

no message

xingzai 2 年之前
父节点
当前提交
f8ea5b1f21
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      controllers/search.go

+ 3 - 0
controllers/search.go

@@ -428,6 +428,9 @@ func (this *SearchController) ListHomeArtAndChart() {
 		chartList[k].IsNeedJump = true
 		chartList[k].Source = 2
 	}
+	if len(chartList) == 0 {
+		chartList = make([]*models.HomeChartListResp, 0)
+	}
 	resp.ChartList = chartList
 	var result []*models.SearchItem
 	var total int64