Browse Source

Merge branch 'eta/2.4.5' into debug

Roc 1 month ago
parent
commit
20f47279ef
1 changed files with 15 additions and 0 deletions
  1. 15 0
      services/report_v2.go

+ 15 - 0
services/report_v2.go

@@ -2077,6 +2077,9 @@ func linkAddToken(link string, tokenMap map[string]string) string {
 			utils.FileLog.Info("处理链接失败,ERR:" + err.Error())
 		}
 	}()
+	if link == `` {
+		return link
+	}
 	parsedURL, err := url.Parse(link)
 	if err != nil {
 		return link
@@ -2209,6 +2212,18 @@ func processMap(data map[string]interface{}, opType string, tokenMap map[string]
 		switch v := value.(type) {
 		case string:
 			if key == "content" {
+				contentSource, ok := data["compType"]
+				if !ok {
+					continue
+				}
+				contentSourceType, ok := contentSource.(string)
+				if !ok {
+					continue
+				}
+				if !utils.InArrayByStr([]string{`sheet`, `chart`}, contentSourceType) {
+					continue
+				}
+
 				newContent := v
 				// 处理链接
 				switch opType {