From 1977b8b404fee9aee90597bedcf244b0402b04db Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 19 Jun 2025 15:21:56 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=82=AE=E4=BB=B6:=20=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=8D=89=E7=A8=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/NewEmail.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/NewEmail.jsx b/src/views/NewEmail.jsx index af3bae2..f048c8b 100644 --- a/src/views/NewEmail.jsx +++ b/src/views/NewEmail.jsx @@ -98,6 +98,10 @@ const NewEmail = () => { const { loading: loadingTamplate, templateContent } = useEmailTemplate(templateKey, {coli_sn: pageParam.oid, opi_sn: orderDetail.opi_sn || mailData.info?.MAI_OPI_SN || 0, lgc: 1}); const { signature } = useEmailSignature(orderDetail.opi_sn || mailData.info?.MAI_OPI_SN || 0) + const [initialContent, setInitialContent] = useState('') + const [showQuoteContent, setShowQuoteContent] = useState(false) + const [quoteContent, setQuoteContent] = useState('') + // const [newFromEmail, setNewFromEmail] = useState('') // const [newToEmail, setNewToEmail] = useState('') // const [emailOPI, setEmailOPI] = useState('') @@ -342,10 +346,6 @@ const NewEmail = () => { } } - const [initialContent, setInitialContent] = useState('') - const [showQuoteContent, setShowQuoteContent] = useState(false) - const [quoteContent, setQuoteContent] = useState('') - const [openPlainTextConfirm, setOpenPlainTextConfirm] = useState(false) const handlePlainTextOpenChange = ({ target }) => { const { value: newChecked } = target @@ -488,7 +488,7 @@ const NewEmail = () => { body.attaList = fileList; // console.log('body', body, '\n', fileList); const values = await form.validateFields() - const preQuoteBody = pageParam.quoteid ? (quoteContent ? quoteContent : generateQuoteContent(mailData, isRichText)) : '' + const preQuoteBody = !['edit', 'new'].includes(pageParam.action) && pageParam.quoteid ? (quoteContent ? quoteContent : generateQuoteContent(mailData, isRichText)) : '' body.mailcontent = isRichText ? EmailBuilder({ subject: values.subject, content: htmlContent + preQuoteBody }) : textContent + preQuoteBody body.cc = values.cc || '' body.bcc = values.bcc || ''