Commit eb97d4b1 authored by 张烨's avatar 张烨

fix: checkgroup

parent 975f5d33
...@@ -22,7 +22,7 @@ export const checkChildrenByCondition = ( ...@@ -22,7 +22,7 @@ export const checkChildrenByCondition = (
return fn(item); return fn(item);
} }
const childrenResults = item.children[method](t => const childrenResults = item.children[method](t =>
checkChildrenByCondition(t, fn, method), checkChildrenByCondition(t, fn, withGroup, method),
); );
return withGroup ? [fn(item), ...childrenResults] : [...childrenResults]; return withGroup ? [fn(item), ...childrenResults] : [...childrenResults];
}; };
......
...@@ -39,7 +39,7 @@ const Login = props => { ...@@ -39,7 +39,7 @@ const Login = props => {
msg, msg,
} = result; } = result;
if (pass === true) { if (pass === true) {
localStorage.setItem('token', token?.access_token); localStorage.setItem('token', token?.access_token || '');
setUserMode(userMode); setUserMode(userMode);
if (userMode === USER_MODE.ADMIN || userMode === USER_MODE.SUPER) { if (userMode === USER_MODE.ADMIN || userMode === USER_MODE.SUPER) {
const authority = [AUTHORITY.LOGIN, AUTHORITY[userMode]]; const authority = [AUTHORITY.LOGIN, AUTHORITY[userMode]];
......
...@@ -136,6 +136,7 @@ const SiteManage = () => { ...@@ -136,6 +136,7 @@ const SiteManage = () => {
checkChildrenByCondition( checkChildrenByCondition(
l, l,
it => (it.isChecked ? [getId(it)] : []), it => (it.isChecked ? [getId(it)] : []),
true,
'map', 'map',
).flat(Infinity), ).flat(Infinity),
) )
......
...@@ -105,6 +105,7 @@ const SiteManage = () => { ...@@ -105,6 +105,7 @@ const SiteManage = () => {
checkChildrenByCondition( checkChildrenByCondition(
l, l,
it => (it.isChecked ? [getId(it)] : []), it => (it.isChecked ? [getId(it)] : []),
true,
'map', 'map',
).flat(Infinity), ).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