Commit bd4fedae by 吴云建

阶段提交

parent dcd1fd2f
Showing with 8 additions and 14 deletions
...@@ -377,23 +377,20 @@ export default { ...@@ -377,23 +377,20 @@ export default {
return data; return data;
}, },
async [ChatStore.ACTION_SEND_MESSAGE]( async [ChatStore.ACTION_SEND_MESSAGE](
{ state, dispatch }, { state, dispatch, getters },
params: Parameters<ChatStore.ACTION_SEND_MESSAGE>[0] params: Parameters<ChatStore.ACTION_SEND_MESSAGE>[0]
) { ) {
const uniplatId = const uniplatId =
state[ChatStore.STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID]; state[ChatStore.STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID];
if (uniplatId == null) return; if (uniplatId == null) return;
try { try {
const data = await model()
.action("sendMsg") const { business_data } = getters[ChatStore.GETTER_CURRENT_CURRENT_CHAT];
.updateInitialParams({ const data = await sdk()
selected_list: [{ v: 0, id: Number(uniplatId) }], .model(business_data.model_name)
}) .chat(Number(business_data.obj_id), orgId())
.addInputs_parameter({ .sendMsg(params.msgType, params.msg);
LastMsgType: params.msgType,
LastMsgContent: params.msg,
})
.dryExecute();
await dispatch(ChatStore.ACTION_GET_FRESH_MESSAGE); await dispatch(ChatStore.ACTION_GET_FRESH_MESSAGE);
return data; return data;
} catch (error) { } catch (error) {
...@@ -616,7 +613,6 @@ export default { ...@@ -616,7 +613,6 @@ export default {
{ getters, dispatch }, { getters, dispatch },
uids: Parameters<ChatStore.ACTION_CHAT_ADD_MEMBERS>[0] uids: Parameters<ChatStore.ACTION_CHAT_ADD_MEMBERS>[0]
) { ) {
console.log("====123")
const currentChat = getters[ChatStore.GETTER_CURRENT_CURRENT_CHAT]; const currentChat = getters[ChatStore.GETTER_CURRENT_CURRENT_CHAT];
console.log(currentChat) console.log(currentChat)
if (currentChat == null) return; if (currentChat == null) return;
...@@ -671,8 +667,6 @@ export default { ...@@ -671,8 +667,6 @@ export default {
[ChatStore.GETTER_CURRENT_CURRENT_CHAT](state) { [ChatStore.GETTER_CURRENT_CURRENT_CHAT](state) {
const chatId = state[ChatStore.STATE_CHAT_CURRENT_CHAT_ID]; const chatId = state[ChatStore.STATE_CHAT_CURRENT_CHAT_ID];
const singleChat = state[ChatStore.STATE_SINGLE_CHAT]; const singleChat = state[ChatStore.STATE_SINGLE_CHAT];
console.log("singleChat:", singleChat)
console.log("chatId", chatId)
if (singleChat && singleChat.chat_id == chatId) { if (singleChat && singleChat.chat_id == chatId) {
return singleChat; return singleChat;
} }
......
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