课堂视频的bug

sso
caicai8 5 years ago
parent c2b80342b0
commit fe3ff7170b

@ -55,13 +55,17 @@ class VideoIndex extends Component{
componentDidMount=()=>{
const { search } = this.props.location;
const { page } = this.state;
if(search && search === "?open=live"){
this.setState({
type:"live"
})
this.checkType("live",page);
}else{
if(search === "?open=new"){
this.setState({
upload:true
})
}
this.checkType("video",page);
}
}
@ -138,10 +142,13 @@ class VideoIndex extends Component{
}
uploadVideo=(upload)=>{
this.setState({
upload
upload,
isSpining:true
})
const { page } = this.state;
this.getList(page);
setTimeout(()=>{
this.getList(page);
},500)
}
toUpload =()=> {

@ -5,17 +5,16 @@ import axios from 'axios'
import okIcon from './images/ok_border.png'
function VideoProtocol (props) {
const theme = useContext(ThemeContext);
const username = props.match.params.username
const { history } = props;
const { search } = props.history.location;
const courseId = search && search.split("=")[1];
return (
<div className={`educontent videoProtocol`}>
<CBreadcrumb
className="mb26 mt16"
separator=" > "
items={[
{ to: `/users/${username}/videos/upload`, name: '视频上传'},
{ to: `${courseId?`/courses/${courseId}/course_videos?open=new`:`/users/${username}/videos/upload`}`, name: '视频上传'},
{ name: '内容上传协议'}
]}
></CBreadcrumb>

@ -258,9 +258,14 @@ function VideoUploadList (props) {
dispatch({type: 'updateTitle', title, index})
}
// login
const protocolLine = <div>上传视频即表示您已同意
<Link to={`/users/${username}/videos/protocol`} style={{color: theme.foreground_select}}>上传内容协议</Link></div>
const { flag } = props;
const { flag , CourseId } = props;
const urls =
flag ?
<Link to={`/users/${username}/videos/protocol?course=${CourseId}`} target="_blank" style={{color: theme.foreground_select}}>上传内容协议</Link>
:
<Link to={`/users/${username}/videos/protocol`} style={{color: theme.foreground_select}}>上传内容协议</Link>
const protocolLine = <div>上传视频即表示您已同意{urls}不得上传未经他人授权的作品</div>
return (
<div className={flag?"edu-back-white pb100 videoUploadList":"educontent videoUploadList"} style={{ marginBottom: `${flag?"0px":"200px"}` }}>
<Prompt

Loading…
Cancel
Save