Commit 5bf019de authored by wty's avatar wty

修正一点点bug

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