Commit 7f181a03 by 刘海龙

111

parent fb07d484
...@@ -90,11 +90,11 @@ ...@@ -90,11 +90,11 @@
</div> </div>
</div> </div>
<div class="class_right layout_center"> <div class="class_right layout_center">
<div v-if="item.price == 0|| item.is_buy" @click="onDownload(item)" class="button_green layout_center">下载试题</div> <div v-if="item.price == 0|| item.is_buy" @click="onDownload(index)" class="button_green layout_center">下载试题</div>
<!-- <!--
<div @click="onPay(item)" v-else-if="item.price > 0" class="button_orange layout_center">¥{{item.price}}</div> <div @click="onPay(item)" v-else-if="item.price > 0" class="button_orange layout_center">¥{{item.price}}</div>
--> -->
<div @click="onDownload(item)" v-else-if="item.price > 0" class="button_orange layout_center">下载预览试题</div> <div @click="onDownload(index)" v-else-if="item.price > 0" class="button_orange layout_center">下载预览试题</div>
</div> </div>
</div> </div>
<span style="margin-top: 35vh;" v-if="download.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span> <span style="margin-top: 35vh;" v-if="download.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span>
...@@ -279,13 +279,13 @@ ...@@ -279,13 +279,13 @@
}) })
}, },
onDownload: function(item){ onDownload: function(index){
// if (item.attach) { // if (item.attach) {
// window.location.href = item.attach; // window.location.href = item.attach;
// } // }
// console.log(item.attach) // console.log(item.attach)
var link = document.createElement('a'); var link = document.createElement('a');
console.log(this.download) console.log(this.download[index])
//设置下载的文件名 //设置下载的文件名
// link.download = ; // link.download = ;
// link.style.display = 'none'; // link.style.display = 'none';
......
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