Commit d1b912b0 by xuzhenghua

Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu

parents 725fc44b 96791646
......@@ -135,9 +135,11 @@ class Video extends Component {
// 直接购买
tobuy = () => {
http.get(`${API['base-api']}/m/cart/addtopreorder/[${getParam('id')}]`).then((res) => {
// 详情页单集购买到该页面,url中的id不是课程id
const { course={} } = this.state;
http.get(`${API['base-api']}/m/cart/addtopreorder/[${course.course_id}]`).then((res) => {
if (res.data.errno === 0) {
this.props.history.push(`/order?id=${getParam('id')}`, {simple: 1})
this.props.history.push(`/order?id=${course.course_id}`, {simple: 1})
} else {
Toast.info(res.data.msg, 2);
}
......
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