dev_video
杨树明 5 years ago
parent 8b74813edc
commit 89a98a1f46

@ -61,7 +61,7 @@ clearAllCookie();
function setpostcookie() { function setpostcookie() {
const str =window.location.pathname; const str =window.location.pathname;
console.log(str.indexOf("/wxcode")) // console.log(str.indexOf("/wxcode"))
let newdomain=".educoder.net" let newdomain=".educoder.net"
if(str.indexOf("/wxcode") !== -1){ if(str.indexOf("/wxcode") !== -1){
console.log("123") console.log("123")

@ -507,6 +507,13 @@ class CoursesIndex extends Component{
(props) => (<Ordering {...this.props} {...props} {...this.state} />) (props) => (<Ordering {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
{/*视频列表*/}
<Route path="/courses/:coursesId/course_videos"
render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 资源列表页 */} {/* 资源列表页 */}
<Route path="/courses/:coursesId/file/:Id" exact <Route path="/courses/:coursesId/file/:Id" exact
render={ render={
@ -666,15 +673,15 @@ class CoursesIndex extends Component{
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 普通作业 */} {/* 普通作业 */}
<Route path="/courses/:coursesId/common_homeworks/:category_id" exact <Route path="/courses/:coursesId/common_homeworks/:category_id" exact
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }
></Route> ></Route>
{/* 分组作业 */} {/* 分组作业 */}
<Route path="/courses/:coursesId/group_homeworks/:category_id" exact <Route path="/courses/:coursesId/group_homeworks/:category_id" exact
render={ render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>) (props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common}/>)
} }

@ -29,7 +29,7 @@ class VideoIndex extends Component{
videos:undefined, videos:undefined,
count:0, count:0,
page:1, page:1,
videoId:undefined, videoId:undefined,
videoVisible:false, videoVisible:false,
visible:false visible:false
@ -43,7 +43,7 @@ class VideoIndex extends Component{
}) })
} }
setVideoVisible=(flag)=>{ setVideoVisible=(flag)=>{
this.setState({ this.setState({
videoVisible:flag videoVisible:flag
}) })
@ -57,7 +57,7 @@ class VideoIndex extends Component{
} }
} else { } else {
// videoEl.current && videoEl.current.play() // videoEl.current && videoEl.current.play()
setTimeout(() => { setTimeout(() => {
if (!_clipboard) { if (!_clipboard) {
_clipboard = new ClipboardJS('.copybtn'); _clipboard = new ClipboardJS('.copybtn');
@ -67,7 +67,7 @@ class VideoIndex extends Component{
} }
}, 200) }, 200)
} }
} }
// 编辑成功后回调的方法 // 编辑成功后回调的方法
editSuccess=()=>{ editSuccess=()=>{
@ -145,11 +145,10 @@ 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.user&&this.props.user.login;
const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url); const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url);
return( return(
<React.Fragment> <React.Fragment>
<div className="edu-back-white"> <div className="edu-back-white">
@ -164,7 +163,7 @@ class VideoIndex extends Component{
width={800 - 1} width={800 - 1}
> >
{ {
videoId && videoId &&
<video <video
autoplay="true" autoplay="true"
ref={videoEl} ref={videoEl}
@ -172,7 +171,7 @@ class VideoIndex extends Component{
您的浏览器不支持 video 标签 您的浏览器不支持 video 标签
</video> </video>
} }
<div className="df copyLine"> <div className="df copyLine">
<Input value={_inputValue} <Input value={_inputValue}
className="dark" className="dark"
@ -184,7 +183,7 @@ class VideoIndex extends Component{
<span className="fl font-grey-9"> <span className="color-orange">{count}</span> </span> <span className="fl font-grey-9"> <span className="color-orange">{count}</span> </span>
<li className="fr"> <li className="fr">
{ {
upload ? upload ?
<WordsBtn style="grey" className="font-16" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn> <WordsBtn style="grey" className="font-16" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn>
: :
<WordsBtn style="blue" className="font-16" onClick={()=>this.uploadVideo(true)}>上传视频</WordsBtn> <WordsBtn style="blue" className="font-16" onClick={()=>this.uploadVideo(true)}>上传视频</WordsBtn>
@ -193,7 +192,7 @@ class VideoIndex extends Component{
</p> </p>
</div> </div>
{ {
upload ? upload ?
<VideoUploadList {...this.props} flag={true} CourseId={CourseId} CourseUser={login} successFunc={this.uploadVideo}></VideoUploadList> <VideoUploadList {...this.props} flag={true} CourseId={CourseId} CourseUser={login} successFunc={this.uploadVideo}></VideoUploadList>
: :
<React.Fragment> <React.Fragment>
@ -204,8 +203,8 @@ class VideoIndex extends Component{
{ {
videos.map((item,key)=>{ videos.map((item,key)=>{
return( return(
// <VideoItem // <VideoItem
// item={item} // item={item}
// key={key} // key={key}
// onEditVideo={this.onEditVideo} // onEditVideo={this.onEditVideo}
// ></VideoItem> // ></VideoItem>
@ -228,7 +227,7 @@ class VideoIndex extends Component{
<NoneData style={{width: '100%'}}></NoneData> <NoneData style={{width: '100%'}}></NoneData>
} }
</div> </div>
{ {
count > PAGE_SIZE && count > PAGE_SIZE &&
<div className="mt30 mb50 edu-txt-center"> <div className="mt30 mb50 edu-txt-center">
<Pagination showQuickJumper total={count} pageSize={PAGE_SIZE} onChange={this.changePage}></Pagination> <Pagination showQuickJumper total={count} pageSize={PAGE_SIZE} onChange={this.changePage}></Pagination>
@ -236,7 +235,7 @@ class VideoIndex extends Component{
} }
</React.Fragment> </React.Fragment>
} }
</React.Fragment> </React.Fragment>
) )
} }

@ -92,14 +92,14 @@ const style = {
// <Dialog // <Dialog
// open={true} // open={true}
// onClose={this.handleGoldRewardDialogClose} // onClose={this.handleGoldRewardDialogClose}
// > // >
// <DialogTitle id="alert-dialog-title">{"奖励设置"}</DialogTitle> // <DialogTitle id="alert-dialog-title">{"奖励设置"}</DialogTitle>
// <DialogContent> // <DialogContent>
// <FormControl aria-describedby="name-error-text"> // <FormControl aria-describedby="name-error-text">
// <InputLabel htmlFor="goldReward">1请输入奖励的金币数量</InputLabel> // <InputLabel htmlFor="goldReward">1请输入奖励的金币数量</InputLabel>
// <Input id="goldReward" type="number" value={this.state.goldRewardInput} onChange={(e) => this.onGoldRewardInputChange(e)} /> // <Input id="goldReward" type="number" value={this.state.goldRewardInput} onChange={(e) => this.onGoldRewardInputChange(e)} />
// </FormControl> // </FormControl>
// </DialogContent> // </DialogContent>
// <DialogActions> // <DialogActions>
@ -109,7 +109,7 @@ const style = {
// } // }
// } // }
// const TestMaterialDesign = () => ( // const TestMaterialDesign = () => (
// <FlatButton label="Primary" primary={true} /> // <FlatButton label="Primary" primary={true} />
// ); // );
@ -122,7 +122,7 @@ const style = {
function PPHOC(WrappedComponent) { function PPHOC(WrappedComponent) {
return class PP extends React.Component { return class PP extends React.Component {
componentDidMount() { componentDidMount() {
console.log('componentDidMount1 componentDidMount1 ') // console.log('componentDidMount1 componentDidMount1 ')
} }
constructor(props) { constructor(props) {
super(props) super(props)

@ -76,7 +76,7 @@ class NewHeader extends Component {
goshowqqgtounp:false, goshowqqgtounp:false,
visiblemyss:false, visiblemyss:false,
} }
console.log("176") // console.log("176")
// console.log(props); // console.log(props);
// console.log("NewHeader1234567890"); // console.log("NewHeader1234567890");
// console.log(this.props); // console.log(this.props);
@ -89,7 +89,7 @@ class NewHeader extends Component {
} }
} }
componentDidMount() { componentDidMount() {
console.log("componentDidMount1"); // console.log("componentDidMount1");
this.getAppdata(); this.getAppdata();
window._header_componentHandler = this; window._header_componentHandler = this;

Loading…
Cancel
Save