|
|
@@ -54,7 +54,6 @@
|
|
|
</div>
|
|
|
<div class="margin-style" id="dataContainer"></div>
|
|
|
<script>
|
|
|
- let dataList = []
|
|
|
window.onload = async function(){
|
|
|
var loc=location.href;
|
|
|
var n1=loc.length;
|
|
|
@@ -93,18 +92,29 @@
|
|
|
iconSrc = './img/default.svg';
|
|
|
}
|
|
|
div.innerHTML = `
|
|
|
- <div class="div-border" >
|
|
|
- <img src="${iconSrc}" class="img-style">
|
|
|
- <div class="content-style">${item.remarks}</div>
|
|
|
- </div>
|
|
|
+ <div class="div-border" >
|
|
|
+ <img src="${iconSrc}" class="img-style">
|
|
|
+ <div class="content-style">${item.remarks}</div>
|
|
|
+ </div>
|
|
|
`;
|
|
|
dataContainer.appendChild(div);
|
|
|
+ div.addEventListener('click', function() {
|
|
|
+ console.log(item.attinfos[0].url)
|
|
|
+ downloadFile(item.attinfos[0].url)
|
|
|
+ });
|
|
|
})
|
|
|
})
|
|
|
.catch(function (error) {
|
|
|
console.log(error);
|
|
|
});
|
|
|
}
|
|
|
+ function downloadFile(fileUrl, fileType){
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.href = fileUrl
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ document.body.removeChild(link);
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|