Commit 6bbc7551 by Sixong.Zhu

update

parent 058ab68c
Showing with 6 additions and 4 deletions
......@@ -524,7 +524,7 @@ export default {
{ commit, dispatch },
params: Parameters<ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN>[0]
) {
const { imChatId } = await Chat.getSdk()
const { imChatId, catalog } = await Chat.getSdk()
.model(params.modelName)
.chat(+params.selectedListId, orgId())
.createChat();
......@@ -535,6 +535,7 @@ export default {
ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION,
chatId
);
return { chatId, catalog };
},
async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT](
{ commit, dispatch },
......@@ -552,6 +553,7 @@ export default {
);
// 打开会话后获取一下会话列表,刷新未读消息
dispatch(ChatStore.ACTION_GET_MY_CHAT_LIST);
return chatId;
},
async [ChatStore.ACTION_REGISTER_EVENT]({ dispatch, commit, state }) {
const chatId = state[ChatStore.STATE_CHAT_CURRENT_CHAT_ID];
......
......@@ -278,14 +278,14 @@ export namespace ChatStore {
selectedListId: string;
uids: string[];
showByPage?: boolean;
}) => Promise<void>;
}) => Promise<{ chat: number; catalog: string }>;
export const ACTION_CREATE_NEW_CHAT_BY_CLIENT = "顾客向客服发起新会话";
export type ACTION_CREATE_NEW_CHAT_BY_CLIENT = (params: {
modelName: string;
selectedListId: string;
uids: string[];
}) => Promise<void>;
}) => Promise<number>;
export const ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE =
"startNewConversationByCustomerSide";
......@@ -381,7 +381,7 @@ export interface ChatStoreState {
[ChatStore.STATE_CHAT_CURRENT_USER_TYPE]: ChatStore.STATE_CHAT_CURRENT_USER_TYPE;
[ChatStore.STATE_CHAT_SEND_FAIL_MESSAGE]: ChatStore.STATE_CHAT_SEND_FAIL_MESSAGE;
[ChatStore.STATE_CHAT_USERNAME]: ChatStore.STATE_CHAT_USERNAME;
[ChatStore.STATE_CURRENT_UNREAD_MESSAGE_COUNT] : ChatStore.STATE_CURRENT_UNREAD_MESSAGE_COUNT;
[ChatStore.STATE_CURRENT_UNREAD_MESSAGE_COUNT]: ChatStore.STATE_CURRENT_UNREAD_MESSAGE_COUNT;
}
export const chatStore = namespace(ChatStore.ns);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment