From 96d0d2bdc020cdc1e4f5d597262eaf922e584f48 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 12 May 2025 10:25:29 +0800 Subject: [PATCH] =?UTF-8?q?perf(=E5=89=8D=E7=AB=AF):=20=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=AD=A3=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/EmailActions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/actions/EmailActions.js b/src/actions/EmailActions.js index 5473233..ee5229c 100644 --- a/src/actions/EmailActions.js +++ b/src/actions/EmailActions.js @@ -7,7 +7,7 @@ const parseHTMLString = (html, needText = false) => { let bodyContent = doc.body.innerHTML // bodyContent = bodyContent.replace(/ { const delLinefeed = mailType === 'text/html' ? (result.MailContent||'').includes(' - const { bodyContent, bodyText } = mailType === 'text/html' ? parseHTMLString(cleanContent, true) : { bodyContent: '', bodyText: '' }; + const { html, bodyContent, bodyText } = mailType === 'text/html' ? parseHTMLString(cleanContent, true) : { html: '', bodyContent: '', bodyText: '' }; return { info: { ...encodeEmailInfo(result.MailInfo?.[0] || {}), mailType }, - content: mailType === 'text/html' ? bodyContent : result.MailContent || '', + content: mailType === 'text/html' ? html : result.MailContent || '', abstract: bodyText || result.MailContent || '', attachments: result?.AttachList || [], }