dev_video
caicai8 5 years ago
parent ba0368c21d
commit 11c34f9e1b

@ -145,7 +145,8 @@ class VideoIndex extends Component{
render(){ render(){
const { count , videos , upload , visible , videoVisible , videoId } = this.state; const { count , videos , upload , visible , videoVisible , videoId } = this.state;
const CourseId=this.props.match.params.coursesId; 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); const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url);

@ -869,7 +869,7 @@ class CoursesNew extends Component {
> >
{getFieldDecorator("checkboxgroup", { {getFieldDecorator("checkboxgroup", {
initialValue: [ 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"}}> <Checkbox.Group style={{ marginTop: "10px"}}>

@ -47,8 +47,8 @@ function VideoUpload (props) {
` `
} }
</style> </style>
<div className="courseForm"> <div className="courseForm" style={{display:"flex",alignItems:"center"}}>
<span className="titleLabel">标题</span> <span className="titleLabel mt15">标题</span>
<Input placeholder={`标题支持最多${MAX_LENGTH}个字符`} onInput={titleChange} maxLength={MAX_LENGTH} addonAfter={ <Input placeholder={`标题支持最多${MAX_LENGTH}个字符`} onInput={titleChange} maxLength={MAX_LENGTH} addonAfter={
<span className="color-grey-6 font-13">{String(title.length)}/{MAX_LENGTH}</span> <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 _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 { showNotification, history } = props;
const uploaderOptions = { const uploaderOptions = {
@ -237,15 +237,16 @@ function VideoUploadList (props) {
}) })
}).then((response) => { }).then((response) => {
// to success page // to success page
if (response.data.status == 0) { if(response){
dispatch({type: 'removeAll'}) if (response.data.status == 0) {
// setCouldRouteNav(true) dispatch({type: 'removeAll'})
if(flag){ if(flag){
successFunc(false) successFunc(false)
}else{ }else{
history.push(`/users/${username}/videos/success`) history.push(`/users/${username}/videos/success`)
}
}
} }
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })

Loading…
Cancel
Save