|
|
|
@ -205,7 +205,7 @@ export const fetchConversationsSearch = async (params) => {
|
|
|
|
|
opi_sn: ele.OPI_SN || ele.opi_sn || 0,
|
|
|
|
|
OPI_Name: `${ele.OPI_Name || ele.opi_name || ''}`.trim(),
|
|
|
|
|
opi_name: `${ele.OPI_Name || ele.opi_name || ''}`.trim(),
|
|
|
|
|
dateText: dayjs((ele.lasttime || ele.lasttime)).format('MM-DD HH:mm'),
|
|
|
|
|
dateText: dayjs((ele.lasttime)).format('MM-DD HH:mm'),
|
|
|
|
|
matchMsgList: parseRenderMessageList((ele.msglist_AsJOSN || [])), // .reverse()),
|
|
|
|
|
coli_id: '',
|
|
|
|
|
}));
|
|
|
|
@ -218,14 +218,15 @@ export const fetchConversationsSearch = async (params) => {
|
|
|
|
|
*/
|
|
|
|
|
export const fetchMessagesHistory = async (params) => {
|
|
|
|
|
const defaultParams = {
|
|
|
|
|
opisn: '',
|
|
|
|
|
whatsappid: '',
|
|
|
|
|
// opisn: '',
|
|
|
|
|
// whatsappid: '',
|
|
|
|
|
conversationid: '',
|
|
|
|
|
lasttime: '2024-01-01T00:00:00',
|
|
|
|
|
pagesize: MESSAGE_PAGE_SIZE,
|
|
|
|
|
pagedir: 'next',
|
|
|
|
|
};
|
|
|
|
|
const _params = pick(params, Object.keys(defaultParams));
|
|
|
|
|
if (isEmpty(_params.whatsappid)) {
|
|
|
|
|
if (isEmpty(_params.conversationid)) {
|
|
|
|
|
return [];
|
|
|
|
|
}
|
|
|
|
|
const { errcode, result } = await fetchJSON(`${API_HOST}/get_item_messages`, {...defaultParams, ..._params});
|
|
|
|
|