This commit is contained in:
2025-11-25 05:36:02 +08:00
parent 8e036cc171
commit b10e4b4336
65 changed files with 2672 additions and 2270 deletions
+8 -25
View File
@@ -1,6 +1,4 @@
import {
v4 as uuidv4
} from "uuid";
import {v4 as uuidv4} from "uuid";
import IMSDK from "openim-uniapp-polyfill";
const state = {
@@ -46,14 +44,9 @@ const mutations = {
};
const actions = {
async getConversationList({
state,
commit
}, isFirstPage = true) {
async getConversationList({state,commit}, isFirstPage = true) {
try {
const {
data
} = await IMSDK.asyncApi(
const {data} = await IMSDK.asyncApi(
IMSDK.IMMethods.GetConversationListSplit,
uuidv4(), {
offset: isFirstPage ? 0 : state.conversationList.length,
@@ -71,9 +64,7 @@ const actions = {
return [];
}
},
getCurrentGroup({
commit
}, groupID) {
getCurrentGroup({commit}, groupID) {
IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupsInfo, uuidv4(), [
groupID,
]).then(({
@@ -82,10 +73,7 @@ const actions = {
commit("SET_CURRENT_GROUP", data[0] ?? {});
});
},
getCurrentMemberInGroup({
commit,
rootState
}, groupID) {
getCurrentMemberInGroup({commit,rootState}, groupID) {
IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupMembersInfo, uuidv4(), {
groupID,
userIDList: [rootState.user.selfInfo.userID],
@@ -95,20 +83,15 @@ const actions = {
commit("SET_CURRENT_MEMBER_IN_GROUP", data[0] ?? {});
});
},
getUnReadCount({
commit
}) {
getUnReadCount({commit}) {
IMSDK.asyncApi(IMSDK.IMMethods.GetTotalUnreadMsgCount, uuidv4()).then(
(res) => {
console.log(res);
//console.log(res);
commit("SET_UNREAD_COUNT", res.data);
},
);
},
updateCurrentMemberInGroup({
commit,
state
}, memberInfo) {
updateCurrentMemberInGroup({commit,state}, memberInfo) {
console.log(memberInfo);
if (
memberInfo.groupID === state.currentMemberInGroup.groupID &&