瀏覽代碼

Merge branch 'cygx_pc_6.0' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 年之前
父節點
當前提交
f791b40625
共有 1 個文件被更改,包括 13 次插入1 次删除
  1. 13 1
      controllers/search.go

+ 13 - 1
controllers/search.go

@@ -431,9 +431,21 @@ func (this *SearchController) ListHomeArtAndChart() {
 			}
 		}
 	}
-	for k, _ := range chartList {
+	for k, v := range chartList {
 		chartList[k].IsNeedJump = true
 		chartList[k].Source = 2
+		if v.PtagName != "" {
+			chartList[k].CtagNamePc = v.PtagName
+		}
+		if v.CtagName != "" {
+			chartList[k].CtagNamePc += "," + v.CtagName
+		}
+		if v.PtagNameTwo != "" {
+			chartList[k].CtagNamePc += "," + v.PtagNameTwo
+		}
+		if v.CtagNameTwo != "" {
+			chartList[k].CtagNamePc += "," + v.CtagNameTwo
+		}
 	}
 	if len(chartList) == 0 {
 		chartList = make([]*models.HomeChartListResp, 0)