From 833562f9ba8dade24ff25357b53a22186581cf76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 21:51:50 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Video/VideoIndex.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index fe52b17dc..f52f54859 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -243,10 +243,9 @@ class VideoIndex extends Component{ } render(){ const { videos , upload , videoData , type , liveData , lives , page , liveVisible , isSpining , liveId , otherLinkVisible,statistics } = this.state; - const { is_teacher } = this.props.user; const { coursesId , videoId }=this.props.match.params; - - const {course_identity} = this.props.coursedata; + let course_identity = this.props&&this.props.coursedata; + let is_teacher = this.props&&this.props.user; const flag = parseInt(course_identity) < 5; const newOperation = flag; const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification()); From f949451986d2bedd6e5ab9cff816b2de888032ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 22:09:14 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Video/Video.js | 14 ++++++++++---- .../react/src/modules/courses/Video/VideoIndex.js | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/Video/Video.js b/public/react/src/modules/courses/Video/Video.js index 181c082ae..56ad1a60c 100644 --- a/public/react/src/modules/courses/Video/Video.js +++ b/public/react/src/modules/courses/Video/Video.js @@ -191,15 +191,21 @@ class Video extends Component { const CourseId = this.props.match.params.coursesId; const VID = this.props.match.params.videoId; - const login = this.props.user && this.props.user.login; + let login = this.props && this.props.user&&this.props.user.login;; + const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url); - const { admin, is_teacher, business, user_id } = this.props.user; + // const { admin, is_teacher, business, user_id } = this.props && this.props.user; + let admin = this.props && this.props.user&&this.props.user.admin;; + let business = this.props && this.props.user&&this.props.user.business;; + let user_id = this.props && this.props.user&&this.props.user.user_id;; + + const { videos, upload, uploadVideo, videoData, changePage, pageSize, page } = this.props; const operation = admin || business; - const { course_identity } = this.props.coursedata; + const { course_identity } = this.props && this.props.coursedata; const flagMove = parseInt(course_identity) < 5; return ( @@ -245,7 +251,7 @@ class Video extends Component {
播放数据从2020-03-13 24:00开始统计
- +