zhangchuanxing 1 mēnesi atpakaļ
vecāks
revīzija
8d390ab435
1 mainītis faili ar 9 papildinājumiem un 3 dzēšanām
  1. 9 3
      controllers/search.go

+ 9 - 3
controllers/search.go

@@ -314,9 +314,15 @@ func (this *MobileSearchController) BrowseHistoryList() {
 	}
 	slicehotSearch := strings.Split(hotSearch, ",")
 	for _, v := range slicehotSearch {
-		item := new(models.KeyWord)
-		item.KeyWord = v
-		resp.ListRecommend = append(resp.ListRecommend, item)
+		if v == "" {
+			continue
+		}
+		slicehotSearchList := strings.Split(v, "/")
+		for range slicehotSearchList {
+			item := new(models.KeyWord)
+			item.KeyWord = v
+			resp.ListRecommend = append(resp.ListRecommend, item)
+		}
 	}
 	var condition string
 	var pars []interface{}