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