|
|
|
@ -56,30 +56,30 @@ export const getEmailDetailAction = async (param) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 主动收邮件
|
|
|
|
|
* @param {object} { opi_sn, mai_sn }
|
|
|
|
|
* @ignore 用下面的接口代替, 收所有账户
|
|
|
|
|
* 主动收邮件, 单个账户
|
|
|
|
|
* @param {object} { opi_sn, mat_sn }
|
|
|
|
|
*/
|
|
|
|
|
export const getEmailFetchAction = async (param) => {
|
|
|
|
|
const { result } = await fetchJSON(`${EMAIL_HOST}/email_fetch`, param);
|
|
|
|
|
return result;
|
|
|
|
|
const { opi_sn, mat_sn } = param
|
|
|
|
|
const { result } = await fetchJSON(`${EMAIL_HOST}/email_fetch`, {
|
|
|
|
|
opi_sn,
|
|
|
|
|
mat_sn,
|
|
|
|
|
// 以下是废弃的参数
|
|
|
|
|
externalid: 0,
|
|
|
|
|
actionid: 0,
|
|
|
|
|
token: 0,
|
|
|
|
|
})
|
|
|
|
|
return result
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 主动收邮件, 所有账户
|
|
|
|
|
* @param {object} { opi_sn, mai_sn }
|
|
|
|
|
* @param {object} { opi_sn, mat_sn }
|
|
|
|
|
*/
|
|
|
|
|
export const getAllEmailFetchAction = async (emailList) => {
|
|
|
|
|
try {
|
|
|
|
|
const promises = emailList.map((eaccount) => fetchJSON(`${EMAIL_HOST}/email_fetch`, {
|
|
|
|
|
opi_sn: eaccount.opi_sn,
|
|
|
|
|
mat_sn: eaccount.mat_sn,
|
|
|
|
|
// 以下是废弃的参数
|
|
|
|
|
externalid: 0,
|
|
|
|
|
actionid: 0,
|
|
|
|
|
token: 0,
|
|
|
|
|
}))
|
|
|
|
|
const promises = emailList.map((eaccount) => getEmailFetchAction(eaccount))
|
|
|
|
|
const result = await Promise.all(promises);
|
|
|
|
|
return result;
|
|
|
|
|
} catch (error) {
|
|
|
|
|