2
This commit is contained in:
@@ -46,7 +46,10 @@ const mutations = {
|
||||
};
|
||||
|
||||
const actions = {
|
||||
async getConversationList({ state, commit }, isFirstPage = true) {
|
||||
async getConversationList({
|
||||
state,
|
||||
commit
|
||||
}, isFirstPage = true) {
|
||||
try {
|
||||
const {
|
||||
data
|
||||
@@ -68,7 +71,9 @@ const actions = {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
getCurrentGroup({ commit }, groupID) {
|
||||
getCurrentGroup({
|
||||
commit
|
||||
}, groupID) {
|
||||
IMSDK.asyncApi(IMSDK.IMMethods.GetSpecifiedGroupsInfo, uuidv4(), [
|
||||
groupID,
|
||||
]).then(({
|
||||
@@ -77,7 +82,10 @@ 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],
|
||||
@@ -87,7 +95,9 @@ 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);
|
||||
@@ -95,7 +105,10 @@ const actions = {
|
||||
},
|
||||
);
|
||||
},
|
||||
updateCurrentMemberInGroup({ commit, state }, memberInfo) {
|
||||
updateCurrentMemberInGroup({
|
||||
commit,
|
||||
state
|
||||
}, memberInfo) {
|
||||
console.log(memberInfo);
|
||||
if (
|
||||
memberInfo.groupID === state.currentMemberInGroup.groupID &&
|
||||
@@ -104,7 +117,9 @@ const actions = {
|
||||
commit("SET_CURRENT_MEMBER_IN_GROUP", memberInfo);
|
||||
}
|
||||
},
|
||||
resetConversationState({ commit }) {
|
||||
resetConversationState({
|
||||
commit
|
||||
}) {
|
||||
commit("SET_CURRENT_MEMBER_IN_GROUP", {});
|
||||
commit("SET_CURRENT_GROUP", {});
|
||||
commit("SET_CURRENT_CONVERSATION", {});
|
||||
|
||||
Reference in New Issue
Block a user