scorpio há 3 anos atrás
pai
commit
4a7cf62c37
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      src/page/login.vue

+ 3 - 1
src/page/login.vue

@@ -199,6 +199,7 @@ export default {
               this.init()
             } else {
               setToken(res.access_token)
+              this.user.setUserInfo({ name: res.real_name, deptName: res.nick_name })
               this.getInfo()
             }
           })
@@ -224,7 +225,8 @@ export default {
           } else {
             res.data.typeName = '服务商'
           }
-          this.user.setUserInfo(res.data)
+          const data = this.user.info
+          this.user.setUserInfo(Object.assign(res.data, data))
           this.getPermission()
         }
       })