14
This commit is contained in:
@@ -14,6 +14,8 @@ export default {
|
||||
storeUnHandleFriendApplicationNum: (state) => state.contact.unHandleFriendApplicationNum,
|
||||
storeHistoryMessageList: (state) => state.message.historyMessageList,
|
||||
storeHasMoreMessage: (state) => state.message.hasMoreMessage,
|
||||
storeCurrentMsg: (state) => state.message.currentMsg,
|
||||
storeCurrentMsgID: (state) => state.message.currentMsgID,
|
||||
storeSelfInfo: (state) => state.user.selfInfo,
|
||||
storeCurrentUserID: (state) => state.user.selfInfo.userID,
|
||||
storeIsSyncing: (state) => state.user.isSyncing,
|
||||
|
||||
+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