diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js
index 014364df8..0fb31d43f 100644
--- a/public/react/src/modules/courses/Video/VideoIndex.js
+++ b/public/react/src/modules/courses/Video/VideoIndex.js
@@ -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 ?
this.uploadVideo(false)}>取消
:
- this.uploadVideo(true)}>上传视频
+ 上传视频
}