diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js index d8d1c6ff3..014364df8 100644 --- a/public/react/src/modules/courses/Video/VideoIndex.js +++ b/public/react/src/modules/courses/Video/VideoIndex.js @@ -145,7 +145,8 @@ class VideoIndex extends Component{ render(){ const { count , videos , upload , visible , videoVisible , videoId } = this.state; const CourseId=this.props.match.params.coursesId; - const { login }= this.props.user; + const { login }= this.props.current_user; + console.log(this.props); const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url); diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 13c71daf7..678906f1a 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -869,7 +869,7 @@ class CoursesNew extends Component { > {getFieldDecorator("checkboxgroup", { initialValue: [ - "shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group", + "shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group","video" ], })( diff --git a/public/react/src/modules/user/usersInfo/video/VideoUpload.js b/public/react/src/modules/user/usersInfo/video/VideoUpload.js index 8efc308a7..cd4a1d36d 100644 --- a/public/react/src/modules/user/usersInfo/video/VideoUpload.js +++ b/public/react/src/modules/user/usersInfo/video/VideoUpload.js @@ -47,8 +47,8 @@ function VideoUpload (props) { ` } -
- 标题: +
+ 标题: {String(title.length)}/{MAX_LENGTH} } diff --git a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js index 74b3fcc7f..9e889ce30 100644 --- a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js +++ b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js @@ -50,7 +50,7 @@ function VideoUploadList (props) { } const _beforeunload = beforeunload // .bind(this, noUploads, state) - const username = props.match.params.username + const username = props.match.params.username || props.CourseUser const { showNotification, history } = props; const uploaderOptions = { @@ -237,15 +237,16 @@ function VideoUploadList (props) { }) }).then((response) => { // to success page - if (response.data.status == 0) { - dispatch({type: 'removeAll'}) - // setCouldRouteNav(true) - if(flag){ - successFunc(false) - }else{ - history.push(`/users/${username}/videos/success`) + if(response){ + if (response.data.status == 0) { + dispatch({type: 'removeAll'}) + if(flag){ + successFunc(false) + }else{ + history.push(`/users/${username}/videos/success`) + } + } } - } }).catch((error) => { console.log(error) })