zhuliu vor 1 Jahr
Ursprung
Commit
4dbbba5bea
2 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen
  1. 7 3
      src/views/layout/mixins/index.js
  2. 1 1
      src/views/login/index.vue

+ 7 - 3
src/views/layout/mixins/index.js

@@ -48,9 +48,13 @@ export const commonData = {
   },
   methods: {
     //获取个人信息
-    getUserInfo() {
-      this.$store.commit('SET_USERINFO', {})
-      this.$api.getUserInfo().then(response => {
+    async getUserInfo() {
+      // var userinfo = this.$s.getObj('userinfo')
+      // if(userinfo){
+      //   this.$store.commit('SET_USERINFO', {})
+      // }
+      
+      await this.$api.getUserInfo().then(response => {
         localStorage.tenant = response.data.tenantId
         this.$store.commit('SET_USERINFO', response.data)
 

+ 1 - 1
src/views/login/index.vue

@@ -251,7 +251,7 @@ export default {
         this.$cookie.set('token',response.data.token)
         sessionStorage.clear()
         await this.DictMessage()
-            this.getUserInfo()
+           await this.getUserInfo()
             this.getScenario()
             this.getMatter()
             this.getPermissionList()