6
This commit is contained in:
@@ -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
@@ -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] ?? {};
|
||||
|
||||
Reference in New Issue
Block a user