Commit 9a101efc authored by ๆ‹ท้’‰'s avatar ๆ‹ท้’‰ Committed by ๅๅณ

remove getBashRedirect

parent ee0f6393
...@@ -186,27 +186,6 @@ class BasicLayout extends React.PureComponent { ...@@ -186,27 +186,6 @@ class BasicLayout extends React.PureComponent {
}; };
}; };
getBashRedirect = () => {
// According to the url parameter to redirect
// ่ฟ™้‡Œๆ˜ฏ้‡ๅฎšๅ‘็š„,้‡ๅฎšๅ‘ๅˆฐ url ็š„ redirect ๅ‚ๆ•ฐๆ‰€็คบๅœฐๅ€
const urlParams = new URL(window.location.href);
const redirect = urlParams.searchParams.get('redirect');
// Remove the parameters in the url
if (redirect) {
urlParams.searchParams.delete('redirect');
window.history.replaceState(null, 'redirect', urlParams.href);
} else {
const { routerData } = this.props;
// get the first authorized route path in routerData
const authorizedPath = Object.keys(routerData).find(
item => check(routerData[item].authority, item) && item !== '/'
);
return authorizedPath;
}
return redirect;
};
handleMenuCollapse = collapsed => { handleMenuCollapse = collapsed => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
......
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