소스 검색

文章列表修改

renjiaojiao 2 년 전
부모
커밋
ee7adadfdc
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      core/src/qfw/manage/articlelist.go

+ 5 - 1
core/src/qfw/manage/articlelist.go

@@ -72,7 +72,11 @@ func (e *Article) GetJsonList(list string) error {
 				query = query + `"TERM_` + class + `":"` + contenttype + `"`
 			}
 			if len(search) > 0 {
-				query = query + `,"s_title":"` + search + `"`
+				if len(contenttype) > 0 {
+					query = query + `,"s_title":"` + search + `"`
+				} else {
+					query = query + `"s_title":"` + search + `"`
+				}
 			}
 			query = query + `}`
 			res["totalRows"] = elastic.Count("content", "content", elastic.MakeQuery(query, "", "", -1, -1))