From 4d72b6c0a0cf479c6a13b0b18f078ecfce241243 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Mon, 25 Nov 2024 16:21:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BE=9B=E5=BA=94=E5=95=86=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/OrderStore.js | 7 ++----- src/views/Conversations/Online/order/CustomerProfile.jsx | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/stores/OrderStore.js b/src/stores/OrderStore.js index 45f3e4e..bd7d23c 100644 --- a/src/stores/OrderStore.js +++ b/src/stores/OrderStore.js @@ -119,13 +119,10 @@ export const useOrderStore = create(devtools((set, get) => ({ fetchOtherEmail: (coli_sn) => { return fetchJSON(`${EMAIL_HOST}/email_supplier`, { coli_sn }) .then(json => { - if (json.errcode === 0 && json.result?.MailInfo.length > 0) { - console.info(json.result) - + if (json.errcode === 0) { set(() => ({ - otherEmailList: json.result.MailInfo, + otherEmailList: json.result.MailInfo ?? [], })) - return json.result?.MailInfo } else { throw new Error(json?.errmsg + ': ' + json.errcode) } diff --git a/src/views/Conversations/Online/order/CustomerProfile.jsx b/src/views/Conversations/Online/order/CustomerProfile.jsx index c393cec..60df658 100644 --- a/src/views/Conversations/Online/order/CustomerProfile.jsx +++ b/src/views/Conversations/Online/order/CustomerProfile.jsx @@ -60,7 +60,7 @@ const CustomerProfile = () => { .finally(() => setLoading(false)) .catch(reason => { notification.error({ - message: "查询出错", + message: "查询供应商邮件出错", description: reason.message, placement: "top", duration: 60,