Commit eb97d4b1 authored by 张烨's avatar 张烨

fix: checkgroup

parent 975f5d33
......@@ -22,7 +22,7 @@ export const checkChildrenByCondition = (
return fn(item);
}
const childrenResults = item.children[method](t =>
checkChildrenByCondition(t, fn, method),
checkChildrenByCondition(t, fn, withGroup, method),
);
return withGroup ? [fn(item), ...childrenResults] : [...childrenResults];
};
......
......@@ -39,7 +39,7 @@ const Login = props => {
msg,
} = result;
if (pass === true) {
localStorage.setItem('token', token?.access_token);
localStorage.setItem('token', token?.access_token || '');
setUserMode(userMode);
if (userMode === USER_MODE.ADMIN || userMode === USER_MODE.SUPER) {
const authority = [AUTHORITY.LOGIN, AUTHORITY[userMode]];
......
......@@ -136,6 +136,7 @@ const SiteManage = () => {
checkChildrenByCondition(
l,
it => (it.isChecked ? [getId(it)] : []),
true,
'map',
).flat(Infinity),
)
......
......@@ -105,6 +105,7 @@ const SiteManage = () => {
checkChildrenByCondition(
l,
it => (it.isChecked ? [getId(it)] : []),
true,
'map',
).flat(Infinity),
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment