Merge branch 'dev_video' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_video

dev_video
caicai8 5 years ago
commit 6eb193159e

@ -57,6 +57,14 @@ class Users::VideosController < Users::BaseController
def current_video
@_current_video ||= observed_user.videos.find_by(id: params[:id])
if @_current_video.nil?
video = Video.find_by(id: params[:id])
if video.course_videos.present?
video
end
else
@_current_video
end
end
def search_params

@ -45,18 +45,11 @@ class Showoldfiles extends Component{
showfiless=(url)=>{
this.props.ShowOnlinePdf(url)
}
isaboxonClick=(item)=>{
this.props.Clicktobroadcastthevideo(true,item.url+'&file_name='+item.title);
}
isaboxonClicks=(item)=>{
this.props.Clicktobroadcastthevideo(true,item.url+'?file_name='+item.title);
}
render(){
let {visible,allfiles}=this.props;
return(
<div >
<div>
{/*提示*/}
<Modals
modalsType={this.state.Modalstype}
@ -75,9 +68,6 @@ class Showoldfiles extends Component{
width="600px"
destroyOnClose={true}
keyboard={false}
style={{
marginTop: '30px',
}}
>
<a id='closeIcon' onClick={this.cloasshanchudiao}><i className='iconfont icon-shanchudiao'></i></a>
<style>
@ -188,13 +178,11 @@ class Showoldfiles extends Component{
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={allfiles.id}>
<li className="fl fontlefts">
{
allfiles&&allfiles.content_type&&allfiles.content_type==="video/mp4"?
<a className={"isabox"} target="_blank" onClick={()=>this.isaboxonClicks(allfiles)}>{allfiles.title}</a>
:
<a className={"isabox"} href={allfiles.url} target="_blank" >{allfiles.title}</a>
}
<a className={"isabox"} href={allfiles.url} target="_blank" >{allfiles.title}</a>
{/*{allfiles.is_pdf===false?*/}
{/*<a className={"isabox"} href={allfiles.url} >{allfiles.title}</a>:*/}
{/*<a className={"isabox"} onClick={()=>this.showfiless(allfiles.url)} >{allfiles.title}</a>*/}
{/*}*/}
<span className={"newcolor-orange fl"}>当前版本</span>
</li>
@ -210,13 +198,7 @@ class Showoldfiles extends Component{
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" id={item.id} key={key}>
<li className="fl fontlefts">
{
item&&item.content_type&&item.content_type==="video/mp4"?
<a className={"isabox"} target="_blank" onClick={()=>this.isaboxonClick(item)}>{item.title}</a>
:
<a className={"isabox"} href={item.url} target="_blank" >{item.title}</a>
}
<a className={"isabox"} href={item.url} target="_blank" >{item.title}</a>
{/*{item.is_pdf===false?*/}
{/*<a className={"isabox"} href={item.url}>{item.title}</a>:*/}
{/*<a className={"isabox"} onClick={()=>this.showfiless(item.url)} >{item.title}</a>*/}
@ -242,4 +224,4 @@ class Showoldfiles extends Component{
)
}
}
export default Showoldfiles;
export default Showoldfiles;
Loading…
Cancel
Save