|
|
|
@ -142,12 +142,25 @@ class VideoIndex extends Component{
|
|
|
|
|
})
|
|
|
|
|
this.getList(page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toUpload =()=> {
|
|
|
|
|
const { admin , is_teacher} = this.props.user;
|
|
|
|
|
if (admin || (is_teacher && this.props.checkIfProfessionalCertification())) {
|
|
|
|
|
this.setState({
|
|
|
|
|
upload:true
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.props.showProfessionalCertificationDialog();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
const { count , videos , upload , visible , videoVisible , videoId } = this.state;
|
|
|
|
|
const CourseId=this.props.match.params.coursesId;
|
|
|
|
|
const { login }= this.props.current_user;
|
|
|
|
|
const { login }= this.props.user;
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
|
|
|
|
|
// const operation = (is_teacher && professional_certification) || admin;
|
|
|
|
|
|
|
|
|
|
const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -188,7 +201,7 @@ class VideoIndex extends Component{
|
|
|
|
|
upload ?
|
|
|
|
|
<WordsBtn style="grey" className="font-16" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn>
|
|
|
|
|
:
|
|
|
|
|
<WordsBtn style="blue" className="font-16" onClick={()=>this.uploadVideo(true)}>上传视频</WordsBtn>
|
|
|
|
|
<WordsBtn style="blue" className="font-16" onClick={this.toUpload}>上传视频</WordsBtn>
|
|
|
|
|
}
|
|
|
|
|
</li>
|
|
|
|
|
</p>
|
|
|
|
|