Commit 57b9163f by FE

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

parents 0bfb832f 93e8a451
......@@ -99,11 +99,6 @@ class Detail extends Component {
})
}
}
showSingleBox = () => {
this.setState({
singleBox: true
})
}
// componentWillReceiveProps(nextProps) {
// let _this = this;
......@@ -309,7 +304,6 @@ class Detail extends Component {
{/*单集购买弹窗*/}
<Single
singleBox={this.state.singleBox}
showSingleBox={this.showSingleBox}
boxHide={this.boxHide}
data={this.state.singMess}
vcourseId={course_info.v_course_id}
......
......@@ -69,7 +69,7 @@ class Single extends Component {
componentWillReceiveProps(nextProps, nextContext) {
this.setState({
singleBox: nextProps.singleBox,
singleBox: nextProps.singleBox
})
}
......@@ -152,30 +152,32 @@ class Single extends Component {
clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null;
// 获取课程类型
this.props.showSingleBox();
http.get(`${API['base-api']}/class_order_status/${getParam('oid')}`).then((res) => {
Toast.info(Number(res.data.data.errno));
if (Number(res.data.data.errno) === 200) {
// 正常购买单集成功
this.setState({
status: 6
status: 6,
showSingleBox: true,
})
} else if (Number(res.data.data.errno) === 201) {
// 0元参团
this.setState({
status: 4
status: 4,
showSingleBox: true,
})
} else if (Number(res.data.data.errno) === 202) {
// 0元购
this.setState({
status: 3
status: 3,
showSingleBox: true,
})
} else if (Number(res.data.data.errno) === 203) {
// 三天内特价
this.setState({
nowPrice: res.data.data.data.now_price,
laterPrice: res.data.data.data.three_day_later_price,
status: 2
status: 2,
showSingleBox: true,
})
} else {
Toast.info(res.data.data.msg, 2)
......@@ -218,29 +220,32 @@ class Single extends Component {
clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null;
// 获取课程类型
this.props.showSingleBox();
http.get(`${API['base-api']}/class_order_status/${getParam('oid')}`).then((res) => {
if (Number(res.data.data.errno) === 200) {
// 正常购买单集成功
this.setState({
status: 6
status: 6,
showSingleBox: true,
})
} else if (Number(res.data.data.errno) === 201) {
// 0元参团
this.setState({
status: 4
status: 4,
showSingleBox: true,
})
} else if (Number(res.data.data.errno) === 202) {
// 0元购
this.setState({
status: 3
status: 3,
showSingleBox: true,
})
} else if (Number(res.data.data.errno) === 203) {
// 三天内特价
this.setState({
nowPrice: res.data.data.data.now_price,
laterPrice: res.data.data.data.three_day_later_price,
status: 2
status: 2,
showSingleBox: true,
})
} else {
Toast.info(res.data.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