Bladeren bron

资料库下载

zhengjinyi 4 jaren geleden
bovenliggende
commit
24f9763805

+ 6 - 0
src/main/resources/static/js/common/serviceapi/document.service.js

@@ -46,4 +46,10 @@ var DocumentApi = {
                 callback(res);
             });
         },
+        GetDocumentDownloadLink: function (params, callback) {//资料库获取详情
+            LocakkHost.AjaxService({ url:'/document/downFile', type:'GET', data:params, json:false})
+            .then(function(res){
+                callback(res);
+            });
+        },
 };

+ 8 - 6
src/main/resources/static/js/document/details.js

@@ -41,17 +41,19 @@ var documentList = new Vue({
         },
         download:function() {
             var _self = this;
+            // window.open('/document/downFile?pdfId='+_self.pdfId);
             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();
+                var DownloadLink = document.createElement('a');
+                DownloadLink.style.display = 'none';
+                DownloadLink.href ='https://caimei-oss.oss-cn-shenzhen.aliyuncs.com/bb40705c864f47a5b99f8df6a4330b58.pdf?Expires=1609988547&OSSAccessKeyId=LTAI4GBL3o4YkWnbKYgf2Xia&Signature=%2B3mqH81JtbVl9shwqndxGL2Ivco%3D';
+                DownloadLink.setAttribute('download', 'bb40705c864f47a5b99f8df6a4330b58.pdf');
+                document.body.appendChild(DownloadLink);
+                DownloadLink.click();
+                document.body.removeChild(DownloadLink);
             }
         },
         // PdfDetails:function(){//跳转

+ 7 - 6
src/main/resources/static/js/document/list.js

@@ -82,12 +82,13 @@ var documentList = new Vue({
             }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();
+                var DownloadLink = document.createElement('a');
+                DownloadLink.style.display = 'none';
+                DownloadLink.href = '/7qBjQ4SKBd.txt';
+                DownloadLink.setAttribute('download', '7qBjQ4SKBd.txt');
+                document.body.appendChild(DownloadLink);
+                DownloadLink.click();
+                document.body.removeChild(DownloadLink);
             }
         }
     },

+ 7 - 6
src/main/resources/static/js/document/more-content.js

@@ -43,12 +43,13 @@ var documentList = new Vue({
             }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();
+                var DownloadLink = document.createElement('a');
+                DownloadLink.style.display = 'none';
+                DownloadLink.href = '/7qBjQ4SKBd.txt';
+                DownloadLink.setAttribute('download', '7qBjQ4SKBd.txt');
+                document.body.appendChild(DownloadLink);
+                DownloadLink.click();
+                document.body.removeChild(DownloadLink);
             }
         }
     },

+ 1 - 1
src/main/resources/templates/supplier-center/shop/goods.html

@@ -145,7 +145,7 @@
                                 <li>
                                     <div class="good-handle">
                                         <a class="btn " href="javascript: void(0);" v-if="['0','1','2','3','8','9'].indexOf(product.validFlag)!=-1" @click="editGoodFn(product)">编辑</a>
-                                        <a class="btn primary" href="javascript: void(0);" v-if="['2'].indexOf(product.validFlag)!=-1" @click="pageLinkDetils(product)">预览商品</a>
+                                        <a class="btn primary" href="javascript: void(0);" v-if="['2'].indexOf(product.validFlag)!=-1" @click="pageLinkDetils(product)">查看</a>
                                         <a class="btn " href="javascript: void(0);" v-if="['2'].indexOf(product.validFlag)!=-1" @click="ItemDownshelf(product)">下架</a>
                                         <a class="btn danger" href="javascript: void(0);" v-if="product.isDelFeatured" @click="DeletePushHotFn(product)">删除主页推荐</a>
                                         <a class="btn success" href="javascript: void(0);" v-if="product.isAddFeatured" @click="AddPushHotFn(product)">添加主页推荐</a>