|
@@ -1,8 +1,8 @@
|
|
package controllers
|
|
package controllers
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
+ "encoding/json"
|
|
"hongze/hongze_mfyx/models"
|
|
"hongze/hongze_mfyx/models"
|
|
- "hongze/hongze_mfyx/utils"
|
|
|
|
)
|
|
)
|
|
|
|
|
|
type TagController struct {
|
|
type TagController struct {
|
|
@@ -26,13 +26,49 @@ func (this *TagController) ListLabel() {
|
|
br.Ret = 408
|
|
br.Ret = 408
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- list1 := []string{utils.LABEL_L1_1, utils.LABEL_L1_2, utils.LABEL_L1_3, utils.LABEL_L1_4}
|
|
|
|
- list2 := []string{utils.LABEL_L2_1, utils.LABEL_L2_2, utils.LABEL_L2_3, utils.LABEL_L2_4}
|
|
|
|
- list3 := []string{utils.LABEL_L3_1, utils.LABEL_L3_2, utils.LABEL_L3_3}
|
|
|
|
|
|
+ //list1 := []string{utils.LABEL_L1_1, utils.LABEL_L1_2, utils.LABEL_L1_3, utils.LABEL_L1_4}
|
|
|
|
+ //list2 := []string{utils.LABEL_L2_1, utils.LABEL_L2_2, utils.LABEL_L2_3, utils.LABEL_L2_4}
|
|
|
|
+ //
|
|
|
|
+ //var list3 = []*models.CygxHashtagReq{}
|
|
|
|
+ //item := new(models.CygxHashtagReq)
|
|
|
|
+ //item.CheckList = append(item.CheckList, "A")
|
|
|
|
+ //item.Hashtag = utils.LABEL_L3_1
|
|
|
|
+ //list3 = append(list3, item)
|
|
|
|
+ //
|
|
|
|
+ //item.Hashtag = utils.LABEL_L3_2
|
|
|
|
+ //list3 = append(list3, item)
|
|
|
|
+ //
|
|
|
|
+ //item.Hashtag = utils.LABEL_L3_3
|
|
|
|
+ //list3 = append(list3, item)
|
|
|
|
+
|
|
resp := new(models.CygxTagListLabelResp)
|
|
resp := new(models.CygxTagListLabelResp)
|
|
- resp.List1 = list1
|
|
|
|
- resp.List2 = list2
|
|
|
|
- resp.List3 = list3
|
|
|
|
|
|
+ key := "mfyx_tag_list"
|
|
|
|
+ conf, e := models.GetConfigByCode(key)
|
|
|
|
+ if e != nil {
|
|
|
|
+ br.Msg = "获取失败"
|
|
|
|
+ br.ErrMsg = "获取首页头部导航失败, Err: " + e.Error()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if conf.ConfigValue == "" {
|
|
|
|
+ br.Msg = "获取失败"
|
|
|
|
+ br.ErrMsg = "首页头部导航配置值有误"
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //list := new(models.HomeHeaderTabList)
|
|
|
|
+ if e = json.Unmarshal([]byte(conf.ConfigValue), &resp); e != nil {
|
|
|
|
+ br.Msg = "获取失败"
|
|
|
|
+ br.ErrMsg = "首页头部导航配置值解析失败, Err: " + e.Error()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ //resp := list.Home
|
|
|
|
+ //if searchPage == 1 {
|
|
|
|
+ // resp = list.SearchPage
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //resp.List1 = list1
|
|
|
|
+ //resp.List2 = list2
|
|
|
|
+ //resp.List3 = list3
|
|
br.Ret = 200
|
|
br.Ret = 200
|
|
br.Success = true
|
|
br.Success = true
|
|
br.Msg = "获取成功"
|
|
br.Msg = "获取成功"
|