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

dev_winse
SylorHuang 6 years ago
commit 4d9077c373

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

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

Loading…
Cancel
Save