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

dev_unstable
杨树明 6 years ago
commit 9982a5f526

@ -258,7 +258,7 @@ module ApplicationHelper
end
def download_url attachment
attachment_path(attachment).gsub("/api","")
attachment_path(attachment)
end
# 耗时:天、小时、分、秒

@ -1,3 +1,9 @@
json.partial! 'attachments/attachment_small', attachment: @file
# json.partial! 'attachments/attachment_small', attachment: @file
json.id @file.id
json.title @file.title
json.filesize number_to_human_size(@file.filesize)
json.url download_url(@file).gsub("/api","")
json.created_on @file.created_on
json.is_pdf @file.is_pdf?
json.partial! "attachment_histories/list", attachment_histories: @attachment_histories

@ -42,7 +42,7 @@ class Fileslistitem extends Component{
//预览pdf
axios({
method:'get',
url:"http:"+window.location.host+result.data.url,
url:result.data.url,
responseType: 'arraybuffer',
}).then((result)=>{
var binaryData = [];
@ -53,7 +53,7 @@ class Fileslistitem extends Component{
}else{
let link = document.createElement('a');
document.body.appendChild(link);
link.href = result.data.url;
link.href = "/api"+result.data.url;
link.download = result.data.title;
//兼容火狐浏览器
let evt = document.createEvent("MouseEvents");

@ -45,7 +45,7 @@ class Showoldfiles extends Component{
showfiless=(url)=>{
axios({
method:'get',
url:"http:"+window.location.host+url,
url:url,
responseType: 'arraybuffer',
}).then((result)=>{
var binaryData = [];
@ -188,7 +188,7 @@ class Showoldfiles extends Component{
<li className="fl fontlefts">
{allfiles.is_pdf===false?
<a className={"isabox"} href={allfiles.url} >{allfiles.title}</a>:
<a className={"isabox"} href={"/api"+allfiles.url} >{allfiles.title}</a>:
<a className={"isabox"} onClick={()=>this.showfiless(allfiles.url)} >{allfiles.title}</a>
}
<span className={"newcolor-orange fl"}>当前版本</span>
@ -208,7 +208,7 @@ class Showoldfiles extends Component{
<li className="fl fontlefts">
{item.is_pdf===false?
<a className={"isabox"} href={item.url}>{item.title}</a>:
<a className={"isabox"} href={"/api"+item.url}>{item.title}</a>:
<a className={"isabox"} onClick={()=>this.showfiless(item.url)} >{item.title}</a>
}
</li>

Loading…
Cancel
Save