File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import Grid from "@material-ui/core/Grid";
2828import { MessageBox } from "../utils/MessageBox" ;
2929import { sortByKey } from "../../utils/JsonHelper" ;
3030import { getManagementProjectsPath , getProjectDataPath } from "../../route/AppRouter" ;
31- import { getBaseUrl } from "../../utils/UrlBuilder" ;
31+ import { getBaseUrl , getContextPath } from "../../utils/UrlBuilder" ;
3232import ReactGA from 'react-ga' ;
3333
3434const initialState = {
@@ -246,7 +246,6 @@ export default function LoginPage() {
246246 console . log ( "> 2: redirectTo: " + pathname ) ;
247247 return redirectTo ( pathname ) ;
248248 }
249-
250249 case 1 :
251250 return redirectTo ( getManagementProjectsPath ( ) ) ;
252251 default :
Original file line number Diff line number Diff line change @@ -14,7 +14,16 @@ import {getContextPath} from "../utils/UrlBuilder";
1414
1515export default function AppRouter ( ) {
1616
17- setPathname ( window . location . pathname ) ;
17+ const fullPathname = window . location . pathname ;
18+ const pathname = fullPathname . replace ( getContextPath ( ) , "" ) ;
19+
20+ console . log ( "----save pathname -------------------------------------------" ) ;
21+ console . log ( "contextPath: " + getContextPath ( ) ) ;
22+ console . log ( "fullPathname: " + fullPathname ) ;
23+ console . log ( "pathname: " + pathname ) ;
24+ console . log ( "-------------------------------------------------------------" ) ;
25+
26+ setPathname ( pathname ) ;
1827 return (
1928 < BrowserRouter
2029 basename = { getContextPath ( ) }
You can’t perform that action at this time.
0 commit comments