Browse Source

refactor: 移除重复的用户信息存储逻辑

在getUserInfo方法中,直接通过store更新用户信息,移除多余的本地变量赋值操作
hfll
主管理员 2 weeks ago
parent
commit
5895c7c607
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      App.vue

+ 1
- 3
App.vue View File

@ -43,9 +43,7 @@
async getUserInfo() {
const res = await this.$api.login.getUserInfo();
if (res.code === 200) {
this.userInfo = res.result;
// store
this.$store.dispatch('updateUserInfo', this.userInfo)
this.$store.dispatch('updateUserInfo', this.userInfo)
}
},


Loading…
Cancel
Save