dev_video
cxt 5 years ago
commit cd18113d39

@ -52,7 +52,7 @@ class UsersController < ApplicationController
def attachment_show def attachment_show
file_name = params[:file_name] file_name = params[:file_name]
path = params[:path] path = params[:path] || edu_setting('attachment_folder')
send_file "#{path}/#{file_name}", :filename => "#{file_name}", send_file "#{path}/#{file_name}", :filename => "#{file_name}",
:type => 'game', :type => 'game',
:disposition => 'attachment' #inline can open in browser :disposition => 'attachment' #inline can open in browser

@ -152,7 +152,7 @@ module ShixunsHelper
challenge_program_name = [] challenge_program_name = []
shixun.challenges.map(&:exec_path).each do |exec_path| shixun.challenges.map(&:exec_path).each do |exec_path|
challenge_program_name << "\"#{exec_path}\"" challenge_program_name << "\"#{exec_path}\""
if shixun.main_mirror_name == "Java" if shixun.main_mirror_name == "Java" || shixun.main_mirror_name == "Openjdk10/VNC"
if exec_path.nil? || exec_path.split("src/")[1].nil? if exec_path.nil? || exec_path.split("src/")[1].nil?
source = "\"\"" source = "\"\""
else else

@ -10,3 +10,4 @@ json.created_on attachment.created_on
json.is_pdf attachment.is_history_pdf? json.is_pdf attachment.is_history_pdf?
json.url attachment.is_history_pdf? ? attachment_path(attachment, type: 'history',disposition:"inline") : attachment_path(attachment, type: 'history') json.url attachment.is_history_pdf? ? attachment_path(attachment, type: 'history',disposition:"inline") : attachment_path(attachment, type: 'history')
json.attachment_id attachment.attachment_id json.attachment_id attachment.attachment_id
json.content_type attachment.content_type

@ -15,4 +15,4 @@ json.created_on attachment.created_on
json.content_type attachment.content_type json.content_type attachment.content_type
json.is_pdf attachment.is_pdf? json.is_pdf attachment.is_pdf?
json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment) json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)
json.play_url absolute_path(local_path(attachment)) json.play_url attachment_show_users_path(file_name: local_path(attachment))

@ -4,3 +4,4 @@ json.filesize number_to_human_size(attachment.filesize)
json.is_pdf attachment.is_pdf? json.is_pdf attachment.is_pdf?
json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment) json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)
json.created_on attachment.created_on json.created_on attachment.created_on
json.content_type attachment.content_type

