Commit bac10e28 by 冷斌

fix bug

parent a37424f1
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<div @click="onDownload(index)" v-else-if="item.price > 0" class="button_orange layout_center"> <div @click="onDownload(index)" v-else-if="item.price > 0" class="button_orange layout_center">
下载预览 下载预览
<!-- 下载预览提示 --> <!-- 下载预览提示 -->
<div class="yulanBox" style="display: none"> <div v-show="yulan==index">
<div class="tips_box"> <div class="tips_box">
<div class="tips_title">提示</div> <div class="tips_title">提示</div>
<div class="tips_body">套餐下架后用户便无法找到该商品进行购买,你确定要下架吗?</div> <div class="tips_body">套餐下架后用户便无法找到该商品进行购买,你确定要下架吗?</div>
...@@ -222,6 +222,7 @@ ...@@ -222,6 +222,7 @@
download: [], download: [],
myYiZuo: [], myYiZuo: [],
myCollect: [], myCollect: [],
yulan: 0,
page: 1 page: 1
} }
}, },
...@@ -335,17 +336,19 @@ ...@@ -335,17 +336,19 @@
// if (item.attach) { // if (item.attach) {
// window.location.href = item.attach; // window.location.href = item.attach;
// } // }
var link = document.createElement('a'); // var link = document.createElement('a');
// 设置下载的文件名 // // 设置下载的文件名
link.download = this.download[index].title; // link.download = this.download[index].title;
link.style.display = 'none'; // link.style.display = 'none';
//设置下载路径 // //设置下载路径
link.href = this.download[index].attach; // link.href = this.download[index].attach;
//触发点击 // //触发点击
document.body.appendChild(link); // document.body.appendChild(link);
link.click(); // link.click();
//移除节点 // //移除节点
document.body.removeChild(link); // document.body.removeChild(link);
this.yulan = index;
}, },
onTopTab: function(tab) { onTopTab: function(tab) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment