From 9421712e7d0e16b6ec2b23be0e285803a23f5253 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 28 Mar 2022 11:03:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BD=AE=E9=BB=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/search.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/search.go b/routers/search.go index 51a12d2be..912d7707a 100644 --- a/routers/search.go +++ b/routers/search.go @@ -34,6 +34,10 @@ func InitESClient() { } func Search(ctx *context.Context) { + log.Info("search template.") + if ctx.Query("q") == "" { + + } keyword := strings.Trim(ctx.Query("q"), " ") ctx.Data["Keyword"] = keyword ctx.Data["SortType"] = "newest"