dev_video
caicai8 5 years ago
parent c813b6fd44
commit 20b3a57e21

@ -10,7 +10,7 @@ class Live extends Component{
const { liveData , lives , successFunc , pageSize , changePage , page } = this.props; const { liveData , lives , successFunc , pageSize , changePage , page } = this.props;
return( return(
<div className="livePanel" style={{minHeight:`${lives && lives.length *165}px`}}> <div className="livePanel">
{ {
lives && lives.length > 0 ? lives && lives.length > 0 ?
<React.Fragment> <React.Fragment>

@ -44,7 +44,8 @@ class LiveItem extends Component{
} }
render(){ render(){
const { key, item , setLiveId } = this.props; const { key, item , setLiveId } = this.props;
// let flag = false;
// flag = item.on_status;
return( return(
<div className="liveItem" key={key}> <div className="liveItem" key={key}>
<div className="lineMiddle livesMain"> <div className="lineMiddle livesMain">
@ -55,7 +56,7 @@ class LiveItem extends Component{
</span> </span>
{ {
item.op_auth ? item.op_auth ?
<Switch checkedChildren="on" key={key} className="switchStyle" unCheckedChildren="off" defaultChecked={item.on_status} onChange={(flag,event)=>this.changeStatus(flag,event,item.id)}></Switch>:"" <Switch checkedChildren="on" key={key} className="switchStyle" unCheckedChildren="off" checked={item.on_status} onChange={(flag,event)=>this.changeStatus(flag,event,item.id)}></Switch>:""
} }
</div> </div>
<div className="lineMiddle mt15"> <div className="lineMiddle mt15">

@ -53,10 +53,6 @@ class VideoIndex extends Component{
} }
// 获取直播列表 // 获取直播列表
getLiveList=(page)=>{ getLiveList=(page)=>{
this.setState({
lives:undefined,
isSpining:true
})
const CourseId=this.props.match.params.coursesId; const CourseId=this.props.match.params.coursesId;
const url = `/courses/${CourseId}/live_links.json`; const url = `/courses/${CourseId}/live_links.json`;
axios.get(url,{ axios.get(url,{

Loading…
Cancel
Save