zhangchuanxing 1 mês atrás
pai
commit
ee7d4f8316
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      services/resource_data.go

+ 6 - 1
services/resource_data.go

@@ -6,6 +6,7 @@ import (
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/models/ficc_report"
 	"hongze/hongze_cygx/utils"
+	"regexp"
 	"strconv"
 	"strings"
 	"time"
@@ -117,7 +118,11 @@ func GetResourceDataList(condition string, pars []interface{}, startSize, pageSi
 		}
 
 		for _, v := range listrMeet {
-			v.Content = AnnotationHtml(v.Content)
+			//v.Content = AnnotationHtml(v.Content)
+			// 正则表达式匹配font-size属性
+			re := regexp.MustCompile(`(font-size:\s*\d+px;)`)
+			// 替换font-size属性为14px
+			v.Content = re.ReplaceAllString(v.Content, "font-size: 14px;")
 			v.PublishTime = utils.TimeRemoveHms2(v.PublishTime)
 			mapItems[fmt.Sprint("meetingreviewchapt", v.Id)].Meetingreviewchapt = v
 		}