瀏覽代碼

no message

zhangchuanxing 1 月之前
父節點
當前提交
8d390ab435
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      controllers/search.go

+ 9 - 3
controllers/search.go

@@ -314,9 +314,15 @@ func (this *MobileSearchController) BrowseHistoryList() {
 	}
 	}
 	slicehotSearch := strings.Split(hotSearch, ",")
 	slicehotSearch := strings.Split(hotSearch, ",")
 	for _, v := range slicehotSearch {
 	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 condition string
 	var pars []interface{}
 	var pars []interface{}