Commit 5dc5baca by zhanghaozhe

pre

parent ca982d03
...@@ -13,15 +13,7 @@ import PrivateRoute from '@/router/privateRoute' ...@@ -13,15 +13,7 @@ import PrivateRoute from '@/router/privateRoute'
class Study extends Component { class Study extends Component {
state = { state = {
position: { position: {}
}
}
list;
storeScrollPosition(tab){
} }
render() { render() {
...@@ -42,15 +34,11 @@ class Study extends Component { ...@@ -42,15 +34,11 @@ class Study extends Component {
>免费课程</NavLink> >免费课程</NavLink>
</div> </div>
</div> </div>
<div className="study-container" ref={el => this.list = el}> <div className="study-container">
<Switch> <Switch>
<Redirect exact from='/study' to='study/my-course'/> <Redirect exact from='/study' to='study/my-course'/>
<Route path={`${this.props.match.path}/my-course`} component={MyCourses}/> <Route path={`${this.props.match.path}/my-course`} component={MyCourses}/>
{/*<PrivateRoute path={`${this.props.match.path}/my-course`} component={MyCourses}/>*/}
<Route path={`${this.props.match.path}/free-course`} component={FreeCourses}/> <Route path={`${this.props.match.path}/free-course`} component={FreeCourses}/>
{/*<Route path={`${this.props.match.path}/my-course`} render={props => {
<MyCourses storeScrollPosition={this.storeScrollPosition}/>
}}/>*/}
</Switch> </Switch>
</div> </div>
</section> </section>
......
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