Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
6903658524
@ -1,52 +1,58 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import { SnackbarHOC } from 'educoder';
|
import { SnackbarHOC } from 'educoder';
|
||||||
|
|
||||||
|
|
||||||
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
|
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
|
||||||
import Loadable from 'react-loadable';
|
import Loadable from 'react-loadable';
|
||||||
import Loading from '../../Loading';
|
import Loading from '../../Loading';
|
||||||
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
|
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
|
||||||
|
|
||||||
const PathsDetail = Loadable({
|
const PathsDetail = Loadable({
|
||||||
loader: () => import('./PathDetail/PathDetailIndex'),
|
loader: () => import('./PathDetail/PathDetailIndex'),
|
||||||
loading:Loading,
|
loading:Loading,
|
||||||
})
|
})
|
||||||
const PathsNew = Loadable({
|
const PathsNew = Loadable({
|
||||||
loader: () => import('./PathNew'),
|
loader: () => import('./PathNew'),
|
||||||
loading:Loading,
|
loading:Loading,
|
||||||
})
|
})
|
||||||
const Statistics = Loadable({
|
const Statistics = Loadable({
|
||||||
loader: () => import('./SchoolStatistics/Statistics'),
|
loader: () => import('./SchoolStatistics/Statistics'),
|
||||||
loading:Loading
|
loading:Loading
|
||||||
})
|
})
|
||||||
|
|
||||||
const ShixunPaths = Loadable({
|
const ShixunPaths = Loadable({
|
||||||
loader: () => import('./ShixunPaths'),
|
loader: () => import('./ShixunPaths'),
|
||||||
loading:Loading,
|
loading:Loading,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class Index extends Component{
|
class Index extends Component{
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Switch {...this.props}>
|
<Switch {...this.props}>
|
||||||
<Route path="/paths/:pathId/statistics" component = {Statistics} {...this.props} {...this.state}></Route>
|
<Route path="/paths/:pathId/statistics" component = {Statistics} {...this.props} {...this.state}></Route>
|
||||||
<Route path="/paths/new" exact
|
|
||||||
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
|
<Route path="/paths/new" exact
|
||||||
></Route>
|
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
|
||||||
<Route path="/paths/:pathId/edit" exact
|
></Route>
|
||||||
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
|
<Route path="/paths/:pathId/edit" exact
|
||||||
></Route>
|
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
|
||||||
<Route path="/paths/:pathId" exact component = {PathsDetail} {...this.props} {...this.state}></Route>
|
></Route>
|
||||||
<Route exact path="/paths" exact component={ShixunPaths} {...this.props} {...this.state}></Route>
|
|
||||||
</Switch>
|
<Route path="/paths/:pathId" exact
|
||||||
</div>
|
render={(props)=>(<PathsDetail {...this.props} {...this.state} {...props}/>)}
|
||||||
)
|
></Route>
|
||||||
}
|
|
||||||
}
|
{/*<Route path="/paths/:pathId" exact component = {PathsDetail} {...this.props} {...this.state}></Route>*/}
|
||||||
|
<Route exact path="/paths" exact component={ShixunPaths} {...this.props} {...this.state}></Route>
|
||||||
|
</Switch>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
export default SnackbarHOC() ( TPMIndexHOC(Index) );
|
export default SnackbarHOC() ( TPMIndexHOC(Index) );
|
Loading…
Reference in new issue