fix: 请求参数

2.0/email-builder
Lei OT 11 months ago
parent b58162ee85
commit bc1b120de0

@ -261,15 +261,3 @@ export const deleteConversationTags = async (params) => {
const { errcode, result } = await fetchJSON(`${API_HOST}/set_conversation_tags_del`, params);
return errcode !== 0 ? {} : result;
}
/**
* 附加备注
* @param {object} body { opisn, conversationid, memo }
*/
export const postConversationMemo = async (body) => {
const formData = new FormData();
Object.keys(body).forEach(function (key) {
formData.append(key, body[key]);
});
const { errcode, result } = await fetchJSON(`${API_HOST}/set_conversation_Memo`, formData);
return errcode !== 0 ? {} : result;
}

@ -411,7 +411,7 @@ export const useConversationStore = create(
setInitial: (v) => set({ initialState: v }),
// side effects
fetchInitialData: async ({userIds, whatsAppBusiness, ...loginUser}) => {
fetchInitialData: async ({userId, userIds, whatsAppBusiness, ...loginUser}) => {
const { addToConversationList, setTemplates, setInitial, setClosedConversationList, setTags } = get();
// const conversationsList = await fetchConversationsList({ opisn: userIds });
@ -423,7 +423,7 @@ export const useConversationStore = create(
// const closedList = await fetchConversationsList({ opisn: userIds, session_enable: 0 });
// setClosedConversationList(closedList);
const myTags = await fetchTags({ opisn: userIds});
const myTags = await fetchTags({ opisn: userId});
setTags(myTags);
setInitial(true);

Loading…
Cancel
Save