From cf2b692c84187933814d7f3ea7f5246d1bdd8e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E5=85=89=E5=AD=9F?= Date: Fri, 27 Feb 2026 22:33:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E7=A1=AC=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E6=9D=83=E9=99=90=EF=BC=8C=E6=94=B9=E4=B8=BA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E7=9A=84=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/user/index.ts | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/stores/user/index.ts b/src/stores/user/index.ts index bd4431d..ff55443 100644 --- a/src/stores/user/index.ts +++ b/src/stores/user/index.ts @@ -24,35 +24,8 @@ const storeSetup = () => { }); const setUserInfos = (payload: Partial) => { - // 权限暂时写死,后续根据接口返回的权限进行调整 - const auth = [ - { - name: "hwxj", - enabled: 1, - }, - { - name: "bjjx", - enabled: 1, - }, - { - name: "hgzw", - enabled: 1, - }, - { - name: "znzx", - enabled: 1, - }, - { - name: "rthx", - enabled: 1, - }, - { - name: "fkgn", - enabled: 1, - }, - ]; // 获取权限 - // const auth = payload.permissions || []; + const auth = payload?.permissions || []; userInfos.value = { ...userInfos.value, ...payload, auth }; Session.set("userInfos", userInfos.value); };