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,