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); };