This commit is contained in:
cansnow
2025-11-27 03:55:38 +08:00
parent 1626f0c52a
commit 198c3dd4a5
24 changed files with 2043 additions and 201 deletions
+1
View File
@@ -11,6 +11,7 @@ export default {
storeSentFriendApplications: (state) => state.contact.sentFriendApplications,
storeRecvGroupApplications: (state) => state.contact.recvGroupApplications,
storeSentGroupApplications: (state) => state.contact.sentGroupApplications,
storeUnHandleFriendApplicationNum: (state) => state.contact.unHandleFriendApplicationNum,
storeHistoryMessageList: (state) => state.message.historyMessageList,
storeHasMoreMessage: (state) => state.message.hasMoreMessage,
storeSelfInfo: (state) => state.user.selfInfo,
+5 -16
View File
@@ -1,13 +1,7 @@
import {
v4 as uuidv4
} from "uuid";
import { v4 as uuidv4} from "uuid";
import IMSDK from "openim-uniapp-polyfill";
import {
businessGetUserInfo
} from "@/api/login";
import {
filterEmptyValue
} from "@/util/common";
import { businessGetUserInfo} from "@/api/login";
import { filterEmptyValue} from "@/util/common";
const state = {
selfInfo: {},
@@ -44,9 +38,7 @@ const mutations = {
};
const actions = {
async getSelfInfo({
commit
}) {
async getSelfInfo({ commit }) {
try {
const result = await IMSDK.asyncApi(IMSDK.IMMethods.GetSelfUserInfo,uuidv4(),);
const res = await businessGetUserInfo(result.data.userID);
@@ -62,10 +54,7 @@ const actions = {
uni.$u.toast("获取个人信息失败");
}
},
async updateBusinessInfo({
commit,
state
}) {
async updateBusinessInfo({ commit, state }) {
try {
const res = await businessGetUserInfo(state.selfInfo.userID);
const businessData = res.data[0] ?? {};