From 72d152a8cf331e94b33f01c203899c08704e3c3d Mon Sep 17 00:00:00 2001 From: Leo <98382335+gaoziman@users.noreply.github.com> Date: Mon, 7 Jul 2025 01:13:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(auth):=20=E5=AE=8C=E5=96=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E5=AD=98=E5=82=A8=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 增加用户信息中的buttons字段存储 - 支持用户权限按钮列表管理 - 为权限实时更新提供数据基础 --- src/store/auth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/auth.ts b/src/store/auth.ts index 4a1d47c..95673ac 100644 --- a/src/store/auth.ts +++ b/src/store/auth.ts @@ -85,8 +85,9 @@ export const useAuthStore = defineStore('auth-store', { userName: userInfoResult.data.loginUser.userName, avatar: userInfoResult.data.loginUser.avatar, role: userInfoResult.data.roles, + buttons: userInfoResult.data.buttons, // 用户权限按钮列表 accessToken: data.tokenValue, - refreshToken: data.tokenValue, // 如果后端没有单独的refreshToken,暂时使用相同值 + refreshToken: data.tokenValue, // 没有单独的refreshToken,暂时使用相同值 } await this.handleLoginInfo(userInfo as Api.Login.Info) }