Przeglądaj źródła

资料库下载

zhengjinyi 4 lat temu
rodzic
commit
dfa202c9f1

+ 14 - 3
src/main/resources/static/css/document/details.css

@@ -43,16 +43,22 @@ li{list-style:none}
     .document-list .list-item .list-item-top .main .p span{margin-right: 5px;}
     .document-list .list-item .list-item-top .main .p .name{width:49%;float: left;margin-right:10px;font-weight: normal;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;display: -webkit-box;}
     .document-list .list-item .list-item-top .main .p .more{color: #E15616;cursor: pointer;}
+    .document-list .list-item .list-item-top .down{width: 72px;height: 30px;position: absolute;right: 24px;bottom: 24px;}
+    .document-list .list-item .list-item-top .down a{width: 72px;height: 30px;background: linear-gradient(90deg, #FF8B45, #E15616);border-radius: 5px;display: block;line-height: 30px;box-sizing: border-box;padding:0 12px;font-size: 14px;color: #FFFFFF;}
     .document-list .list-item .list-item-bot{width: 100%;min-height: 1185px;padding: 20px 0;border-top: 1px solid #F5F5F5;float: left;margin-bottom: 120px;}
     .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #999999;float: left;margin: 5px 0;}
     .document-list .list-item .list-item-bot .pdf-li .img{width: 18px;height: 20px;display: block;float: left;margin-top: 5px;}
     .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 10px;cursor: pointer;}
     .document-list .list-item .list-item-bot .pdf-li .name:hover{color: #E15616;}
     .document-list .list-item .list-item-bot .pdf-li .time{float: right;}
-
+    .downloadClass{width: 200px;height: 50px;background: #FF7A51;border-radius: 10px;line-height: 50px;position: fixed;top: 0;left: 0;right: 0;bottom: 0;margin: auto;}
     iframe{width: 1160px !important;height: 1185px !important;}
     .document-footer{width: 100%;height: 120px;background-color: #F0F0F0;box-sizing: border-box;padding: 30px 0;float: left;}
     .wrap{color: #999999;font-size: 14px;line-height: 30px;}
+    .document-download{width: 100%;height: 100%;background: rgba(51,51,51,0.6);position: fixed;top: 0;left: 0;z-index: 9999;}
+    .document-download .toest{width:320px;height: 80px;background: #FFFFFF;border-radius: 5px;position: absolute;left:24px;top: 20px;box-sizing: border-box;padding:15px 20px;}
+    .document-download .toest p{font-size: 16px;line-height:25px;text-align: justify;}
+    .document-download .toest:before{content: '';width:0px;height:0px;border-width:0px 20px 25px 20px; border-style:solid;border-color:  transparent transparent #FFF transparent;position: absolute;top: -20px;left:170px;}
 }
 
 /**
@@ -96,6 +102,9 @@ li{list-style:none}
     .document-list .list-item .list-item-top .main .p .name{ float: left; width: 48%;font-weight: normal;font-size: 3vw;line-height: 6.5vw;color: #666666;text-align: left;	white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 1;display: -webkit-box;}
     .document-list .list-item .list-item-top .main span{margin-right: 3vw;}
     .document-list .list-item .list-item-top .main .p .more{display: inline-block;float: right;margin-right: 0;color: #E15616;cursor: pointer;width: 15vw;height: 6.5vw;background-color: #FFF5F1;border-radius: 0.5vw;text-align: center;}
+    .document-list .list-item .list-item-top .down{width: 15vw;height: 6.5vw;position: absolute;right: 7.5vw;bottom: 12.5vw;}
+    .document-list .list-item .list-item-top .down a{width: 15vw;height: 6.5vw;background: linear-gradient(90deg, #FF8B45, #E15616);border-radius: 0.5vw;display: block;line-height: 6.5vw;box-sizing: border-box;padding:0 2vw;font-size: 3vw;color: #FFFFFF;}
+    .document-list .list-item .list-item-top .down a img{width: 3vw;height: 3vw;}
     .document-list .list-item .list-item-bot{width: 100%;min-height: 80vw;padding: 0;border-top: 1px solid #F5F5F5;float: left;box-sizing: border-box;}
     .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 10vw;font-size: 3vw;color: #999999;float: left;margin:1vw 0;}
     .document-list .list-item .list-item-bot .pdf-li .img{width: 7vw;height:8vw;display: block;float: left;margin-top: 0;}
@@ -107,6 +116,8 @@ li{list-style:none}
     .media{width: 100% !important;height: 1000vw !important;}
     iframe{width: 100% !important;height: 100% !important;}
     .pdfjs .pdfViewer{padding: 0 !important;}
-
-
+    .document-download{width: 100%;height: 100%;background: rgba(51,51,51,0.6);position: fixed;top: 0;left: 0;z-index: 9999;}
+    .document-download .toest{width:46vw;height: 13vw;background: #FFFFFF;border-radius: 1vw;position: absolute;right: 2.3vw;top: 2.9vw;box-sizing: border-box;padding:2vw;}
+    .document-download .toest p{font-size: 3vw;line-height: 4.5vw;text-align: justify;}
+    .document-download .toest:before{content: '';width:0px;height:0px;border-width:0px 2vw 3vw 2vw; border-style:solid;border-color:  transparent transparent #FFF transparent;position: absolute;top: -2.8vw;right: 3vw;}
 }

+ 14 - 4
src/main/resources/static/css/document/list.css

@@ -45,9 +45,16 @@ li{list-style:none}
     .document-list .list-item .list-item-bot .pdf-li .img{width: 18px;height: 20px;display: block;float: left;margin-top: 5px;}
     .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 10px;cursor: pointer;}
     .document-list .list-item .list-item-bot .pdf-li .name:hover{color: #E15616;}
+    .document-list .list-item .list-item-bot .pdf-li .down{float: left;margin-left: 16px;}
+    .document-list .list-item .list-item-bot .pdf-li .down a{width: 42px;height: 22px;background: #FFF5F1;border-radius: 4px;margin-top: 4px;font-size: 14px;line-height: 22px;color: #E15616;text-align: center;display: block;}
     .document-list .list-item .list-item-bot .pdf-li .time{float: right;}
     .document-footer{width: 100%;height: 120px;background-color: #F0F0F0;box-sizing: border-box;padding: 30px 0;float: left;}
     .wrap{color: #999999;font-size: 14px;line-height: 30px;}
+    .document-download{width: 100%;height: 100%;background: rgba(51,51,51,0.6);position: fixed;top: 0;left: 0;z-index: 9999;}
+    .document-download .toest{width:320px;height: 80px;background: #FFFFFF;border-radius: 5px;position: absolute;left:24px;top: 20px;box-sizing: border-box;padding:15px 20px;}
+    .document-download .toest p{font-size: 16px;line-height:25px;text-align: justify;}
+    .document-download .toest:before{content: '';width:0px;height:0px;border-width:0px 20px 25px 20px; border-style:solid;border-color:  transparent transparent #FFF transparent;position: absolute;top: -20px;left:170px;}
+
 }
 
 /**
@@ -90,14 +97,17 @@ li{list-style:none}
     .document-list .list-item .list-item-top .main p{width: 100%;font-weight: normal;font-size: 3vw;line-height: 6.5vw;color: #666666;text-align: left;	white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
     .document-list .list-item .list-item-top .main span{margin-left: 1vw;}
     .document-list .list-item .list-item-bot{width: 100%;height: auto;padding: 2vw 0;border-top: 1px solid #F5F5F5;float: left;}
-    .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 10vw;font-size: 3vw;color: #999999;float: left;margin:1vw 0;}
+    .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 10vw;font-size: 3vw;color: #999999;float: left;margin:1vw 0;position: relative;}
     .document-list .list-item .list-item-bot .pdf-li .img{width: 7vw;height:8vw;display: block;float: left;margin-top: 0.5vw;}
     .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 3vw;cursor: pointer;width: 65vw;line-height: 5vw;}
     .document-list .list-item .list-item-bot .pdf-li .name:hover{color: #E15616;}
+    .document-list .list-item .list-item-bot .pdf-li .down{width: 12.4vw;height: 5.8vw;position: absolute;right: 0;top: 1vw;}
+    .document-list .list-item .list-item-bot .pdf-li .down a{display:block;width: 12.4vw;height: 5.8vw;border-radius: 0.8vw;background: #FFF5F1;text-align: center;font-size: 3vw;color: #E15616;line-height: 5.8vw;}
     .document-list .list-item .list-item-bot .pdf-li .time{float: left;margin-left: 3vw;width: 56vw;line-height: 5vw;}
     .document-footer{width: 100%;height: auto;background-color: #F0F0F0;box-sizing: border-box;padding: 30px 0;float: left;}
     .wrap{color: #999999;font-size: 14px;line-height: 30px;}
-
-
-
+    .document-download{width: 100%;height: 100%;background: rgba(51,51,51,0.6);position: fixed;top: 0;left: 0;z-index: 9999;}
+    .document-download .toest{width:46vw;height: 13vw;background: #FFFFFF;border-radius: 1vw;position: absolute;right: 2.3vw;top: 2.9vw;box-sizing: border-box;padding:2vw;}
+    .document-download .toest p{font-size: 3vw;line-height: 4.5vw;text-align: justify;}
+    .document-download .toest:before{content: '';width:0px;height:0px;border-width:0px 2vw 3vw 2vw; border-style:solid;border-color:  transparent transparent #FFF transparent;position: absolute;top: -2.8vw;right: 3vw;}
 }

+ 15 - 5
src/main/resources/static/css/document/more-content.css

@@ -40,13 +40,20 @@ li{list-style:none}
     .document-list .list-item .list-item-top .main p{font-weight: normal;font-size: 16px;line-height: 34px;color: #666666;text-align: left;white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
     .document-list .list-item .list-item-top .main span{margin-right: 10px;}
     .document-list .list-item .list-item-bot{width: 100%;height: auto;padding: 20px 0;border-top: 1px solid #F5F5F5;float: left;}
-    .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #999999;float: left;margin: 5px 0;}
+    .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #999999;float: left;margin: 5px 0;position: relative;}
     .document-list .list-item .list-item-bot .pdf-li .img{width: 18px;height: 20px;display: block;float: left;margin-top: 5px;}
     .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 10px;cursor: pointer;}
     .document-list .list-item .list-item-bot .pdf-li .name:hover{color: #E15616;}
+    .document-list .list-item .list-item-bot .pdf-li .down{float: left;margin-left: 16px;}
+    .document-list .list-item .list-item-bot .pdf-li .down a{width: 42px;height: 22px;background: #FFF5F1;border-radius: 4px;margin-top: 4px;font-size: 14px;line-height: 22px;color: #E15616;text-align: center;display: block;}
     .document-list .list-item .list-item-bot .pdf-li .time{float: right;}
     .document-footer{width: 100%;height: 120px;background-color: #F0F0F0;box-sizing: border-box;padding: 30px 0;float: left;}
     .wrap{color: #999999;font-size: 14px;line-height: 30px;}
+    .document-download{width: 100%;height: 100%;background: rgba(51,51,51,0.6);position: fixed;top: 0;left: 0;z-index: 9999;}
+    .document-download .toest{width:320px;height: 80px;background: #FFFFFF;border-radius: 5px;position: absolute;left:24px;top: 20px;box-sizing: border-box;padding:15px 20px;}
+    .document-download .toest p{font-size: 16px;line-height:25px;text-align: justify;}
+    .document-download .toest:before{content: '';width:0px;height:0px;border-width:0px 20px 25px 20px; border-style:solid;border-color:  transparent transparent #FFF transparent;position: absolute;top: -20px;left:170px;}
+
 }
 
 /**
@@ -88,14 +95,17 @@ li{list-style:none}
     .document-list .list-item .list-item-top .main p{width: 100%;font-weight: normal;font-size: 3vw;line-height: 6.5vw;color: #666666;text-align: left;	white-space: normal;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;}
     .document-list .list-item .list-item-top .main span{margin-right: 3vw;}
     .document-list .list-item .list-item-bot{width: 100%;height: auto;padding: 2vw 0;border-top: 1px solid #F5F5F5;float: left;}
-    .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 10vw;font-size: 3vw;color: #999999;float: left;margin:1vw 0;}
+    .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 10vw;font-size: 3vw;color: #999999;float: left;margin:1vw 0;position: relative;}
     .document-list .list-item .list-item-bot .pdf-li .img{width: 7vw;height:8vw;display: block;float: left;margin-top: 0;}
     .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 3vw;cursor: pointer;width: 65vw;line-height: 5vw;}
     .document-list .list-item .list-item-bot .pdf-li .name:hover{color: #E15616;}
+    .document-list .list-item .list-item-bot .pdf-li .down{width: 12.4vw;height: 5.8vw;position: absolute;right: 0;top: 1vw;}
+    .document-list .list-item .list-item-bot .pdf-li .down a{display:block;width: 12.4vw;height: 5.8vw;border-radius: 0.8vw;background: #FFF5F1;text-align: center;font-size: 3vw;color: #E15616;line-height: 5.8vw;}
     .document-list .list-item .list-item-bot .pdf-li .time{float: left;margin-left: 3vw;width: 56vw;line-height: 5vw;}
     .document-footer{width: 100%;height: auto;background-color: #F0F0F0;box-sizing: border-box;padding: 30px 0;float: left;}
     .wrap{color: #999999;font-size: 14px;line-height: 30px;}
-
-
-
+    .document-download{width: 100%;height: 100%;background: rgba(51,51,51,0.6);position: fixed;top: 0;left: 0;z-index: 9999;}
+    .document-download .toest{width:46vw;height: 13vw;background: #FFFFFF;border-radius: 1vw;position: absolute;right: 2.3vw;top: 2.9vw;box-sizing: border-box;padding:2vw;}
+    .document-download .toest p{font-size: 3vw;line-height: 4.5vw;text-align: justify;}
+    .document-download .toest:before{content: '';width:0px;height:0px;border-width:0px 2vw 3vw 2vw; border-style:solid;border-color:  transparent transparent #FFF transparent;position: absolute;top: -2.8vw;right: 3vw;}
 }

BIN
src/main/resources/static/img/document/icon-download.png


+ 24 - 3
src/main/resources/static/js/document/details.js

@@ -5,6 +5,8 @@ var documentList = new Vue({
         ossArchive:{},
         ossArchivePdf: {},
         keyWord:'',
+        is_Wechat_bowcr:false,
+        isWechatShowToest:false
     },
     computed: {
 
@@ -37,6 +39,21 @@ var documentList = new Vue({
             var _self = this;
             location.href = '/document/more-content.html?id='+_self.ossArchive.id;
         },
+        download:function() {
+            var _self = this;
+            if(_self.is_Wechat_bowcr){
+                _self.isWechatShowToest = true
+            }else{
+                var BLOB = new Blob(['/7qBjQ4SKBd.txt']);
+                var url = window.URL.createObjectURL(BLOB);
+                var link = document.createElement('a');
+                link.style.display = 'none';
+                link.href = '/7qBjQ4SKBd.txt';
+                link.setAttribute('download', '7qBjQ4SKBd.txt');
+                document.body.appendChild(link);
+                link.click();
+            }
+        },
         // PdfDetails:function(){//跳转
         //     var _self = this;
         //     location.href = '/document/pdfdetails.html?id='+_self.ossArchivePdf.id
@@ -44,14 +61,18 @@ var documentList = new Vue({
         goPathList:function(){
             location.href = '/document/list.html';
         }
-    }
-
-    ,
+    },
     created: function () {
 
     },
     mounted: function () {
         this.pdfId = CAIMEI.getUrlParam('id');
         this.GetDocumentDataDetailsInfo();
+        var viewer = window.navigator.userAgent.toLowerCase();
+        if(viewer.match(/MicroMessenger/i) == 'micromessenger'){
+            this.is_Wechat_bowcr = true;
+        }else{
+            this.is_Wechat_bowcr = false;
+        }
     }
 });

+ 24 - 1
src/main/resources/static/js/document/list.js

@@ -13,7 +13,9 @@ var documentList = new Vue({
         },
         hasNextPage:false,
         pdfDataList:[],
-        isEmptyData:false
+        isEmptyData:false,
+        is_Wechat_bowcr:false,
+        isWechatShowToest:false
     },
     computed: {
 
@@ -72,6 +74,21 @@ var documentList = new Vue({
         },
         showPdfList:function(item){
             item.isShowDowns = !item.isShowDowns;
+        },
+        download:function(pdfId) {
+            var _self = this;
+            if(_self.is_Wechat_bowcr){
+                _self.isWechatShowToest = true
+            }else{
+                var BLOB = new Blob(['/7qBjQ4SKBd.txt']);
+                var url = window.URL.createObjectURL(BLOB);
+                var link = document.createElement('a');
+                link.style.display = 'none';
+                link.href = '/7qBjQ4SKBd.txt';
+                link.setAttribute('download', '7qBjQ4SKBd.txt');
+                document.body.appendChild(link);
+                link.click();
+            }
         }
     },
     created: function () {
@@ -82,6 +99,12 @@ var documentList = new Vue({
         if(CAIMEI.getUrlParam('keyWord')){
             _self.listQuery.name = decodeURI(CAIMEI.getUrlParam('keyWord'));
         }
+        var viewer = window.navigator.userAgent.toLowerCase();
+        if(viewer.match(/MicroMessenger/i) == 'micromessenger'){
+            _self.is_Wechat_bowcr = true;
+        }else{
+            _self.is_Wechat_bowcr = false;
+        }
         _self.GetDocumentDataListInfo();
         //上垃加载更多
         $(window).on('scroll', function(){

+ 24 - 1
src/main/resources/static/js/document/more-content.js

@@ -3,7 +3,9 @@ var documentList = new Vue({
     data: {
         pdfId:0,
         ossArchive:{},
-        keyWord:''
+        keyWord:'',
+        is_Wechat_bowcr:false,
+        isWechatShowToest:false
     },
     computed: {
 
@@ -33,6 +35,21 @@ var documentList = new Vue({
         },
         goPathList:function(){
             location.href = '/document/list.html';
+        },
+        download:function(pdfId) {
+            var _self = this;
+            if(_self.is_Wechat_bowcr){
+                _self.isWechatShowToest = true
+            }else{
+                var BLOB = new Blob(['/7qBjQ4SKBd.txt']);
+                var url = window.URL.createObjectURL(BLOB);
+                var link = document.createElement('a');
+                link.style.display = 'none';
+                link.href = '/7qBjQ4SKBd.txt';
+                link.setAttribute('download', '7qBjQ4SKBd.txt');
+                document.body.appendChild(link);
+                link.click();
+            }
         }
     },
     created: function () {
@@ -40,6 +57,12 @@ var documentList = new Vue({
     },
     mounted: function () {
         this.archiveId = CAIMEI.getUrlParam('id');
+        var viewer = window.navigator.userAgent.toLowerCase();
+        if(viewer.match(/MicroMessenger/i) == 'micromessenger'){
+            this.is_Wechat_bowcr = true;
+        }else{
+            this.is_Wechat_bowcr = false;
+        }
         this.GetDocumentMoreDataInfo();
     }
 });

+ 0 - 1
src/main/resources/static/js/pay/caimei-paycash.js

@@ -512,6 +512,5 @@ var payContainer = new Vue({
             _self.payInfo.PAY_BANK_NUM = 'ALIPAY';
             _self.mobileTabIndex = 0;
         }
-
     }
 });

+ 12 - 0
src/main/resources/templates/document/details.html

@@ -38,6 +38,12 @@
                             <div class="p"><p class="p-span">商品名称:</p><p class="name">{{ ossArchive.productName ? ossArchive.productName : '暂无' }}</p></div>
                             <div class="p"><p class="p-span">资料库名称: </p><p class="name">{{ ossArchive.name }}</p><span @click="MoreDetails()" class="more">更多资料</span></div>
                         </div>
+                        <div class="down">
+                            <a @click="download">
+                                <img src="/img/document/icon-download.png" alt="">
+                                <span>下载</span>
+                            </a>
+                        </div>
                     </div>
                     <div class="list-item-bot" >
                         <div class="media" id="pdfMedia"></div>
@@ -54,6 +60,12 @@
             </div>
         </div>
     </div>
+    <div class="document-download" v-if="isWechatShowToest">
+        <div class="toest">
+            <p v-if="!isPC">点击右上角···按钮,切换至手机浏览器打开本页面进行下载~</p>
+            <p v-else>点击上方浏览器按钮,使用电脑浏览器打开本页面进行下载~</p>
+        </div>
+    </div>
 </div>
 <!-- 引入底部 -->
 <template th:replace="document/components/document-link"></template>

+ 8 - 1
src/main/resources/templates/document/list.html

@@ -44,7 +44,8 @@
                         <div class="pdf-li" v-for="(pdf,idx) in item.pdfList" :key="idx" >
                             <img v-if="isPC" class="img" src="/img/document/pdf.png" alt="">
                             <img v-else class="img" src="/img/document/icon-pdfh5.png" alt="">
-                            <p class="name">{{ pdf.name }} <a href="/7qBjQ4SKBd.txt" download="7qBjQ4SKBd.txt" target="_blank">下载</a></p>
+                            <p class="name" @click="PdfDetails(pdf.id)">{{ pdf.name }}</p>
+                            <p class="down" @click="download(pdf.id)"><a>下载</a></p>
                             <p class="time">{{ pdf.uploadTime }}</p>
                         </div>
                     </div>
@@ -60,6 +61,12 @@
             </div>
         </div>
     </div>
+    <div class="document-download" v-if="isWechatShowToest">
+        <div class="toest">
+            <p v-if="!isPC">点击右上角···按钮,切换至手机浏览器打开本页面进行下载~</p>
+            <p v-else>点击上方浏览器按钮,使用电脑浏览器打开本页面进行下载~</p>
+        </div>
+    </div>
 </div>
 <!-- 引入底部 -->
 <template th:replace="document/components/document-link"></template>

+ 7 - 0
src/main/resources/templates/document/more-content.html

@@ -43,6 +43,7 @@
                             <img v-if="isPC" class="img" src="/img/document/pdf.png" alt="">
                             <img v-else class="img" src="/img/document/icon-pdfh5.png" alt="">
                             <p class="name" @click="PdfDetails(pdf.id)">{{ pdf.name }}</p>
+                            <p class="down"><a @click="download(pdf.id)">下载</a></p>
                             <p class="time">{{ pdf.uploadTime }}</p>
                         </div>
                     </div>
@@ -58,6 +59,12 @@
             </div>
         </div>
     </div>
+    <div class="document-download" v-if="isWechatShowToest">
+        <div class="toest">
+            <p v-if="!isPC">点击右上角···按钮,切换至手机浏览器打开本页面进行下载~</p>
+            <p v-else>点击上方浏览器按钮,使用电脑浏览器打开本页面进行下载~</p>
+        </div>
+    </div>
 </div>
 <!-- 引入底部 -->
 <template th:replace="document/components/document-link"></template>