|
|
|
@ -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)
|
|
|
|
|
}
|
|
|
|
|