Browse Source

no message

xingzai 1 year ago
parent
commit
e816becfc9
1 changed files with 7 additions and 7 deletions
  1. 7 7
      controllers/article.go

+ 7 - 7
controllers/article.go

@@ -84,6 +84,13 @@ func (this *ArticleController) Detail() {
 		return
 	}
 
+	detail.PublishDate = utils.TimeRemoveHms2(detail.PublishDate)
+	detail.Body = html.UnescapeString(detail.Body)
+	detail.Body = strings.Replace(detail.Body, "<p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>", "", -1)
+	detail.Body = strings.Replace(detail.Body, "pre", "div", -1)
+	//detail.Abstract = html.UnescapeString(detail.Abstract)
+	detail.Abstract, _ = services.GetReportContentTextSubNew(detail.Abstract)
+
 	lyjhTypeMap, _ := services.GetLyjhTypeMap()
 	if _, ok := lyjhTypeMap[detail.CategoryId]; ok {
 		detail.IsRoadShow = true
@@ -198,13 +205,6 @@ func (this *ArticleController) Detail() {
 			return
 		}
 
-		detail.PublishDate = utils.TimeRemoveHms2(detail.PublishDate)
-		detail.Body = html.UnescapeString(detail.Body)
-		detail.Body = strings.Replace(detail.Body, "<p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>", "", -1)
-		detail.Body = strings.Replace(detail.Body, "pre", "div", -1)
-		//detail.Abstract = html.UnescapeString(detail.Abstract)
-		detail.Abstract, _ = services.GetReportContentTextSubNew(detail.Abstract)
-
 		if companyPermission == "" {
 			if applyCount > 0 {
 				hasPermission = 5