hsun 3 年之前
父节点
当前提交
a64870dd6b
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      services/report/report.go

+ 2 - 3
services/report/report.go

@@ -689,8 +689,6 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 				if len(v.Highlight["Title"]) > 0 {
 					temp.Title = v.Highlight["Title"][0]
 				}
-				// 样式限制行数
-				temp.Title = "<div style=\"-webkit-line-clamp: 3;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;text-overflow: ellipsis;\">" + temp.Title + "</div>"
 				if len(v.Highlight["Abstract"]) > 0 {
 					temp.Abstract = v.Highlight["Abstract"][0]
 				}
@@ -743,7 +741,8 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 		for _, reportInfo := range list {
 			reportItem := new(response.ReportListItem)
 			reportItem.ReportId = reportInfo.Id
-			reportItem.Title = reportInfo.Title
+			// 样式限制行数
+			reportItem.Title = "<div style=\"-webkit-line-clamp: 2;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;text-overflow: ellipsis;\">" + reportInfo.Title + "</div>"
 			reportItem.PublishTime = reportInfo.PublishTime
 			reportItem.ClassifyNameFirst = reportInfo.ClassifyNameFirst
 			reportItem.ClassifyNameSecond = reportInfo.ClassifyNameSecond