Commit 7ec178ee by zhanghaozhe

temp

parent df4b76a5
......@@ -59,6 +59,8 @@ class App extends Component {
const routeMatchRule = /binding-tel|forgot|set-password/
const {history} = this.props
history.listen((location) => {
console.log(this.props.location);
console.log(location);
this.setNavigationRecord(location)
if (cookie.get('uid') && this.props.user.hasError) {
this.getUser()
......@@ -68,7 +70,7 @@ class App extends Component {
if (routeMatchRule.test(pathname)) {
return
}
location.state = {from: this.previousLocation};
location.state = {...location.state, ...{from: this.previousLocation}};
}
})
......@@ -86,6 +88,7 @@ class App extends Component {
[{pathname: location.pathname, search: '', hash: ''}]
}
}
// console.log(location.state.record);
}
getUser = () => {
......
......@@ -14,6 +14,7 @@ class HeaderBar extends Component {
window.history.go(-2)
}
if(state.record && state.record.length > 1){
console.log(state.record.length);
window.history.go(-1);
}else{
window.location.href = window.location.origin
......
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