Commit 9d157e1d by 陈超

T

parent 5cfc6640
...@@ -85,13 +85,12 @@ ...@@ -85,13 +85,12 @@
<van-image style="margin-right: 0.75rem;" height="72" width="128" fit="cover" src="{:getCover($vo['cover'] ,580 , 320 )}"> <van-image style="margin-right: 0.75rem;" height="72" width="128" fit="cover" src="{:getCover($vo['cover'] ,580 , 320 )}">
</van-image> </van-image>
<div class="weight_full layout_v"> <div class="weight_full layout_v">
<span class="text_14_600 color_333333 van-multi-ellipsis--l2">{$vo.video_title}</span> <span class="text_14_600 color_333333 van-multi-ellipsis--l2">{{item.title}}</span>
<span class="text_14_600 color_FF3B3B" style="margin-top: 0.5rem;"> <span class="text_14_600 color_FF3B3B" style="margin-top: 0.5rem;">
<if condition="$vo['t_price'] eq 0">免费 {{item.price}}
<else />¥{$vo['t_price']}</if>
</span> </span>
<span class="text_12_400 color_999999"> <span class="text_12_400 color_999999">
<php>if($marketConf['order_switch'] == 1) {</php>{$vo['video_order_count_mark']}<php>}else{</php>{$vo['video_order_count']}<php>}</php>人正在学习 {{item.count}}人正在学习
</span> </span>
</div> </div>
</div> </div>
...@@ -366,9 +365,10 @@ ...@@ -366,9 +365,10 @@
this.onCategory('', '') this.onCategory('', '')
this.onBuy('', '') this.onBuy('', '')
}, },
//<php>if($marketConf['order_switch'] == 1) {</php>{$vo['video_order_count_mark']}<php>}else{</php>{$vo['video_order_count']}<php>}</php>
onLoad: function() { onLoad: function() {
let that = this let that = this
console.log("{$marketConf['order_switch']}")
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "{:U('course/Video/index')}", url: "{:U('course/Video/index')}",
...@@ -377,8 +377,17 @@ ...@@ -377,8 +377,17 @@
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
that.loading =false that.loading =false
that.finished = true let res = data.data
console.log(data) that.items = that.items.concat(res.data.map( r => {
let pi = r.mz_price
return {
title: r.video_title,
price: pi.price == 0 ? '免费' : pi.price,
count: r.video_order_count
}
}))
that.page = data.nowPage
that.finished = data.nowPage == data.totalPages
} }
}) })
} }
......
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