Commit f5abed57 by xuzhenghua

直播见

parent 6852cf73
......@@ -241,7 +241,7 @@ function CourseList({modules, toDetail}) {
!isOdd && modules.list[0].course_img!== modules.list[0].course_img_small &&
<div className="category-vip" onClick={() => toDetail(modules.list[0].course_id)}>
{/* <Link to={`/detail?id=${modules.list[0].course_id}`}> */}
<img src={modules.list[0].course_img_small} alt=""/>
<img src={modules.list[0].course_img} alt=""/>
{/* </Link> */}
</div>
}
......
......@@ -18,25 +18,25 @@ class LiveRoom extends Component {
// 课程直播信息
componentDidMount() {
this.getRoom()
// this.getRoom()
if (browser.isWeixin) {
this.isFollow()
}
}
// 课程直播信息
getRoom = () => {
http.get(`${API.home}/m/live/middle/${this.props.roomMess.room_id}`).then((res) => {
if (res.data.code === 200) {
this.setState({
roomMess: res.data.data
})
} else {
Toast.info(res.data.msg, 2)
}
})
}
// // 课程直播信息
// getRoom = () => {
// http.get(`${API.home}/m/live/middle/${this.props.roomMess.room_id}`).then((res) => {
// if (res.data.code === 200) {
// // this.setState({
// // roomMess: res.data.data
// // })
// } else {
// Toast.info(res.data.msg, 2)
// }
//
// })
// }
// 是否关注服务号
isFollow = () => {
......@@ -106,7 +106,7 @@ class LiveRoom extends Component {
}
// 点击预约
toSubscribe = () => {
toSubscribeFun = () => {
this.props.colseBox(false)
this.setState({
toSubscribe: true,
......@@ -175,7 +175,7 @@ class LiveRoom extends Component {
render() {
const roomMess = this.state.roomMess
const roomMess = this.props.roomMess
return (
<div className='index-box'>
{/* 直播间预约 */}
......@@ -195,7 +195,7 @@ class LiveRoom extends Component {
<div className='course-dec'>
<h2 className='title'>{roomMess.live_title}</h2>
<p className='teacher'>讲师:{roomMess.live_teacher_name}</p>
<p className='time'>时间:{roomMess.start_date}</p>
<p className='time'>时间:{roomMess.live_start_time}</p>
</div>
<div className='course-info'>
<ul>
......@@ -207,11 +207,11 @@ class LiveRoom extends Component {
</div>
<div className='course-subscribe'>
{
roomMess.is_prepare === 0 && roomMess.course_id === 0 &&
<button onClick={this.toSubscribe}>预约</button>
!roomMess.is_prepare && roomMess.course_id !== 0 &&
<button onClick={this.toSubscribeFun}>预约</button>
}
{
roomMess.is_prepare === 1 &&
roomMess.is_prepare &&
<span>直播尚未开始,敬请期待...</span>
}
</div>
......
......@@ -533,7 +533,7 @@ function CourseBottom(props) {
// Buttons = <Link to={`/detail?id=${props.item.course_id}`} className={'bargain'}>我要砍价</Link>
Buttons = <a href="javascript:;" onClick={() => props.toDetail(props.item.course_id)} className={'bargain'}>我要砍价</a>
} else if (props.item.bargain_status === 3) {
Buttons = <Link to={`/play?id=${props.item.course_id}`} className={'bargain'}>去学习</Link>
Buttons = <Link to={`/play/video?id=${props.item.course_id}`} className={'bargain'}>去学习</Link>
} else {
Buttons = (
<div className="btns">
......
......@@ -129,11 +129,11 @@
}
.mbc-box {
position: fixed;
position: absolute;
left: 0;
top: 88px;
right: 0;
bottom: 0;
bottom: -88px;
background-color: rgba(0, 0, 0, .6);
.tabcontent {
......@@ -183,6 +183,7 @@
border-radius: 15px;
margin-top: 15px;
margin-bottom: -5px;
font-size: 12px;
}
.active-label {
display: inline-block;
......@@ -194,6 +195,7 @@
border-radius: 15px;
margin-top: 15px;
margin-bottom: -5px;
font-size: 12px;
color: $white;
}
}
......
......@@ -66,6 +66,7 @@
margin-top: 15px;
margin-bottom: -5px;
margin-right: 12px;
font-size: 12px;
}
:nth-of-type(3n) {
......
......@@ -263,7 +263,7 @@ class BtnStatus extends Component {
<i className='iconfont iconerji' />
<span>课程咨询</span>
</a>
<Link to={`/play?id=${info.v_course_id}`} className='btn btn-m bg-09f'>开始学习</Link>
<Link to={`/play/video?id=${info.v_course_id}`} className='btn btn-m bg-09f'>开始学习</Link>
</div>
}
{/*拼团 未开团*/}
......@@ -366,7 +366,7 @@ class BtnStatus extends Component {
{
info.aist_start_time === "" ?
(
<Link to={`/play?id=${info.v_course_id}`} className='btn btn-m learn-now'>
<Link to={`/play/video?id=${info.v_course_id}`} className='btn btn-m learn-now'>
<span>开始学习</span>
</Link>
......
......@@ -110,13 +110,13 @@ class OutLine extends Component {
{
// 已购买直播结束已上传视频:正常播放按钮,点击播放课程
!introduce.is_aist && item.class_status === 2 &&
<Link to={`/play?id=${introduce.v_course_id + '&video_id=' + item.video_id}`} className='iconfont icondanseshixintubiao-23 icon-right-22'></Link>
<Link to={`/play/video?id=${introduce.v_course_id}`} className='iconfont icondanseshixintubiao-23 icon-right-22'></Link>
}
{
// 返现课程 是返现课程 未开课 已开课 是返现课程 未开课 已开课 已练习
introduce.is_aist && item.is_open && introduce.is_baoming === 1 &&
<Link to={`/play?id=${introduce.v_course_id + '&video_id=' + item.video_id}`} className='aist aist_open'></Link>
<Link to={`/play/video?id=${introduce.v_course_id}`} className='aist aist_open'></Link>
}
......
......@@ -328,7 +328,7 @@ class Single extends Component {
<i className='iconfont icondanseshixintubiao-5'></i>
<span>购买成功</span>
</div>
<Link to={`/play?id=${getParam('id')}`} className='btn btn-18B4ED'>去学习</Link>
<Link to={`/play/video?id=${getParam('id')}`} className='btn btn-18B4ED'>去学习</Link>
</div>
}
{
......
......@@ -154,7 +154,7 @@ export default class PayOrder extends Component {
}
// 支付宝支付
alipayPay = (orderId) => {
http.get(`${API['base-api']}/pay/alipay/wap_charge/oid/${orderId}`).then((res) => {
http.get(`${API['base-api']}/pay/alipay/wap_charge_new/oid/${orderId}`).then((res) => {
if (res.data.errno === 0) {
window.location = res.data.data.url;
} else {
......@@ -223,6 +223,9 @@ export default class PayOrder extends Component {
this.payCallback()
}
if (is_weixin()) {
this.setState({
payType: 1
})
this.isweixinPay()
}
}
......
......@@ -18,5 +18,6 @@
.complete-btn {
background: $active;
color: $white;
margin-top: 34px;
}
}
\ No newline at end of file
......@@ -50,7 +50,7 @@ class FreeCourse extends PureComponent {
}
handleClick = id => {
this.props.history.push(`/play?id=${id}`)
this.props.history.push(`/play/video?id=${id}`)
}
getFreeCourses = () => {
......
......@@ -113,7 +113,6 @@
flex-direction: column;
align-items: center;
padding-top: 140px;
background: $bg_f5f5f5;
.iconfish {
width: 20px;
......
......@@ -36,6 +36,7 @@ html, body, #root {
flex: 1 1 auto;
overflow-y: auto;
box-sizing: border-box;
background: $bg_f5f5f5;
}
.active {
......
......@@ -71,7 +71,7 @@ class CampTest extends Component {
this.body = document.getElementsByTagName('body')[0];
this.body.style.position = 'static';
} else {
this.props.history.push(`/detail?id=${this.course_id}`)
this.props.history.push(`/detail?id=${this.course_id}`,{href: '/classify'})
}
};
// 选择答案
......
......@@ -19,7 +19,6 @@ import Single from "@/components/detail/single";
let alert = Modal.alert
function ProgressShareModal(props) {
console.log(props.data.url);
return (
props.isShow &&
<div className='progress-share-modal-wrapper'>
......@@ -100,6 +99,12 @@ class Video extends Component {
componentDidMount() {
const location = window.location;
if(location.protocol === 'https:'){
location.replace('http'+ location.href.slice(5))
return
}
this.courseID = getParam('id')
if (!this.courseID) {
this.props.history.replace('/')
......
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