|
@@ -1,7 +1,6 @@
|
|
|
package controllers
|
|
|
|
|
|
import (
|
|
|
- "fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"hongze/hongze_clpt/models"
|
|
|
"hongze/hongze_clpt/services"
|
|
@@ -133,6 +132,10 @@ func (this *MobileHomeController) List() {
|
|
|
chartList[k].IsNeedJump = true
|
|
|
chartList[k].Source = 2
|
|
|
}
|
|
|
+
|
|
|
+ if len(chartList) == 0 {
|
|
|
+ chartList = make([]*models.HomeChartListResp, 0)
|
|
|
+ }
|
|
|
resp.ChartList = chartList
|
|
|
|
|
|
if listType != 3 {
|
|
@@ -219,7 +222,6 @@ func (this *MobileHomeController) List() {
|
|
|
item := list[k]
|
|
|
//如果文章一开始的内容是图片,优先展示第一张图片
|
|
|
imgurl, _ := services.FixArticleImgUrl(html.UnescapeString(list[k].Body))
|
|
|
- fmt.Println(item.Annotation)
|
|
|
newBody, _ := services.GetReportContentTextSubByarticle(item.Body, item.Annotation, item.ArticleId)
|
|
|
list[k].Annotation = newBody
|
|
|
list[k].Body = ""
|
|
@@ -246,6 +248,10 @@ func (this *MobileHomeController) List() {
|
|
|
}
|
|
|
list[k].Source = 1
|
|
|
}
|
|
|
+
|
|
|
+ if len(list) == 0 {
|
|
|
+ list = make([]*models.HomeArticle, 0)
|
|
|
+ }
|
|
|
resp.List = list
|
|
|
}
|
|
|
if chartTotal > total {
|