perf: 邮件详情的地址处理

2.0/email-builder
Lei OT 10 months ago
parent 78c4822fa5
commit f880a2617c

@ -46,13 +46,22 @@ export const postResendEmailAction = async (body) => {
return await postForm(`${EMAIL_HOST}/email_resend`, formData);
};
const encodeEmailInfo = (info) => {
const encodeQuote = (str = '') => str.replace(/"/g, ''); //.replace(/</g,'&lt;').replace(/>/g,'&gt;')
return {
...info,
MAI_From: encodeQuote(info.MAI_From),
MAI_To: encodeQuote(info.MAI_To),
}
};
/**
* 邮件详情
* @param {object} { mai_sn }
*/
export const getEmailDetailAction = async (param) => {
const { result } = await fetchJSON(`${EMAIL_HOST}/getmail`, param);
return { info: result.MailInfo?.[0] || {}, content: result.MailContent || '', attachments: result?.AttachList || [] };
return { info: encodeEmailInfo(result.MailInfo?.[0] || {}), content: result.MailContent || '', attachments: result?.AttachList || [] };
}
/**

Loading…
Cancel
Save