删除多余的代码

This commit is contained in:
RuoYi
2021-03-07 15:21:33 +08:00
parent dc83ba0356
commit 4edaa14e28
2 changed files with 3 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ const user = {
// 获取用户信息
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
getInfo(state.token).then(res => {
getInfo().then(res => {
const user = res.user
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : user.avatar;
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组