diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 257767c77..df2f0ee4f 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -165,6 +165,14 @@ const user = { }); }); }, + GetUserInfo({ commit }, token) { + return new Promise((resolve, reject) => { + getInfo(token).then(response => { + const user = response.data; + resolve(user); + }); + }); + }, // 前端登出 FedLogOut({ commit }) { commit('SUBSCRIBE_UN'); diff --git a/src/views/login/index.vue b/src/views/login/index.vue index cc3787528..a72e3b9eb 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,8 +1,15 @@