@ -1,102 +1,152 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { WordsBtn } from 'educoder'; import { WordsBtn,ActionBtn,getUrl } from 'educoder';
import {Tooltip,message} from 'antd'; import {Tooltip,message,Input, Button} from 'antd';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {getImageUrl} from 'educoder';
import axios from 'axios' import axios from 'axios'
import {getUrl} from 'educoder'; import {} from 'educoder';
import moment from 'moment' import moment from 'moment'
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import Showoldfiles from "../coursesPublic/Showoldfiles"; import Showoldfiles from "../coursesPublic/Showoldfiles";
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import HeadlessModal from '../../user/usersInfo/common/HeadlessModal'
import ClipboardJS from 'clipboard'
import '../../user/usersInfo/video/InfosVideo.css'
let _clipboard = null;
let getUrls=getUrl();
class Fileslistitem extends Component{ class Fileslistitem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state = { this.state = {
videoModalObj:false,
} file_url:"",
} }
}
settingList=()=>{ setVisible=(bool)=>{
let {discussMessage}=this.props this.setState({
videoModalObj:bool
this.setState({ })
discussMessageid:discussMessage.id }
})
this.props.Settingtypes(discussMessage.id) settingList=()=>{
} let {discussMessage}=this.props
showfiles=(list)=>{ this.setState({
if(this.props.checkIfLogin()===false){ discussMessageid:discussMessage.id
this.props.showLoginDialog() })
return this.props.Settingtypes(discussMessage.id)
} }
// if(this.props.checkIfProfileCompleted()===false){
// this.setState({ showfiles=(list)=>{
// AccountProfiletype:true // console.log("showfiles");
// }) // console.log(list);
// return
// } if(this.props.checkIfLogin()===false){
// if(this.props.checkIfProfessionalCertification()===false){ this.props.showLoginDialog()
// this.props.showProfileCompleteDialog() return
// return }
// } // if(this.props.checkIfProfileCompleted()===false){
// this.setState({
if(list.is_history_file===false){ // AccountProfiletype:true
// this.props.DownloadFileA(list.title,list.url) // })
//window.location.href=list.url; // return
window.open(list.url, '_blank'); // }
// if(this.props.checkIfProfessionalCertification()===false){
// this.props.showProfileCompleteDialog()
// return
// }
if(list.is_history_file===false){
// this.props.DownloadFileA(list.title,list.url)
//window.location.href=list.url;
if(list.content_type){
if(list.content_type==="video/mp4"){
this.setState({
videoModalObj:true,
file_url:getUrls+list.url+'?file_name='+list.title,
})
return
}else{
window.open(list.url, '_blank');
}
}else{ }else{
let {discussMessage,coursesId}=this.props window.open(list.url, '_blank');
let file_id=discussMessage.id }
let url="/files/"+file_id+"/histories.json" }else{
axios.get(url,{ let {discussMessage,coursesId}=this.props
params:{ let file_id=discussMessage.id
course_id:coursesId let url="/files/"+file_id+"/histories.json"
}, axios.get(url,{
}).then((result)=>{ params:{
course_id:coursesId
if(result.data.attachment_histories.length===0){ },
// if(result.data.is_pdf===true){ }).then((result)=>{
// this.props.ShowOnlinePdf(result.data.url)
// //预览pdf if(result.data.attachment_histories.length===0){
// }else{ // if(result.data.is_pdf===true){
// // this.props.ShowOnlinePdf(result.data.url)
// } // //预览pdf
// this.props.DownloadFileA(result.data.title,result.data.url) // }else{
window.open(list.url, '_blank'); //
// }
// this.props.DownloadFileA(result.data.title,result.data.url)
if(list.content_type){
if(list.content_type==="video/mp4"){
this.setState({
videoModalObj:true,
file_url:getUrls+list.url+'?file_name='+list.title,
})
return
}else{
window.open(list.url, '_blank');
}
}else{ }else{
this.setState({ window.open(list.url, '_blank');
Showoldfiles:true,
allfiles:result.data
})
} }
}).catch((error)=>{ }else{
console.log(error) this.setState({
}) Showoldfiles:true,
} allfiles:result.data
})
}
}
closaoldfilesprops=()=>{ }).catch((error)=>{
this.setState({ console.log(error)
Showoldfiles:false, })
}) }
}
onDelete = (id) => { }
closaoldfilesprops=()=>{
this.setState({
Showoldfiles:false,
})
}
Clicktobroadcastthevideo=(bool,url)=>{
this.setState({ this.setState({
Modalstype:true, videoModalObj:bool,
Modalstopval:"是否确认删除?", file_url:getUrls+url,
ModalCancel:this.cancelmodel, })
ModalSave:()=>this.savedelete(id), }
})
}
onDelete = (id) => {
this.setState({
Modalstype:true,
Modalstopval:"是否确认删除?",
ModalCancel:this.cancelmodel,
ModalSave:()=>this.savedelete(id),
})
}
cancelmodel=()=>{ cancelmodel=()=>{
@ -111,6 +161,17 @@ class Fileslistitem extends Component{
} }
copyurls =()=>{
//复制网络链接
setTimeout(() => {
if (!_clipboard) {
_clipboard = new ClipboardJS('.copybtn');
_clipboard.on('success', (e) => {
this.props.showNotification("复制成功");
});
}
}, 200)
}
savedelete=(id)=>{ savedelete=(id)=>{
this.setState({ this.setState({
@ -145,37 +206,61 @@ class Fileslistitem extends Component{
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
} }
eventStop = (event) =>{ eventStop = (event) =>{
event.stopPropagation() event.stopPropagation()
} }
render(){ render(){
const {videoModalObj,file_url}=this.state
const { checkBox,
discussMessage,index
} = this.props;
return(
<div className="graduateTopicList boardsList">
{
videoModalObj&&videoModalObj===true?
<HeadlessModal
visible={videoModalObj}
setVisible={(bool)=>this.setVisible(bool)}
className="showVideoModal"
width={800 - 1}
>
<video
autoplay="true"
src={file_url} controls="true" controlslist="nodownload">
您的浏览器不支持 video 标签
</video>
<div className="df copyLine">
<Input value={file_url}
className="dark"
></Input>
<ActionBtn className="copybtn" data-clipboard-text={file_url} onClick={() =>this.copyurls()}>复制视频地址</ActionBtn>
</div>
</HeadlessModal>
:""
}
const { checkBox, {/*提示*/}
discussMessage,index {this.state.Modalstype&&this.state.Modalstype===true?<Modals
} = this.props; modalsType={this.state.Modalstype}
modalsTopval={this.state.Modalstopval}
return( modalCancel={this.state.ModalCancel}
<div className="graduateTopicList boardsList"> modalSave={this.state.ModalSave}
modalsBottomval={this.state.ModalsBottomval}
{/*提示*/} loadtype={this.state.Loadtype}
{this.state.Modalstype&&this.state.Modalstype===true?<Modals />:""}
modalsType={this.state.Modalstype} <Showoldfiles
modalsTopval={this.state.Modalstopval} {...this.props}
modalCancel={this.state.ModalCancel} visible={this.state.Showoldfiles}
modalSave={this.state.ModalSave} allfiles={this.state.allfiles}
modalsBottomval={this.state.ModalsBottomval} Clicktobroadcastthevideo={(bool,urls)=>this.Clicktobroadcastthevideo(bool,urls)}
loadtype={this.state.Loadtype} closaoldfilesprops={this.closaoldfilesprops}
/>:""} />
<Showoldfiles <style>{`
{...this.props}
visible={this.state.Showoldfiles}
allfiles={this.state.allfiles}
closaoldfilesprops={this.closaoldfilesprops}
/>
<style>{`
.graduateTopicList .ant-checkbox-input { .graduateTopicList .ant-checkbox-input {
margin-right: 15px; margin-right: 15px;
} }
@ -185,21 +270,21 @@ class Fileslistitem extends Component{
`}</style> `}</style>
<style>{` <style>{`
.boardsList .panel-list-img { .boardsList .panel-list-img {
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
`}</style> `}</style>
{/*<a href={"/users/"+this.props.user.login} alt="用户"*/} {/*<a href={"/users/"+this.props.user.login} alt="用户"*/}
{/*style={{"width": "50px", "height": "50px", "display": "block", margin: "0 10px"}}>*/} {/*style={{"width": "50px", "height": "50px", "display": "block", margin: "0 10px"}}>*/}
{/*<img*/} {/*<img*/}
{/*alt="1?1529221779" className="panel-list-img mr15" height="50"*/} {/*alt="1?1529221779" className="panel-list-img mr15" height="50"*/}
{/*src={getImageUrl("images/"+discussMessage.author.image_url)} width="50"*/} {/*src={getImageUrl("images/"+discussMessage.author.image_url)} width="50"*/}
{/*></img>*/} {/*></img>*/}
{/*</a>*/} {/*</a>*/}
<style>{` <style>{`
.boardsList .contentSection{ .boardsList .contentSection{
margin-left:0px; margin-left:0px;
} }
@ -213,55 +298,55 @@ class Fileslistitem extends Component{
margin-top:2px; margin-top:2px;
} }
`}</style> `}</style>
<div className="clearfix ds pr contentSection" style={{cursor : this.props.isAdmin ? "pointer" : "default"}} onClick={() => window.$(`.sourceitem${index} input`).click() }> <div className="clearfix ds pr contentSection" style={{cursor : this.props.isAdmin ? "pointer" : "default"}} onClick={() => window.$(`.sourceitem${index} input`).click() }>
<h6 onClick={(event)=>this.eventStop(event)}> <h6 onClick={(event)=>this.eventStop(event)}>
<span className={`sourceitem${index} fl mr12 mt3`}> <span className={`sourceitem${index} fl mr12 mt3`}>
{checkBox} {checkBox}
</span> </span>
{ {
this.props.isAdmin ? <a this.props.isAdmin ? <a
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"} // href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
onClick={()=>this.showfiles(discussMessage)} onClick={()=>this.showfiles(discussMessage)}
title={discussMessage.title} title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> : "" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> : ""
} }
{ {
this.props.isStudent? <a this.props.isStudent? <a
onClick={()=>this.showfiles(discussMessage)} onClick={()=>this.showfiles(discussMessage)}
title={discussMessage.title} title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> :"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a> :""
} }
{ {
this.props.isNotMember===true? this.props.isNotMember===true?
discussMessage.is_lock === true ? discussMessage.is_lock === true ?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.title}</span> <span className="fl mt3 font-16 font-bd color-dark maxwidth580 pointer" title={"私有属性,非课堂成员不能访问"}>{discussMessage.title}</span>
:<a :<a
onClick={()=>this.showfiles(discussMessage)} onClick={()=>this.showfiles(discussMessage)}
title={discussMessage.title} title={discussMessage.title}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a>:"" className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}</a>:""
} }
{ {
discussMessage.is_lock === true ? discussMessage.is_lock === true ?
<Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom"> <Tooltip title={"私有属性,非课堂成员不能访问"} placement="bottom">
<i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i> <i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl mt4"></i>
</Tooltip> </Tooltip>
:"" :""
} }
{discussMessage.is_publish===false?<CoursesListType typelist={["未发布"]} typesylename={""}/>:""} {discussMessage.is_publish===false?<CoursesListType typelist={["未发布"]} typesylename={""}/>:""}
{this.props.isAdmin? {this.props.isAdmin?
<span className={"fr mt2"} onClick={(event)=>this.eventStop(event)}> <span className={"fr mt2"} onClick={(event)=>this.eventStop(event)}>
<WordsBtn style="blue" className="colorblue font-16 ml20 fr"> <WordsBtn style="blue" className="colorblue font-16 ml20 fr">
<a className="btn colorblue fontweight400" <a className="btn colorblue fontweight400"
onClick={()=>this.settingList()}>设置</a> onClick={()=>this.settingList()}>设置</a>
</WordsBtn> </WordsBtn>
</span>:""} </span>:""}
{this.props.isStudent===true&&this.props.current_user.login===discussMessage.author.login? {this.props.isStudent===true&&this.props.current_user.login===discussMessage.author.login?
<span className={"fr mt2"} onClick={(event)=>this.eventStop(event)}> <span className={"fr mt2"} onClick={(event)=>this.eventStop(event)}>
<WordsBtn style="blue" className="colorblue font-16 ml20 fr"> <WordsBtn style="blue" className="colorblue font-16 ml20 fr">
<a className="btn colorblue fontweight400" <a className="btn colorblue fontweight400"
@ -274,24 +359,24 @@ class Fileslistitem extends Component{
</WordsBtn> </WordsBtn>
</span>:""} </span>:""}
</h6> </h6>
<style> <style>
{ {
` `
.sttingbox{ .sttingbox{
position: absolute; position: absolute;
right: 0px; right: 0px;
top: 20px; top: 20px;
} }
` `
} }
</style> </style>
<style> <style>
{ {
` `
.lightgreybox{ .lightgreybox{
min-width: 260px; min-width: 260px;
} }
@ -299,47 +384,47 @@ class Fileslistitem extends Component{
margin-top: -2px; margin-top: -2px;
} }
` `
} }
</style> </style>
{/*资源分班*/} {/*资源分班*/}
{/*{discussMessage.course_groups.length===0?"":*/} {/*{discussMessage.course_groups.length===0?"":*/}
{/*<p className="color-grey panel-lightgrey mt8 fl lightgreybox ml30" style={{width:'100%'}}>*/} {/*<p className="color-grey panel-lightgrey mt8 fl lightgreybox ml30" style={{width:'100%'}}>*/}
{/*{discussMessage.course_groups.map((item,key)=>{*/} {/*{discussMessage.course_groups.map((item,key)=>{*/}
{/*return(*/} {/*return(*/}
{/*<div className="mr50">*/} {/*<div className="mr50">*/}
{/*<span className="mr15 color-dark">{item.course_group_name}</span>*/} {/*<span className="mr15 color-dark">{item.course_group_name}</span>*/}
{/*<span className="mr15 color-grey9 ">将发布于 { moment(item.course_group_publish_time).format('YYYY-MM-DD HH:mm')}</span>*/} {/*<span className="mr15 color-grey9 ">将发布于 { moment(item.course_group_publish_time).format('YYYY-MM-DD HH:mm')}</span>*/}
{/*</div>*/} {/*</div>*/}
{/*)*/} {/*)*/}
{/*})}*/} {/*})}*/}
{/*</p>}*/} {/*</p>}*/}
<p className={this.props.isAdmin===true?"color-grey panel-lightgrey mt8 fl ml30":"color-grey panel-lightgrey mt8 fl ml13"} style={{width:'100%'}}> <p className={this.props.isAdmin===true?"color-grey panel-lightgrey mt8 fl ml30":"color-grey panel-lightgrey mt8 fl ml13"} style={{width:'100%'}}>
<span className="mr50"> <span className="mr50">
<span className="mr15 color-dark">{discussMessage.author.name}</span> <span className="mr15 color-dark">{discussMessage.author.name}</span>
<span className="mr15 color-grey9">大小 {discussMessage.filesize}</span> <span className="mr15 color-grey9">大小 {discussMessage.filesize}</span>
<span className="mr15 color-grey9">下载 {discussMessage.downloads_count}</span> <span className="mr15 color-grey9">下载 {discussMessage.downloads_count}</span>
{/*<span className="mr15 color-grey9">引用 {discussMessage.quotes}</span>*/} {/*<span className="mr15 color-grey9">引用 {discussMessage.quotes}</span>*/}
<span className="mr15 color-grey-c"> <span className="mr15 color-grey-c">
{/*{moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm:ss')}*/} {/*{moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm:ss')}*/}
{/*{moment(discussMessage.publish_time).fromNow()}*/} {/*{moment(discussMessage.publish_time).fromNow()}*/}
{ discussMessage.publish_time===null?"": { discussMessage.publish_time===null?"":
discussMessage.is_publish===true?"":"发布于"} discussMessage.is_publish===true?"":"发布于"}
{ discussMessage.publish_time===null?"":discussMessage.is_publish===true?moment(discussMessage.publish_time).fromNow():moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm')} { discussMessage.publish_time===null?"":discussMessage.is_publish===true?moment(discussMessage.publish_time).fromNow():moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm')}
</span> </span>
</span> </span>
{discussMessage&&discussMessage.category_name===null?"":this.props.child===false?<div className="color-grey9 task-hide fr mr30" title={discussMessage&&discussMessage.category_name} {discussMessage&&discussMessage.category_name===null?"":this.props.child===false?<div className="color-grey9 task-hide fr mr30" title={discussMessage&&discussMessage.category_name}
style={{"max-width":"268px"}}>所属目录{discussMessage&&discussMessage.category_name} style={{"max-width":"268px"}}>所属目录{discussMessage&&discussMessage.category_name}
</div>:""} </div>:""}
</p> </p>
<p className={this.props.isAdmin===true?"color-grey panel-lightgrey mt8 fl ml30":"color-grey panel-lightgrey mt8 fl ml13"} style={{width:'94%'}}> <p className={this.props.isAdmin===true?"color-grey panel-lightgrey mt8 fl ml30":"color-grey panel-lightgrey mt8 fl ml13"} style={{width:'94%'}}>
<style> <style>
{ {
` `
.isspans{ .isspans{
text-align: left; text-align: left;
white-space: pre-wrap; white-space: pre-wrap;
@ -347,22 +432,23 @@ class Fileslistitem extends Component{
overflow-wrap: break-word; overflow-wrap: break-word;
} }
` `
} }
</style> </style>
<span className="color-dark isspans">资源描述 :{discussMessage.description===null?"暂无描述":discussMessage.description}</span> <span className="color-dark isspans">资源描述 :{discussMessage.description===null?"暂无描述":discussMessage.description}</span>
{/*<span className="mr50">*/} {/*<span className="mr50">*/}
{/*/!*<span className="mr15 color-dark"></span>*!/*/} {/*/!*<span className="mr15 color-dark"></span>*!/*/}
{/*<span className="mr15 color-dark">*/} {/*<span className="mr15 color-dark">*/}
{/*</span>*/} {/*</span>*/}
{/*/!*{this.props.isAdmin ?<span><i className="iconfont icon-bianjidaibeijing font-22 color-green" onClick={()=>this.settingList()}></i></span>:""}*!/*/} {/*/!*{this.props.isAdmin ?<span><i className="iconfont icon-bianjidaibeijing font-22 color-green" onClick={()=>this.settingList()}></i></span>:""}*!/*/}
{/*</span>*/} {/*</span>*/}
</p> </p>
</div> </div>
</div> </div>
) )
} }
} }
export default Fileslistitem; export default Fileslistitem;

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

Loading…
Cancel
Save