fix: 移除硬编码权限,改为使用接口返回的权限
This commit is contained in:
parent
685bcc76a8
commit
cf2b692c84
|
|
@ -24,35 +24,8 @@ const storeSetup = () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const setUserInfos = (payload: Partial<IUserInfos>) => {
|
const setUserInfos = (payload: Partial<IUserInfos>) => {
|
||||||
// 权限暂时写死,后续根据接口返回的权限进行调整
|
|
||||||
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 };
|
userInfos.value = { ...userInfos.value, ...payload, auth };
|
||||||
Session.set("userInfos", userInfos.value);
|
Session.set("userInfos", userInfos.value);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue