| | |
| | | <view style="margin: 0.3rem;" |
| | | v-for="(linkitem, linkindex) in currentLink" :key="linkindex"> |
| | | <button @click="download(linkitem)" type="primary"> |
| | | 下载{{linkindex}} |
| | | 图片{{linkindex}} |
| | | </button> |
| | | </view> |
| | | <view v-if="videoLink&&videoLink.length>0"> |
| | | <button @click="download(videoLink)" type="primary"> |
| | | 主图视频 |
| | | </button> |
| | | </view> |
| | | </view> |
| | |
| | | pageCount: 10, |
| | | totalNum: 0, |
| | | currentLink: [], |
| | | videoLink:'', |
| | | currentId: '' |
| | | } |
| | | }, |
| | |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | refreshList() |
| | | { |
| | | this.productList=[]; |
| | | refreshList() { |
| | | this.productList = []; |
| | | this.getTemplateData(); |
| | | }, |
| | | //查看铺货单 |
| | |
| | | this.$http.post('/api/ProductInfo/GetDaiFaDetail', param).then(e => { |
| | | var prodetail = e.result; |
| | | var linkArr = prodetail.productImage.images; |
| | | linkArr.push(prodetail.mainVedio); |
| | | //linkArr.push(prodetail.mainVedio); |
| | | this.currentLink = prodetail.productImage.images; |
| | | this.videoLink=prodetail.mainVedio; |
| | | this.currentId = id; |
| | | }).catch(function(err) { |
| | | console.log(err); |
| | |
| | | }, |
| | | //下载 |
| | | download(link) { |
| | | uni.showLoading({ |
| | | title: '下载中' |
| | | }) |
| | | uni.downloadFile({ |
| | | url: link, |
| | | success: (res) => { |
| | | uni.hideLoading(); |
| | | if (res.statusCode === 200) { |
| | | var oA = document.createElement("a"); |
| | | var oA = document.createElement("a"); |
| | | oA.download = ''; // 设置下载的文件名,默认是'下载' |
| | | oA.href = res.tempFilePath; //临时路径再保存到本地 |
| | | document.body.appendChild(oA); |
| | | oA.click(); |
| | | oA.remove(); // 下载之后把创建的元素删除 |
| | | oA.remove(); // 下载之后把创建的元素删除 */ |
| | | } |
| | | }, |
| | | fail: (res) => {} |
| | | fail: (res) => { |
| | | uni.hideLoading(); |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | toTab(tabtype) { |
| | |
| | | <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>暗号情书</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) |
| | | document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.f5d95020.js></script><script src=/static/js/index.c01701dd.js></script></body></html> |
| | | document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.f5d95020.js></script><script src=/static/js/index.4154c242.js></script></body></html> |