2
This commit is contained in:
+19
-5
@@ -1,7 +1,13 @@
|
||||
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: {},
|
||||
@@ -9,9 +15,13 @@ const state = {
|
||||
isSyncing: false,
|
||||
reinstall: false,
|
||||
progress: 0,
|
||||
token: ""
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
SET_TOKEN(state, info) {
|
||||
state.token = info;
|
||||
},
|
||||
SET_SELF_INFO(state, info) {
|
||||
state.selfInfo = {
|
||||
...info,
|
||||
@@ -34,7 +44,9 @@ const mutations = {
|
||||
};
|
||||
|
||||
const actions = {
|
||||
async getSelfInfo({ commit }) {
|
||||
async getSelfInfo({
|
||||
commit
|
||||
}) {
|
||||
try {
|
||||
const {
|
||||
data
|
||||
@@ -42,7 +54,9 @@ const actions = {
|
||||
IMSDK.IMMethods.GetSelfUserInfo,
|
||||
uuidv4(),
|
||||
);
|
||||
const {users} = await businessGetUserInfo(data.userID);
|
||||
const {
|
||||
users
|
||||
} = await businessGetUserInfo(data.userID);
|
||||
console.log(users);
|
||||
const businessData = users[0] ?? {};
|
||||
filterEmptyValue(businessData);
|
||||
|
||||
Reference in New Issue
Block a user