|
|
|
@ -1,11 +1,16 @@
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
|
import { getImageUrl } from 'educoder';
|
|
|
|
|
import { Modal } from 'antd';
|
|
|
|
|
import { WordsBtn } from 'educoder';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
class LiveItem extends Component{
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
visible:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteLive=(id)=>{
|
|
|
|
|
this.props.confirm({
|
|
|
|
@ -27,12 +32,55 @@ class LiveItem extends Component{
|
|
|
|
|
console.log('Cancel');
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
alertInfo=()=>{
|
|
|
|
|
console.log("dddd");
|
|
|
|
|
this.setState({
|
|
|
|
|
visible:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onDialogOkBtnClick=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
visible:false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
const { key, item , setLiveId } = this.props;
|
|
|
|
|
const { visible } = this.state;
|
|
|
|
|
console.log(visible);
|
|
|
|
|
return(
|
|
|
|
|
<div className="liveItem" key={key}>
|
|
|
|
|
<Modal
|
|
|
|
|
title="提示"
|
|
|
|
|
visible={visible}
|
|
|
|
|
closable={false}
|
|
|
|
|
footer={null}
|
|
|
|
|
keyboard={false}
|
|
|
|
|
>
|
|
|
|
|
<div className="task-popup-content">
|
|
|
|
|
<p className="task-popup-text-center font-16 pb20">直播链接失效</p >
|
|
|
|
|
</div>
|
|
|
|
|
<div className="task-popup-submit clearfix edu-txt-center">
|
|
|
|
|
<a className="task-btn task-btn-orange mr51" onClick={this.onDialogOkBtnClick}>知道了</a >
|
|
|
|
|
</div>
|
|
|
|
|
</Modal>
|
|
|
|
|
{
|
|
|
|
|
visible ?
|
|
|
|
|
<style>{
|
|
|
|
|
`
|
|
|
|
|
body{
|
|
|
|
|
width: calc(100% - 7px)!important;
|
|
|
|
|
overflow: hidden!important;
|
|
|
|
|
}
|
|
|
|
|
.-task-sidebar{
|
|
|
|
|
right:44px!important
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
<div className="lineMiddle livesMain">
|
|
|
|
|
<span className="lineMiddle">
|
|
|
|
|
<span className="font-18 task-hide" style={{maxWidth:"759px"}}>{item.course_name}</span>
|
|
|
|
@ -44,11 +92,20 @@ class LiveItem extends Component{
|
|
|
|
|
<p><span className="task-hide-2 break_word">{item.description}</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
(item.on_status && item.url)?
|
|
|
|
|
<a className="btns going" target="_blank" href={`${item.url}`}>进入</a>
|
|
|
|
|
item.on_status ?
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{
|
|
|
|
|
item.url ?
|
|
|
|
|
<a className="btns going" target="_blank" href={`${item.url}`}>进入</a>
|
|
|
|
|
:
|
|
|
|
|
<a className="btns going" onClick={this.alertInfo}>进入</a>
|
|
|
|
|
}
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
:
|
|
|
|
|
<span className="btns ect">进入</span>
|
|
|
|
|
}
|
|
|
|
|
<a className="btns going" onClick={this.alertInfo}>进入</a>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<p className="lineMiddle livesMain mt15 font-12">
|
|
|
|
|
<span className="lineMiddle color-grey-9">
|
|
|
|
|