Commit 6bbc7551 by Sixong.Zhu

update

parent 058ab68c
Showing with 6 additions and 4 deletions
...@@ -524,7 +524,7 @@ export default { ...@@ -524,7 +524,7 @@ export default {
{ commit, dispatch }, { commit, dispatch },
params: Parameters<ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN>[0] 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) .model(params.modelName)
.chat(+params.selectedListId, orgId()) .chat(+params.selectedListId, orgId())
.createChat(); .createChat();
...@@ -535,6 +535,7 @@ export default { ...@@ -535,6 +535,7 @@ export default {
ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION,
chatId chatId
); );
return { chatId, catalog };
}, },
async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT]( async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT](
{ commit, dispatch }, { commit, dispatch },
...@@ -552,6 +553,7 @@ export default { ...@@ -552,6 +553,7 @@ export default {
); );
// 打开会话后获取一下会话列表,刷新未读消息 // 打开会话后获取一下会话列表,刷新未读消息
dispatch(ChatStore.ACTION_GET_MY_CHAT_LIST); dispatch(ChatStore.ACTION_GET_MY_CHAT_LIST);
return chatId;
}, },
async [ChatStore.ACTION_REGISTER_EVENT]({ dispatch, commit, state }) { async [ChatStore.ACTION_REGISTER_EVENT]({ dispatch, commit, state }) {
const chatId = state[ChatStore.STATE_CHAT_CURRENT_CHAT_ID]; const chatId = state[ChatStore.STATE_CHAT_CURRENT_CHAT_ID];
......
...@@ -278,14 +278,14 @@ export namespace ChatStore { ...@@ -278,14 +278,14 @@ export namespace ChatStore {
selectedListId: string; selectedListId: string;
uids: string[]; uids: string[];
showByPage?: boolean; showByPage?: boolean;
}) => Promise<void>; }) => Promise<{ chat: number; catalog: string }>;
export const ACTION_CREATE_NEW_CHAT_BY_CLIENT = "顾客向客服发起新会话"; export const ACTION_CREATE_NEW_CHAT_BY_CLIENT = "顾客向客服发起新会话";
export type ACTION_CREATE_NEW_CHAT_BY_CLIENT = (params: { export type ACTION_CREATE_NEW_CHAT_BY_CLIENT = (params: {
modelName: string; modelName: string;
selectedListId: string; selectedListId: string;
uids: string[]; uids: string[];
}) => Promise<void>; }) => Promise<number>;
export const ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE = export const ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE =
"startNewConversationByCustomerSide"; "startNewConversationByCustomerSide";
...@@ -381,7 +381,7 @@ export interface ChatStoreState { ...@@ -381,7 +381,7 @@ export interface ChatStoreState {
[ChatStore.STATE_CHAT_CURRENT_USER_TYPE]: ChatStore.STATE_CHAT_CURRENT_USER_TYPE; [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_SEND_FAIL_MESSAGE]: ChatStore.STATE_CHAT_SEND_FAIL_MESSAGE;
[ChatStore.STATE_CHAT_USERNAME]: ChatStore.STATE_CHAT_USERNAME; [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); 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