dev_video
caicai8 5 years ago
parent ba0368c21d
commit 11c34f9e1b

@ -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);

@ -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"
],
})(
<Checkbox.Group style={{ marginTop: "10px"}}>

@ -47,8 +47,8 @@ function VideoUpload (props) {
`
}
</style>
<div className="courseForm">
<span className="titleLabel">标题</span>
<div className="courseForm" style={{display:"flex",alignItems:"center"}}>
<span className="titleLabel mt15">标题</span>
<Input placeholder={`标题支持最多${MAX_LENGTH}个字符`} onInput={titleChange} maxLength={MAX_LENGTH} addonAfter={
<span className="color-grey-6 font-13">{String(title.length)}/{MAX_LENGTH}</span>
}

@ -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)
})

Loading…
Cancel
Save