|
|
|
@ -29,7 +29,7 @@ class VideoIndex extends Component{
|
|
|
|
|
videos:undefined,
|
|
|
|
|
count:0,
|
|
|
|
|
page:1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
videoId:undefined,
|
|
|
|
|
videoVisible:false,
|
|
|
|
|
visible:false
|
|
|
|
@ -43,7 +43,7 @@ class VideoIndex extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
setVideoVisible=(flag)=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
videoVisible:flag
|
|
|
|
|
})
|
|
|
|
@ -57,7 +57,7 @@ class VideoIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// videoEl.current && videoEl.current.play()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (!_clipboard) {
|
|
|
|
|
_clipboard = new ClipboardJS('.copybtn');
|
|
|
|
@ -67,7 +67,7 @@ class VideoIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
}, 200)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 编辑成功后回调的方法
|
|
|
|
|
editSuccess=()=>{
|
|
|
|
@ -145,11 +145,10 @@ class VideoIndex extends Component{
|
|
|
|
|
render(){
|
|
|
|
|
const { count , videos , upload , visible , videoVisible , videoId } = this.state;
|
|
|
|
|
const CourseId=this.props.match.params.coursesId;
|
|
|
|
|
const { login }= this.props.user;
|
|
|
|
|
|
|
|
|
|
const login=this.props.user&&this.props.user.login;
|
|
|
|
|
const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<div className="edu-back-white">
|
|
|
|
@ -164,7 +163,7 @@ class VideoIndex extends Component{
|
|
|
|
|
width={800 - 1}
|
|
|
|
|
>
|
|
|
|
|
{
|
|
|
|
|
videoId &&
|
|
|
|
|
videoId &&
|
|
|
|
|
<video
|
|
|
|
|
autoplay="true"
|
|
|
|
|
ref={videoEl}
|
|
|
|
@ -172,7 +171,7 @@ class VideoIndex extends Component{
|
|
|
|
|
您的浏览器不支持 video 标签。
|
|
|
|
|
</video>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="df copyLine">
|
|
|
|
|
<Input value={_inputValue}
|
|
|
|
|
className="dark"
|
|
|
|
@ -184,7 +183,7 @@ class VideoIndex extends Component{
|
|
|
|
|
<span className="fl font-grey-9">共 <span className="color-orange">{count}</span> 个视频</span>
|
|
|
|
|
<li className="fr">
|
|
|
|
|
{
|
|
|
|
|
upload ?
|
|
|
|
|
upload ?
|
|
|
|
|
<WordsBtn style="grey" className="font-16" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn>
|
|
|
|
|
:
|
|
|
|
|
<WordsBtn style="blue" className="font-16" onClick={()=>this.uploadVideo(true)}>上传视频</WordsBtn>
|
|
|
|
@ -193,7 +192,7 @@ class VideoIndex extends Component{
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
upload ?
|
|
|
|
|
upload ?
|
|
|
|
|
<VideoUploadList {...this.props} flag={true} CourseId={CourseId} CourseUser={login} successFunc={this.uploadVideo}></VideoUploadList>
|
|
|
|
|
:
|
|
|
|
|
<React.Fragment>
|
|
|
|
@ -204,8 +203,8 @@ class VideoIndex extends Component{
|
|
|
|
|
{
|
|
|
|
|
videos.map((item,key)=>{
|
|
|
|
|
return(
|
|
|
|
|
// <VideoItem
|
|
|
|
|
// item={item}
|
|
|
|
|
// <VideoItem
|
|
|
|
|
// item={item}
|
|
|
|
|
// key={key}
|
|
|
|
|
// onEditVideo={this.onEditVideo}
|
|
|
|
|
// ></VideoItem>
|
|
|
|
@ -228,7 +227,7 @@ class VideoIndex extends Component{
|
|
|
|
|
<NoneData style={{width: '100%'}}></NoneData>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
count > PAGE_SIZE &&
|
|
|
|
|
<div className="mt30 mb50 edu-txt-center">
|
|
|
|
|
<Pagination showQuickJumper total={count} pageSize={PAGE_SIZE} onChange={this.changePage}></Pagination>
|
|
|
|
@ -236,7 +235,7 @@ class VideoIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|