previousPathName

dev_cs
caicai8 5 years ago
parent fea8a31f74
commit 948e641c58

@ -296,10 +296,11 @@ class CoursesIndex extends Component{
componentDidMount(){ componentDidMount(){
// this.updataleftNav() // this.updataleftNav()
this.historyArray = [] this.historyArray = [location.pathname];
this.props.history.listen( location => { this.props.history.listen( location => {
console.log(location) console.log(location);
this.historyArray.unshift(location.pathname) this.historyArray.unshift(location.pathname);
this.historyArray.length = 2; this.historyArray.length = 2;
//Do your stuff here //Do your stuff here
}); });

Loading…
Cancel
Save