|
|
@@ -6,13 +6,21 @@
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
|
|
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
|
|
<style>
|
|
|
- .img-margin{
|
|
|
- margin: 60pt 0 30pt 30pt;
|
|
|
+ .logo-margin{
|
|
|
+ margin: -60pt 0 0 30pt;
|
|
|
+ position: absolute;
|
|
|
+ }
|
|
|
+ .img-div{
|
|
|
+ width: 100%;
|
|
|
+ height: 233pt;
|
|
|
+ background-color: #AAB7CB ;
|
|
|
+ position: relative;
|
|
|
+ margin-top: 95px;
|
|
|
}
|
|
|
.title-div{
|
|
|
width:100%;
|
|
|
height:50px;
|
|
|
- margin:0 0 60px 30pt
|
|
|
+ margin:60px 0 60px 30pt
|
|
|
}
|
|
|
.title-font{
|
|
|
font-size: 40pt;
|
|
|
@@ -20,7 +28,7 @@
|
|
|
line-height: 50px;
|
|
|
vertical-align: auto;
|
|
|
text-align: left;
|
|
|
- color: #333333;
|
|
|
+ color: #FFFFFF;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
.margin-style{
|
|
|
@@ -45,14 +53,36 @@
|
|
|
color: #333333;
|
|
|
margin: 30px 20px 0 20px;
|
|
|
}
|
|
|
+ .content-div{
|
|
|
+ width: 85%;
|
|
|
+ height: 500pt;
|
|
|
+ min-height: 500pt;
|
|
|
+ background-color: #FFFFFF ;
|
|
|
+ opacity: 0.3;
|
|
|
+ margin: auto;
|
|
|
+ max-height: 500pt;
|
|
|
+ overflow: auto;
|
|
|
+ border: 1px solid #707070;
|
|
|
+ border-radius: 10pt;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
- <body>
|
|
|
- <img src="./img/bnBag.png" width="90%" height="20%" class="img-margin">
|
|
|
+ <body style="background-color: #003399 ">
|
|
|
+ <div class="img-div" id="backgroundDiv">
|
|
|
+ <img src="./img/logo.png" width="164pt" height="164pt" class="logo-margin">
|
|
|
+ </div>
|
|
|
<div class="title-div">
|
|
|
- <div class="title-font" >产品技术资料</div>
|
|
|
+ <img src="./img/datum.png" width="84pt" height="84pt" class="logo-margin" style="margin-top: -10px">
|
|
|
+ <div class="title-font" style="margin-left: 160px">产品技术资料</div>
|
|
|
+ </div>
|
|
|
+ <div class="content-div" style="margin-top: 30pt">
|
|
|
+ <div class="margin-style" id="dataContainer"></div>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 50pt;background-color: #FFFFFF;opacity: 0.3;height: 150pt;width: 100%">
|
|
|
+ <div style="margin: auto;font-size: 50pt;color: #e31d1d;height: 150pt;text-align: center;">
|
|
|
+ 品牌官网·点击跳转
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="margin-style" id="dataContainer"></div>
|
|
|
<script>
|
|
|
window.onload = async function(){
|
|
|
var loc=location.href;
|
|
|
@@ -83,46 +113,46 @@
|
|
|
var urlNew = strNew + '/yos/rest/index'
|
|
|
console.log(urlNew)
|
|
|
axios.post(urlNew, param)
|
|
|
- .then(function (response) {
|
|
|
- response.data.data.forEach((item,index) => {
|
|
|
- item.attinfos.forEach((data,rowindex) => {
|
|
|
- const div = document.createElement('div');
|
|
|
- div.className = 'div-border';
|
|
|
- let iconSrc = '';
|
|
|
- if (data.postfix == 'doc' || data.postfix == 'DOC' || data.postfix == 'docx' || data.postfix == 'DOCX') {
|
|
|
- iconSrc = './img/word.svg';
|
|
|
- } else if (data.postfix == 'pdf' || data.postfix == 'PDF') {
|
|
|
- iconSrc = './img/pdfType.svg';
|
|
|
- } else if (data.postfix == 'png' || data.postfix == 'PNG' || data.postfix == 'JPG' || data.postfix == 'jpg') {
|
|
|
- iconSrc = './img/pngType.svg';
|
|
|
- }else if (data.postfix == 'ppt' || data.postfix == 'PPT') {
|
|
|
- iconSrc = './img/ppt.svg';
|
|
|
- }else if (data.postfix == 'mp3' || data.postfix == 'MP3' || data.postfix == 'MP4' || data.postfix == 'mp4'
|
|
|
- || data.postfix == 'mov' || data.postfix == 'MOV') {
|
|
|
- iconSrc = './img/mov.svg';
|
|
|
- }else if (data.postfix == 'EXCEL' || data.postfix == 'excel' || data.postfix == 'xlsx' || data.postfix == 'XLSX') {
|
|
|
- iconSrc = './img/excel.svg';
|
|
|
- } else {
|
|
|
- iconSrc = './img/default.svg';
|
|
|
- }
|
|
|
- let remarks = data.document.split('.')[0]
|
|
|
- div.innerHTML = `
|
|
|
+ .then(function (response) {
|
|
|
+ response.data.data.forEach((item,index) => {
|
|
|
+ item.attinfos.forEach((data,rowindex) => {
|
|
|
+ const div = document.createElement('div');
|
|
|
+ div.className = 'div-border';
|
|
|
+ let iconSrc = '';
|
|
|
+ if (data.postfix == 'doc' || data.postfix == 'DOC' || data.postfix == 'docx' || data.postfix == 'DOCX') {
|
|
|
+ iconSrc = './img/word.svg';
|
|
|
+ } else if (data.postfix == 'pdf' || data.postfix == 'PDF') {
|
|
|
+ iconSrc = './img/pdfType.svg';
|
|
|
+ } else if (data.postfix == 'png' || data.postfix == 'PNG' || data.postfix == 'JPG' || data.postfix == 'jpg') {
|
|
|
+ iconSrc = './img/pngType.svg';
|
|
|
+ }else if (data.postfix == 'ppt' || data.postfix == 'PPT') {
|
|
|
+ iconSrc = './img/ppt.svg';
|
|
|
+ }else if (data.postfix == 'mp3' || data.postfix == 'MP3' || data.postfix == 'MP4' || data.postfix == 'mp4'
|
|
|
+ || data.postfix == 'mov' || data.postfix == 'MOV') {
|
|
|
+ iconSrc = './img/mov.svg';
|
|
|
+ }else if (data.postfix == 'EXCEL' || data.postfix == 'excel' || data.postfix == 'xlsx' || data.postfix == 'XLSX') {
|
|
|
+ iconSrc = './img/excel.svg';
|
|
|
+ } else {
|
|
|
+ iconSrc = './img/default.svg';
|
|
|
+ }
|
|
|
+ let remarks = data.document.split('.')[0]
|
|
|
+ div.innerHTML = `
|
|
|
<div class="div-border" >
|
|
|
<img src="${iconSrc}" class="img-style">
|
|
|
<div class="content-style">${data.document.split('.')[0]}</div>
|
|
|
</div>
|
|
|
`;
|
|
|
- dataContainer.appendChild(div);
|
|
|
- div.addEventListener('click', function() {
|
|
|
- console.log(data.url)
|
|
|
- downloadFile(data.url)
|
|
|
- });
|
|
|
+ dataContainer.appendChild(div);
|
|
|
+ div.addEventListener('click', function() {
|
|
|
+ console.log(data.url)
|
|
|
+ downloadFile(data.url)
|
|
|
+ });
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
- })
|
|
|
- .catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
}
|
|
|
function downloadFile(fileUrl, fileType){
|
|
|
const link = document.createElement('a');
|