初志鑫 4 years ago
parent
commit
5ae4f4b80b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/store/modules/user.js

+ 2 - 2
src/store/modules/user.js

@@ -68,8 +68,8 @@ const actions = {
       );
     }
   },
-  async getUserInfo({ commit }) {
-    const { data } = await getUserInfo();
+  async getUserInfo({ commit, state }) {
+    const { data } = await getUserInfo(state.accessToken);
     if (!data) {
       Vue.prototype.$baseMessage("验证失败,请重新登录...", "error");
       return false;