|
|
|
@ -102,10 +102,15 @@ class BasicLayout extends React.PureComponent { |
|
|
|
// According to the url parameter to redirect
|
|
|
|
// 这里是重定向的,重定向到 url 的 redirect 参数所示地址
|
|
|
|
const urlParams = new URL(window.location.href); |
|
|
|
const redirect = urlParams.searchParams.get('redirect') || '/dashboard/analysis'; |
|
|
|
|
|
|
|
const redirect = urlParams.searchParams.get('redirect'); |
|
|
|
// Remove the parameters in the url
|
|
|
|
urlParams.searchParams.delete('redirect'); |
|
|
|
window.history.pushState(null, 'redirect', urlParams.href); |
|
|
|
if (redirect) { |
|
|
|
urlParams.searchParams.delete('redirect'); |
|
|
|
window.history.replaceState(null, 'redirect', urlParams.href); |
|
|
|
} else { |
|
|
|
return '/dashboard/analysis'; |
|
|
|
} |
|
|
|
return redirect; |
|
|
|
} |
|
|
|
handleMenuCollapse = (collapsed) => { |
|
|
|
|