Commit 1adc632e by 冷斌

fix bug

parent bac10e28
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<!-- <!--
<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(index)" v-else-if="item.price > 0" class="button_orange layout_center"> <div @click="showYulan(index)" v-else-if="item.price > 0" class="button_orange layout_center">
下载预览 下载预览
<!-- 下载预览提示 --> <!-- 下载预览提示 -->
<div v-show="yulan==index"> <div v-show="yulan==index">
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
<div class="tips_title">提示</div> <div class="tips_title">提示</div>
<div class="tips_body">套餐下架后用户便无法找到该商品进行购买,你确定要下架吗?</div> <div class="tips_body">套餐下架后用户便无法找到该商品进行购买,你确定要下架吗?</div>
<div class="tips_foot"> <div class="tips_foot">
<div class="tips_foot_L">下载预览</div> <div @click="onDownload(index)" class="tips_foot_L" >下载预览</div>
<div class="tips_foot_R">下载全部</div> <div @click="onPay(item)" class="tips_foot_R">下载全部</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -336,19 +336,25 @@ ...@@ -336,19 +336,25 @@
// 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 = 0;
this.yulan = index; },
showYulan: function (index) {
if(!this.download[index].attach){
alert('当前课程无文件下载');
} else {
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