|
@@ -78,7 +78,8 @@ const state = {
|
|
},
|
|
},
|
|
// 拥有权限信息
|
|
// 拥有权限信息
|
|
ownPrivilege: [],
|
|
ownPrivilege: [],
|
|
- token: ''
|
|
|
|
|
|
+ token: '',
|
|
|
|
+ loginInfo: null
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
@@ -112,6 +113,9 @@ const mutations = {
|
|
refreshOwnPrivilege (state, ownPrivilege) {
|
|
refreshOwnPrivilege (state, ownPrivilege) {
|
|
state.ownPrivilege = ownPrivilege
|
|
state.ownPrivilege = ownPrivilege
|
|
},
|
|
},
|
|
|
|
+ loginInfo (state, loginInfo) {
|
|
|
|
+ state.loginInfo = loginInfo;
|
|
|
|
+ },
|
|
// 用户详情
|
|
// 用户详情
|
|
userInfo (state, userInfo) {
|
|
userInfo (state, userInfo) {
|
|
state.userInfo = userInfo;
|
|
state.userInfo = userInfo;
|
|
@@ -149,6 +153,17 @@ const actions = {
|
|
});
|
|
});
|
|
return res;
|
|
return res;
|
|
},
|
|
},
|
|
|
|
+ getLoginInfo ({
|
|
|
|
+ commit,
|
|
|
|
+ state
|
|
|
|
+ }) {
|
|
|
|
+ let res = axios.post(proPath + 'auth/remoteauthentication/token');
|
|
|
|
+ res.then(res => {
|
|
|
|
+ // 放入东西
|
|
|
|
+ commit('loginInfo', res.data);
|
|
|
|
+ });
|
|
|
|
+ return res;
|
|
|
|
+ },
|
|
getOwnMenuUrl ({
|
|
getOwnMenuUrl ({
|
|
commit,
|
|
commit,
|
|
state
|
|
state
|