From 205a67504b6931d2d9533db9fcf196c77375caf2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 27 Sep 2023 15:22:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=95=B0=E6=8D=AE=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E7=94=A8=E6=88=B7=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 7c2e6e8..d127d9e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -7,6 +7,7 @@ const useUserStore = defineStore( { state: () => ({ token: getToken(), + id: '', name: '', avatar: '', roles: [], @@ -42,8 +43,9 @@ const useUserStore = defineStore( } else { this.roles = ['ROLE_DEFAULT'] } + this.id = user.userId this.name = user.userName - this.avatar = avatar; + this.avatar = avatar resolve(res) }).catch(error => { reject(error)