Commit 0452c395 by xuzhenghua

bug

parent 2534ea06
...@@ -46,7 +46,7 @@ class App extends Component { ...@@ -46,7 +46,7 @@ class App extends Component {
this.props.setCurrentUser(this.transformUser(res)) this.props.setCurrentUser(this.transformUser(res))
}) })
const routeMatchRule = /binding-tel|forgot/ const routeMatchRule = /binding-tel|forgot|set-password/
const {history} = this.props const {history} = this.props
history.listen(location => { history.listen(location => {
const {pathname} = location const {pathname} = location
......
import React, {Component} from 'react' import React, {Component} from 'react'
import './index.scss'; import './index.scss';
import {withRouter} from 'react-router-dom'
class HeaderBar extends Component { class HeaderBar extends Component {
constructor(props) { constructor(props) {
...@@ -17,7 +18,7 @@ class HeaderBar extends Component { ...@@ -17,7 +18,7 @@ class HeaderBar extends Component {
} }
goShop = () => { goShop = () => {
location.replace('/shopcart'); this.props.history.push('/shopcart')
} }
render() { render() {
...@@ -50,4 +51,4 @@ class HeaderBar extends Component { ...@@ -50,4 +51,4 @@ class HeaderBar extends Component {
} }
}; };
export default HeaderBar; export default withRouter(HeaderBar);
...@@ -469,7 +469,6 @@ class Detail extends Component { ...@@ -469,7 +469,6 @@ class Detail extends Component {
title='课程详情' title='课程详情'
arrow={true} arrow={true}
cart={true} cart={true}
toHref={href}
/> />
<CallApp className='toapp' /> <CallApp className='toapp' />
......
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