Commit 26988b8c by 吴云建

创建会话接口更新

parent 7d6bb058
Showing with 4 additions and 15 deletions
...@@ -422,13 +422,11 @@ export default { ...@@ -422,13 +422,11 @@ 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 { id, ImChatId, uniplat_version } = await sdk() const { imChatId } = await sdk()
.model(params.modelName) .model(params.modelName)
.chat(+params.selectedListId, orgId()) .chat(+params.selectedListId, orgId())
.createChat(); .createChat();
const uniplatId = id.value; const chatId = Number(imChatId);
const chatId = Number(ImChatId.value);
const v = uniplat_version.value;
await dispatch(ChatStore.ACTION_GET_MY_CHAT_LIST); await dispatch(ChatStore.ACTION_GET_MY_CHAT_LIST);
commit(ChatStore.MUTATION_SHOW_CHAT, true); commit(ChatStore.MUTATION_SHOW_CHAT, true);
await dispatch(ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, chatId); await dispatch(ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, chatId);
...@@ -437,23 +435,14 @@ export default { ...@@ -437,23 +435,14 @@ export default {
{ commit, dispatch }, { commit, dispatch },
params: Parameters<ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT>[0] params: Parameters<ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT>[0]
) { ) {
const { id, ImChatId, uniplat_version } = await sdk() const { imChatId } = await sdk()
.model(params.modelName) .model(params.modelName)
.chat(+params.selectedListId, orgId()) .chat(+params.selectedListId, orgId())
.createChat(true); .createChat(true);
const uniplatId = id.value; const chatId = Number(imChatId);
const chatId = Number(ImChatId.value);
const v = uniplat_version.value;
commit(ChatStore.MUTATION_SHOW_CHAT, true); commit(ChatStore.MUTATION_SHOW_CHAT, true);
await dispatch(ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, chatId); await dispatch(ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, chatId);
}, },
// async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE](
// { commit, dispatch },
// option: {
// customerServiceId?: number | string;
// customerServiceGroupId?: number;
// }
// ) {},
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];
if (chatId == null) return; if (chatId == null) return;
......
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