From b844bbc3242f4a76753bc1506073a0834132d3f5 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Sat, 8 Feb 2020 15:15:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A7=86=E9=A2=91=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/Video/VideoIndex.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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)}>上传视频 + 上传视频 }