Commit 8dc4e5b6 by xuzhenghua

购物车

parent 2946ce30
...@@ -132,7 +132,7 @@ class Cart extends Component { ...@@ -132,7 +132,7 @@ class Cart extends Component {
console.log(this.state.courseIdarr); console.log(this.state.courseIdarr);
http.get(`${API['base-api']}/m/cart/addtopreorder/[${this.state.courseIdarr}]`).then((res) => { http.get(`${API['base-api']}/m/cart/addtopreorder/[${this.state.courseIdarr}]`).then((res) => {
if (res.data.errno == 0) { if (res.data.errno == 0) {
this.props.history.push(`/order?id=[${this.state.courseIdarr}]`) this.props.history.push(`/order?id=[${this.state.courseIdarr}]`,{simple: 1})
} else { } else {
Toast.info(res.data.msg, 2); Toast.info(res.data.msg, 2);
} }
...@@ -182,7 +182,7 @@ class Cart extends Component { ...@@ -182,7 +182,7 @@ class Cart extends Component {
<Loading isLoading={this.state.isLoading}> <Loading isLoading={this.state.isLoading}>
<div className="cart-body"> <div className="cart-body">
<ShopCart <ShopCart
checkChange={this.checkChange.bind(this)} checkChange={this.checkChange.bind(this)}
data={this.state.data} data={this.state.data}
toDetail={this.toCourseDetail} toDetail={this.toCourseDetail}
/> />
......
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