diff --git a/routers/search.go b/routers/search.go index 2ca2ec541..2c583fd2e 100644 --- a/routers/search.go +++ b/routers/search.go @@ -31,6 +31,12 @@ func InitESClient() { } func Search(ctx *context.Context) { + keyword := strings.Trim(ctx.Query("q"), " ") + ctx.Data["keyword"] = keyword + ctx.HTML(200, "/explore/search_new.tmpl") +} + +func SearchApi(ctx *context.Context) { TableName := ctx.Query("TableName") Key := ctx.Query("Key") Page := ctx.QueryInt("Page") diff --git a/templates/explore/search_new.tmpl b/templates/explore/search_new.tmpl index 375e1b358..a063449e3 100644 --- a/templates/explore/search_new.tmpl +++ b/templates/explore/search_new.tmpl @@ -6,7 +6,7 @@
- +