This commit is contained in:
cansnow
2025-12-02 03:05:52 +08:00
parent b4c9ae1b67
commit 29be534f22
24 changed files with 1118 additions and 372 deletions
+9 -14
View File
@@ -46,6 +46,7 @@
methods: {
...mapActions("message", ["pushNewMessage", "updateOneMessage"]),
...mapActions("conversation", ["updateCurrentMemberInGroup"]),
...mapActions("circle", ["getFriendCircleInfo"]),
...mapActions("contact", [
"updateFriendInfo",
"pushNewFriend",
@@ -137,12 +138,9 @@
// friend
const friendInfoChangeHandler = ({data}) => {
uni.$emit(IMSDK.IMEvents.OnFriendInfoChanged, {
data
});
this.updateFriendInfo({
friendInfo: data,
});
console.log('friendInfoChangeHandler',data);
uni.$emit(IMSDK.IMEvents.OnFriendInfoChanged, {data});
this.updateFriendInfo({friendInfo: data,});
};
const friendAddedHandler = ({data}) => {
this.pushNewFriend(data);
@@ -266,6 +264,7 @@
);
};
const conversationChangedHandler = ({data}) => {
//console.log('conversationChangedHandler',data);
if (this.storeIsSyncing) {
return;
}
@@ -291,15 +290,9 @@
);
};
IMSDK.subscribe(
IMSDK.IMEvents.OnTotalUnreadMessageCountChanged,
totalUnreadCountChangedHandler
);
IMSDK.subscribe(IMSDK.IMEvents.OnTotalUnreadMessageCountChanged,totalUnreadCountChangedHandler);
IMSDK.subscribe(IMSDK.IMEvents.OnNewConversation, newConversationHandler);
IMSDK.subscribe(
IMSDK.IMEvents.OnConversationChanged,
conversationChangedHandler
);
IMSDK.subscribe(IMSDK.IMEvents.OnConversationChanged,conversationChangedHandler);
},
tryLogin() {
@@ -312,6 +305,8 @@
this.$store.dispatch("contact/getSentFriendApplications");
this.$store.dispatch("contact/getRecvGroupApplications");
this.$store.dispatch("contact/getSentGroupApplications");
this.$store.dispatch("contact/getFriendList");
this.$store.dispatch("circle/getFriendCircleInfo");
uni.switchTab({
url: "/pages/conversation/conversationList/index?isRedirect=true",
success() {