From 8aa3edd56c279100c9053576f3e90fa55459fe77 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Mon, 16 Jan 2023 16:15:55 +0800
Subject: [PATCH] 修改
---
src/store/modules/user.js | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 431ff96..89ab9d0 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -103,11 +103,12 @@
})
},
//获取用户信息
- GetUserInfo({commit}) {
+ GetUserInfo({commit}) {//获取用户信息liu++
return new Promise((resolve, reject) => {
getUserInfo().then((res) => {
const data = res.data.data;
commit('SET_ROLES', data.roles);
+ console.log(data);
resolve(data);
}).catch(err => {
reject(err);
@@ -247,7 +248,7 @@
},
SET_USER_INFO: (state, userInfo) => {
if (validatenull(userInfo.avatar)) {
- userInfo.avatar = "/img/bg/img-logo.png";
+ userInfo.avatar = "/img/bg/img-logo.png";//默认头像
}
state.userInfo = userInfo;
setStore({name: 'userInfo', content: state.userInfo})
--
Gitblit v1.9.3