课堂视频的bug

sso
caicai8 5 years ago
parent c2b80342b0
commit fe3ff7170b

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

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

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

Loading…
Cancel
Save