From 9a101efc23b1ba81867baa1b382f54fa1ac1b774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=B7=E9=92=89?= <41830859@qq.com> Date: Thu, 6 Sep 2018 21:03:49 +0800 Subject: [PATCH] remove getBashRedirect --- src/layouts/BasicLayout.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 73e06b64..9ceea7c5 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -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 => { const { dispatch } = this.props; dispatch({ -- GitLab