Commit bd4fedae by 吴云建

阶段提交

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