This commit is contained in:
cansnow
2025-12-05 16:10:52 +08:00
parent 29be534f22
commit 69a61178e1
64 changed files with 2575 additions and 1141 deletions
+7 -26
View File
@@ -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);
},