|
@@ -27,7 +27,7 @@ type MobileSearchController struct {
|
|
|
// @Param KeyWord query string true "搜索关键词"
|
|
|
// @Param OrderColumn query string false "排序字段 ,Comprehensive综合 ,Matching匹配度 ,PublishDate 发布时间 "
|
|
|
// @Param ListType query int false "列表类型,1最新/全部,2 纪要 ,3图表 默认1"
|
|
|
-// @Success 200 {object} models.SearchItem
|
|
|
+// @Success 200 {object} models.SearchResp
|
|
|
// @router /list [get]
|
|
|
func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
@@ -137,16 +137,21 @@ func (this *MobileSearchController) ListHomeArtAndChart() {
|
|
|
chartList[k].CtagNamePc += "," + v.CtagNameTwo
|
|
|
}
|
|
|
|
|
|
- labelItem := new(models.LabelList)
|
|
|
if v.PtagName != "" {
|
|
|
+ labelItem := new(models.LabelList)
|
|
|
labelItem.PtagName = v.PtagName
|
|
|
labelItem.CtagName = v.CtagName
|
|
|
chartList[k].LabelList = append(chartList[k].LabelList, labelItem)
|
|
|
}
|
|
|
+
|
|
|
if v.PtagNameTwo != "" {
|
|
|
- labelItem.PtagName = v.PtagNameTwo
|
|
|
- labelItem.CtagName = v.CtagNameTwo
|
|
|
- chartList[k].LabelList = append(chartList[k].LabelList, labelItem)
|
|
|
+ labelItemTwo := new(models.LabelList)
|
|
|
+ labelItemTwo.PtagName = v.PtagNameTwo
|
|
|
+ labelItemTwo.CtagName = v.CtagNameTwo
|
|
|
+ chartList[k].LabelList = append(chartList[k].LabelList, labelItemTwo)
|
|
|
+ }
|
|
|
+ if len(chartList[k].LabelList) == 0 {
|
|
|
+ chartList[k].LabelList = make([]*models.LabelList, 0)
|
|
|
}
|
|
|
}
|
|
|
if len(chartList) == 0 {
|