Browse Source

Merge branch 'master' of http://8.136.199.33:3000/cxzhang/hongze_mfyx into mfyx_2.0

xingzai 9 months ago
parent
commit
700bf76409
2 changed files with 2 additions and 1 deletions
  1. 1 0
      controllers/yanxuan_special.go
  2. 1 1
      services/article.go

+ 1 - 0
controllers/yanxuan_special.go

@@ -102,6 +102,7 @@ func (this *BaseAuthMobileController) List() {
 		//}
 		//v.Content, _ = services.GetReportContentTextSubNew(v.Content)
 		v.Content = services.AnnotationHtml(v.Content)
+		v.Content = strings.Replace(v.Content, " <br> <br>", "", -1)
 		if v.DocUrl != "" {
 			var docs []models.Doc
 			err := json.Unmarshal([]byte(v.DocUrl), &docs)

+ 1 - 1
services/article.go

@@ -394,7 +394,7 @@ func AnnotationHtml(bodyText string) (annotation string) {
 	p := doc.Find("p")
 	p.Each(func(tk int, pd *goquery.Selection) {
 		pdText := pd.Text()
-		pdText = strings.Replace(pdText, " ", "", -1)
+		//pdText = strings.Replace(pdText, " ", "", -1)
 		if pdText != "" {
 			textLen := strings.Index(docText, pdText)
 			mapDoc[(strings.Index(docText, pdText))] = pdText