Commit 5bf019de authored by wty's avatar wty

修正一点点bug

parent eeb807df
...@@ -3,22 +3,16 @@ import DataCenter from "./dataCenter/Root"; ...@@ -3,22 +3,16 @@ import DataCenter from "./dataCenter/Root";
import IndexAdmin from "./page/indexAdmin"; import IndexAdmin from "./page/indexAdmin";
import Index from "./page/index"; import Index from "./page/index";
import Login from "./page/login/login"; import Login from "./page/login/login";
import {BrowserRouter as Router, Route, Switch} from "react-router-dom"; import {HashRouter as Router, Route, Switch} from "react-router-dom";
function App() { function App() {
return ( return (
<Router> <Router>
<DataCenter> <DataCenter>
<Switch> <Switch>
<Route path='/login'> <Route exact path='/login' component={Login}/>
<Login/> <Route exact path='/' component={Index}/>
</Route> <Route exact path='/admin' component={IndexAdmin}/>
<Route path='/index'>
<Index/>
</Route>
<Route path='/admin'>
<IndexAdmin/>
</Route>
</Switch> </Switch>
</DataCenter> </DataCenter>
</Router> </Router>
......
const apiConfig = { const apiConfig = {
domain: 'http://' + location.hostname + ':3000', domain: 'http://' + window.location.hostname + ':3000',
} }
export default apiConfig export default apiConfig
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