|
@@ -0,0 +1,34 @@
|
|
|
+package controllers
|
|
|
+
|
|
|
+import (
|
|
|
+ "hongze/hongze_cygx/models"
|
|
|
+)
|
|
|
+
|
|
|
+type ConfigController struct {
|
|
|
+ BaseAuthController
|
|
|
+}
|
|
|
+
|
|
|
+// @Title 获取搜索推荐词
|
|
|
+// @Description 获取搜索推荐词
|
|
|
+// @Success 200 {object} models.ConfigResp
|
|
|
+// @router /detail [get]
|
|
|
+func (this *ConfigController) BrowseHistoryList() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ configCode:="hot_search"
|
|
|
+ detail, err := models.GetConfigByCode(configCode)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取数据失败"
|
|
|
+ br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp := new(models.ConfigResp)
|
|
|
+ resp.Item=detail
|
|
|
+ br.Msg = "获取成功!"
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Data = resp
|
|
|
+}
|