Commit fa4fc674 by wangshuo

单集购买

parent d9fd9539
......@@ -306,6 +306,7 @@ class Detail extends Component {
singleBox={this.state.singleBox}
boxHide={this.boxHide}
data={this.state.singMess}
vcourseId={course_info.v_course_id}
videoId={this.state.singMess.video_id}
title={course_info.course_title}
/>
......
......@@ -129,7 +129,7 @@ class Single extends Component {
clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null;
// 获取课程类型
http.get(`${API.home}/sys/orderStatus/${getParam('oid')}`).then((res) => {
http.get(`${API['base-api']}/sys/orderStatus/${getParam('oid')}`).then((res) => {
if (res.data.data.errno == '200') {
// 正常购买单集成功
this.setState({
......@@ -192,7 +192,7 @@ class Single extends Component {
clearInterval(_this.intervalPayStatus);
_this.intervalPayStatus = null;
// 获取课程类型
http.get(`${API.home}/sys/orderStatus/${getParam('oid')}`).then((res) => {
http.get(`${API['base-api']}/sys/orderStatus/${getParam('oid')}`).then((res) => {
if (res.data.data.errno == '200') {
// 正常购买单集成功
this.setState({
......@@ -311,6 +311,7 @@ class Single extends Component {
}
return (
<div>
{
this.props.singleBox &&
......@@ -359,7 +360,7 @@ class Single extends Component {
</div>
<div className="dec">· 3天内购买全集,可直接抵扣该集费用,{this.state.nowPrice}元购买。</div>
<div className="dec">· 超过3天,按照未够集数/全部集数等比例计费,{this.state.laterPrice}元购买全集。</div>
<div className='btn btn-18B4ED'>开始学习</div>
<Link to={`/play/video?id=${this.props.vcourseId}&video_id=${this.props.data.video_id}`} className='btn btn-18B4ED'>开始学习</Link>
<div className='btn btn-FF4000' onclick={this.toBuyAll()}>{this.state.nowPrice}购买全集
</div>
</div>
......@@ -393,7 +394,7 @@ class Single extends Component {
<i className='iconfont icondanseshixintubiao-5'></i>
<span>购买成功</span>
</div>
<Link to={`/play/video?id=${getParam('id')}`} className='btn btn-18B4ED'>去学习</Link>
<Link to={`/play/video?id=${this.props.vcourseId}&video_id=${this.props.data.video_id}`} className='btn btn-18B4ED'>去学习</Link>
</div>
}
{
......
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