From 632fede3cba55975dbbe3853db3902421e7627ae Mon Sep 17 00:00:00 2001 From: chengxl Date: Thu, 27 Nov 2025 13:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/ArticleParserService.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/application/common/ArticleParserService.php b/application/common/ArticleParserService.php index d03cea0a..fd3dfc16 100644 --- a/application/common/ArticleParserService.php +++ b/application/common/ArticleParserService.php @@ -776,13 +776,13 @@ class ArticleParserService } //处理超链接(优先提取链接目标,可能是邮箱) - // if ($element instanceof \PhpOffice\PhpWord\Element\Link) { - // $target = $element->getTarget(); - // if (strpos($target, 'mailto:') === 0) { - // $text .= str_replace('mailto:', '', $target) . ' '; // 剥离mailto:前缀 - // } - // $text .= $element->getText() . ' '; - // } + if ($element instanceof \PhpOffice\PhpWord\Element\Link) { + $target = $element->getTarget(); + if (strpos($target, 'mailto:') === 0) { + $text .= str_replace('mailto:', '', $target) . ' '; // 剥离mailto:前缀 + } + $text .= $element->getText() . ' '; + } //处理字段和注释(可能包含隐藏邮箱) if ($element instanceof \PhpOffice\PhpWord\Element\Field) {