5-1 配置动态路由
<Route path="/detail/:id" component={Detail}></Route>
5-2 跳转
<Button onClick={this.handleToggle}>detail</Button>
handleToggle=()=>{
this.props.history.push(`/detail/${this.state.id}`)
}
5-3 详情页接收 this.props.match.params
componentDidMount() {
console.log(this.props.match.params)
}