|
|
@@ -2,57 +2,126 @@
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<title>商品资料页</title>
|
|
|
<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;
|
|
|
+ body {
|
|
|
+ margin: 0; /* 移除默认的边距 */
|
|
|
+ padding: 0; /* 移除默认的填充 */
|
|
|
+ background-color: #003399;
|
|
|
+ }
|
|
|
+ .logo-margin{
|
|
|
+ margin: -25pt 0 0 30pt;
|
|
|
+ position: absolute;
|
|
|
+ }
|
|
|
+ .img-div{
|
|
|
+ width: 100%;
|
|
|
+ height: 153pt;
|
|
|
+ background-color: #AAB7CB ;
|
|
|
+ background-image: url('./img/background.png');
|
|
|
+ background-size: cover; /* 可选:使背景图片覆盖整个div */
|
|
|
+ background-position: center; /* 可选:居中显示背景图片 */
|
|
|
+ background-repeat: no-repeat; /* 可选:防止背景图片重复 */
|
|
|
+ position: relative;
|
|
|
+ margin-top: 40px;
|
|
|
+ }
|
|
|
+ .logo-margin1{
|
|
|
+ margin: -25pt 0 0 30pt;
|
|
|
+ position: absolute;
|
|
|
}
|
|
|
.title-div{
|
|
|
- width:100%;
|
|
|
- height:50px;
|
|
|
- margin:0 0 60px 30pt
|
|
|
+ width: 100%;
|
|
|
+ height:25px;
|
|
|
+ margin:30px 0 10px 0;
|
|
|
}
|
|
|
.title-font{
|
|
|
- font-size: 40pt;
|
|
|
- height:50px;
|
|
|
- line-height: 50px;
|
|
|
+ font-size: 20pt;
|
|
|
+ height:20px;
|
|
|
+ line-height: 20px;
|
|
|
vertical-align: auto;
|
|
|
text-align: left;
|
|
|
- color: #333333;
|
|
|
+ color: #FFFFFF;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
.margin-style{
|
|
|
- margin:0 30pt 20pt 30pt
|
|
|
+ margin:30pt 0 30pt 0;
|
|
|
}
|
|
|
.div-border{
|
|
|
- width: 100%;
|
|
|
- height: 150px;
|
|
|
+ width: 88%;
|
|
|
+ height: 80px;
|
|
|
border-radius: 8pt;
|
|
|
- border: #cccccc solid 1px;
|
|
|
+ background-color: #FFFFFF;
|
|
|
display: flex;
|
|
|
justify-content: left;
|
|
|
- margin-bottom: 20px;
|
|
|
+ margin: 20px;
|
|
|
}
|
|
|
.img-style{
|
|
|
- width: 90px;
|
|
|
- height: 90px;
|
|
|
- margin: 28px 0 0 20px;
|
|
|
+ width: 50px;
|
|
|
+ height: 50px;
|
|
|
+ margin: 15px 0 0 20px;
|
|
|
}
|
|
|
.content-style{
|
|
|
- font-size: 30px;
|
|
|
+ font-size: 12px;
|
|
|
color: #333333;
|
|
|
- margin: 30px 20px 0 20px;
|
|
|
+ margin: 15px 20px 0 20px;
|
|
|
+ }
|
|
|
+ .content-div{
|
|
|
+ width: 85%;
|
|
|
+ min-height: 200pt;
|
|
|
+ background-color: rgba(255, 255, 255, 0.3);
|
|
|
+ margin: auto;
|
|
|
+ overflow: auto;
|
|
|
+ border: 1px solid #707070;
|
|
|
+ border-radius: 10pt;
|
|
|
+ }
|
|
|
+ .container {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center; /* 水平居中 */
|
|
|
+ align-items: center; /* 垂直居中 */
|
|
|
+ height: 50pt; /* 设置容器高度 */
|
|
|
+ background-color: rgba(255, 255, 255, 0.3);
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 50pt;
|
|
|
+ font-size: 20pt;
|
|
|
+ margin-bottom: 20pt;
|
|
|
+ }
|
|
|
+ .inner {
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ .container_div {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center; /* 水平居中 */
|
|
|
+ align-items: center; /* 垂直居中 */
|
|
|
+ height: 15pt;
|
|
|
+ width: 100%;
|
|
|
+ font-size: 10pt;
|
|
|
+ color: #FFFFFF;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <img src="./img/bnBag.png" width="90%" height="20%" class="img-margin">
|
|
|
+ <div class="img-div" id="backgroundDiv">
|
|
|
+ <img src="./img/logo.png" width="64pt" height="64pt" class="logo-margin">
|
|
|
+ </div>
|
|
|
<div class="title-div">
|
|
|
- <div class="title-font" >产品技术资料</div>
|
|
|
+ <img src="./img/datum.png" width="38pt" height="38pt" class="logo-margin1" style="margin-top: -10px">
|
|
|
+ <div class="title-font" style="margin-left: 90px">产品技术资料</div>
|
|
|
+ </div>
|
|
|
+ <div class="content-div" style="margin-top: 20pt">
|
|
|
+ <div id="dataContainer"></div>
|
|
|
+ </div>
|
|
|
+ <div class="container">
|
|
|
+ <div class="inner" onclick="window.location.href='http://www.ibpchina.com/';">
|
|
|
+ 品牌官网·点击跳转
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="margin-style" id="dataContainer"></div>
|
|
|
+
|
|
|
+ <div class="container_div">班尼戈</div>
|
|
|
+ <div class="container_div">水工业控制的可靠服务商</div>
|
|
|
+ <div class="container_div">客服电话:+86 0573-89053730</div>
|
|
|
+
|
|
|
<script>
|
|
|
window.onload = async function(){
|
|
|
var loc=location.href;
|
|
|
@@ -83,46 +152,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');
|