|
|
|
@ -12,6 +12,7 @@ import Videostatistics from '../videostatistics/Videostatistics';
|
|
|
|
|
import './video.css';
|
|
|
|
|
import '../css/Courses.css';
|
|
|
|
|
import '../publicNav/nav.css';
|
|
|
|
|
|
|
|
|
|
const PAGE_SIZE = 15;
|
|
|
|
|
const LIVE_PAGE_SIZE = 10;
|
|
|
|
|
const $ = window.$;
|
|
|
|
@ -20,6 +21,7 @@ function getRight(){
|
|
|
|
|
var right = parseInt($(".-task-sidebar").css("right"));
|
|
|
|
|
return right === 0 ? 0 : right;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class VideoIndex extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
@ -241,14 +243,16 @@ class VideoIndex extends Component{
|
|
|
|
|
statistics: bool
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {videos, upload, videoData, type, liveData, lives, page, liveVisible, isSpining, liveId, otherLinkVisible, statistics} = this.state;
|
|
|
|
|
const {coursesId, videoId} = this.props.match.params;
|
|
|
|
|
let course_identity = this.props&&this.props.coursedata;
|
|
|
|
|
let {course_identity} = this.props && this.props.coursedata;
|
|
|
|
|
let is_teacher = this.props && this.props.user && this.props.user.is_teacher;
|
|
|
|
|
const flag = parseInt(course_identity) < 5;
|
|
|
|
|
const newOperation = flag;
|
|
|
|
|
const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification());
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<VideoLink
|
|
|
|
@ -312,11 +316,14 @@ class VideoIndex extends Component{
|
|
|
|
|
><i className="iconfont icon-tongji1 mr5"></i>统计</WordsBtn>
|
|
|
|
|
{
|
|
|
|
|
videoId ?
|
|
|
|
|
<WordsBtn style="blue" onClick={()=>this.editDir(videoData && videoData.category_name,videoId)} className={"ml30 font-16"}>目录重命名</WordsBtn>
|
|
|
|
|
<WordsBtn style="blue"
|
|
|
|
|
onClick={() => this.editDir(videoData && videoData.category_name, videoId)}
|
|
|
|
|
className={"ml30 font-16"}>目录重命名</WordsBtn>
|
|
|
|
|
:
|
|
|
|
|
<WordsBtn style="blue" className="ml30 font-16" onClick={this.addDir}>新建目录</WordsBtn>
|
|
|
|
|
}
|
|
|
|
|
<WordsBtn style="blue" className="ml30 font-16" onClick={()=>this.setLinkeVisible(true)}>增加外链</WordsBtn>
|
|
|
|
|
<WordsBtn style="blue" className="ml30 font-16"
|
|
|
|
|
onClick={() => this.setLinkeVisible(true)}>增加外链</WordsBtn>
|
|
|
|
|
</span> : ""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
@ -324,11 +331,13 @@ class VideoIndex extends Component{
|
|
|
|
|
<span>
|
|
|
|
|
{
|
|
|
|
|
upload ?
|
|
|
|
|
<WordsBtn style="grey" className="font-16 ml30" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn>
|
|
|
|
|
<WordsBtn style="grey" className="font-16 ml30"
|
|
|
|
|
onClick={() => this.uploadVideo(false)}>取消</WordsBtn>
|
|
|
|
|
:
|
|
|
|
|
<WordsBtn style="blue" className="font-16 ml30" onClick={this.toUpload}>上传视频</WordsBtn>
|
|
|
|
|
}
|
|
|
|
|
</span>:""
|
|
|
|
|
</span>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
:
|
|
|
|
@ -378,4 +387,5 @@ class VideoIndex extends Component{
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default VideoIndex;
|
|
|
|
|