Commit 629317ec by hfpp2012 yinsigan

fix

1 parent 6ed16e7d
...@@ -228,7 +228,7 @@ export default class Element extends React.Component { ...@@ -228,7 +228,7 @@ export default class Element extends React.Component {
handleDoubleClick() { handleDoubleClick() {
const childrenObjectType = this.props.childrenObjectType const childrenObjectType = this.props.childrenObjectType
const url = `/regional_design/${this.props.id}?object=${childrenObjectType}` const url = `/web/regional_design/${this.props.id}?object=${childrenObjectType}`
if (childrenObjectType != 'drug_brandreth_grid') { if (childrenObjectType != 'drug_brandreth_grid') {
this.props.hashHistory.push(url) this.props.hashHistory.push(url)
} }
......
...@@ -36,7 +36,7 @@ export default class Header extends React.Component { ...@@ -36,7 +36,7 @@ export default class Header extends React.Component {
} }
else { else {
const data = this.state.data.map((repo) => { const data = this.state.data.map((repo) => {
const url = `/regional_design/${repo.id}?object=repo` const url = `/web/regional_design/${repo.id}?object=repo`
return ( return (
<Link key={ repo.id } className='btn btn-default mr15' to={ url }>{ repo.name }</Link> <Link key={ repo.id } className='btn btn-default mr15' to={ url }>{ repo.name }</Link>
) )
......
...@@ -4,7 +4,8 @@ import Spd from './containers/Spd' ...@@ -4,7 +4,8 @@ import Spd from './containers/Spd'
import { import {
HashRouter as Router, HashRouter as Router,
Route, Route,
Link Link,
IndexRoute
} from 'react-router-dom' } from 'react-router-dom'
import RegionalDesign from './components/RegionalDesign' import RegionalDesign from './components/RegionalDesign'
...@@ -12,7 +13,7 @@ import RegionalDesign from './components/RegionalDesign' ...@@ -12,7 +13,7 @@ import RegionalDesign from './components/RegionalDesign'
ReactDOM.render( ReactDOM.render(
<Router handler={Spd} history={Router}> <Router handler={Spd} history={Router}>
<Spd> <Spd>
<Route path="/regional_design/:id" component={RegionalDesign} /> <Route path="/web/regional_design/:id" component={RegionalDesign} />
</Spd> </Spd>
</Router>, </Router>,
document.getElementById('root') document.getElementById('root')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!