10
This commit is contained in:
@@ -24,22 +24,16 @@ const mutations = {
|
||||
};
|
||||
|
||||
const actions = {
|
||||
async getHistoryMesageList({
|
||||
commit,
|
||||
state
|
||||
}, params) {
|
||||
async getHistoryMesageList({commit,state}, params) {
|
||||
let emptyFlag = true;
|
||||
try {
|
||||
console.log("getHistoryMesageList:::");
|
||||
console.log(params);
|
||||
const {
|
||||
data
|
||||
} = await IMSDK.asyncApi(
|
||||
//console.log(params);
|
||||
const {data} = await IMSDK.asyncApi(
|
||||
IMSDK.IMMethods.GetAdvancedHistoryMessageList,
|
||||
uuidv4(),
|
||||
params,
|
||||
);
|
||||
console.log(data);
|
||||
//console.log(data);
|
||||
const isFistPage = !params.startClientMsgID
|
||||
const messages = data.messageList ?? [];
|
||||
emptyFlag = messages.length === 0;
|
||||
@@ -55,21 +49,10 @@ const actions = {
|
||||
emptyFlag,
|
||||
};
|
||||
},
|
||||
pushNewMessage({
|
||||
commit,
|
||||
state
|
||||
}, message) {
|
||||
pushNewMessage({commit,state}, message) {
|
||||
commit("SET_HISTORY_MESSAGE_LIST", [...state.historyMessageList, message]);
|
||||
},
|
||||
updateOneMessage({
|
||||
commit,
|
||||
state
|
||||
}, {
|
||||
message,
|
||||
type = UpdateMessageTypes.Overall,
|
||||
keyWords = [],
|
||||
isSuccess = false,
|
||||
}, ) {
|
||||
updateOneMessage({commit,state}, {message,type = UpdateMessageTypes.Overall,keyWords = [],isSuccess = false,}, ) {
|
||||
const tmpList = state.historyMessageList;
|
||||
const idx = tmpList.findIndex(
|
||||
(msg) => msg.clientMsgID === message.clientMsgID,
|
||||
@@ -88,9 +71,7 @@ const actions = {
|
||||
commit("SET_HISTORY_MESSAGE_LIST", tmpList);
|
||||
}
|
||||
},
|
||||
resetMessageState({
|
||||
commit
|
||||
}) {
|
||||
resetMessageState({commit}) {
|
||||
commit("SET_HISTORY_MESSAGE_LIST", []);
|
||||
commit("SET_HAS_MORE_MESSAGE", true);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user