From f9999e7d062b32162207cb34ee80411706109c5b Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 16 Jun 2025 11:14:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=8E=A5=E5=8F=A3=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/EmailActions.js | 2 +- src/hooks/useEmail.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/actions/EmailActions.js b/src/actions/EmailActions.js index e5444a7..cd55d6f 100644 --- a/src/actions/EmailActions.js +++ b/src/actions/EmailActions.js @@ -377,7 +377,7 @@ export const updateEmailAction = async (params = { opi_sn: 0, mai_sn_list: [], s * @param {string} [params.remind_type] - Type of reminder. * @param {number} [params.remind_index] - Index of the reminder. */ -export const getEmailTemplateAction = async (params = { coli_sn: 0, lgc: 1, opi_sn: 0, remind_type: '', remind_index: 0 }) => { +export const getReminderEmailTemplateAction = async (params = { coli_sn: 0, lgc: 1, opi_sn: 0, remind_type: '', remind_index: 0 }) => { const { errcode, result } = await fetchJSON(`${API_HOST_V3}/reminder_letter`, params) const { html, bodyContent, bodyText } = parseHTMLString(result?.MailContent, true) ; return errcode === 0 ? {...result, bodyContent }: {} diff --git a/src/hooks/useEmail.js b/src/hooks/useEmail.js index 4ed7afd..7f9ad78 100644 --- a/src/hooks/useEmail.js +++ b/src/hooks/useEmail.js @@ -1,7 +1,7 @@ import { useState, useEffect, useCallback } from 'react' import { isEmpty, objectMapper, olog, } from '@/utils/commons' import { readIndexDB } from '@/utils/indexedDB' -import { getEmailDetailAction, postResendEmailAction, getSalesSignatureAction, getEmailOrderAction, queryEmailListAction, getEmailTemplateAction, saveEmailDraftOrSendAction, updateEmailAction, getEmailChangesChannel, EMAIL_CHANNEL_NAME } from '@/actions/EmailActions' +import { getEmailDetailAction, postResendEmailAction, getSalesSignatureAction, getEmailOrderAction, queryEmailListAction, getReminderEmailTemplateAction, saveEmailDraftOrSendAction, updateEmailAction, getEmailChangesChannel, EMAIL_CHANNEL_NAME } from '@/actions/EmailActions' import { App } from 'antd' import useConversationStore from '@/stores/ConversationStore'; import { msgStatusRenderMapped } from '@/channel/bubbleMsgUtils'; @@ -375,7 +375,7 @@ export const useEmailTemplate = (templateKey, params) => { try { const { index: remind_index, type: remind_type } = emailTemplateMap[templateKey] || {}; const _params = { ...params, remind_index, remind_type}; - const x = await getEmailTemplateAction(_params) + const x = await getReminderEmailTemplateAction(_params) const lowerCaseShallow = Object.keys(x).reduce((acc, key) => ({...acc, [key.toLowerCase()]: x[key]}), {}) setTemplateContent({...lowerCaseShallow, mailtypeName: orderMailTypes.get(lowerCaseShallow.mailtype)}) } catch (networkError) {