14
This commit is contained in:
+14
-10
@@ -1,17 +1,14 @@
|
||||
import IMSDK, {
|
||||
MessageStatus,
|
||||
MessageType
|
||||
} from "openim-uniapp-polyfill";
|
||||
import {
|
||||
v4 as uuidv4
|
||||
} from "uuid";
|
||||
import {
|
||||
UpdateMessageTypes
|
||||
} from "@/constant";
|
||||
import IMSDK, { MessageStatus, MessageType} from "openim-uniapp-polyfill";
|
||||
import {v4 as uuidv4} from "uuid";
|
||||
import {UpdateMessageTypes} from "@/constant";
|
||||
|
||||
const state = {
|
||||
historyMessageList: [],
|
||||
hasMoreMessage: true,
|
||||
currentMsg: {
|
||||
"clientMsgID":""
|
||||
},
|
||||
currentMsgID:""
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
@@ -21,9 +18,16 @@ const mutations = {
|
||||
SET_HAS_MORE_MESSAGE(state, hasMore) {
|
||||
state.hasMoreMessage = hasMore;
|
||||
},
|
||||
SET_CURRENT_MSG(state, msg) {
|
||||
state.currentMsg = msg;
|
||||
state.currentMsgID = msg?.clientMsgID || "";
|
||||
},
|
||||
};
|
||||
|
||||
const actions = {
|
||||
updateCurrentMsg({commit,state}, message) {
|
||||
commit("SET_CURRENT_MSG", message);
|
||||
},
|
||||
async getHistoryMesageList({commit,state}, params) {
|
||||
let emptyFlag = true;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user