huac пре 3 година
родитељ
комит
1ee3c42210
1 измењених фајлова са 16 додато и 1 уклоњено
  1. 16 1
      src/store/index.js

+ 16 - 1
src/store/index.js

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