Commit bb41cfc6 by 陈超

A

parent 2ffebc75
...@@ -35,6 +35,45 @@ ...@@ -35,6 +35,45 @@
finished-text="没有更多了" finished-text="没有更多了"
@load="onLoad"> @load="onLoad">
<template v-if="tab == 0">
<div @click="onItem(item)" v-for="(item, idx) in options[0].items" :key="idx" class="home_class_item layout_v">
<div class="layout_h">
<van-image
style="margin-right: 0.75rem;"
height="72"
width="128"
fit="cover"
:src="item.cover">
</van-image>
<div class="weight_full layout_v">
<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;">{{item.price}}</span>
<span class="text_12_400 color_999999">{{item.count}}人正在学习</span>
</div>
</div>
</div>
</template>
<template v-if="tab == 1">
<div v-for="(item, idx) in options[1].items" :key="idx" class="layout_v home_question_item">
<div v-if="item.price == 0" class="layout_h">
<div class="home_item_mark_green layout_center">免费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-right: 1.5rem;margin-left: 0.625rem;">{{item.title}}</span>
<div @click="onItem(item)" class="home_button_green layout_center">开始做题</div>
</div>
<div v-else class="layout_h">
<div class="home_item_mark_orange layout_center">付费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-right: 1.5rem;margin-left: 0.625rem;">{{item.title}}</span>
<div @click="onItem(item)" class="home_button_orange layout_center">¥{{item.price}}</div>
</div>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B">¥{{item.price}}</span>
<van-image src="__THEME__/img/down_load_icon.png" width="13" height="16" ></van-image>
</div>
<div class="home_divider divider"></div>
</div>
</template>
<template v-if="tab == 2"> <template v-if="tab == 2">
<div @click="onItem(item)" v-for="(item, idx) in options[2].items" :key="idx" class="home_item_goods layout_h"> <div @click="onItem(item)" v-for="(item, idx) in options[2].items" :key="idx" class="home_item_goods layout_h">
<van-image <van-image
...@@ -181,6 +220,11 @@ ...@@ -181,6 +220,11 @@
if(this.tab == 2) { if(this.tab == 2) {
let url = "{:U('mall/Goods/view')}" let url = "{:U('mall/Goods/view')}"
window.location.href = url.replace(/\[.*?\]/g, item.uid) window.location.href = url.replace(/\[.*?\]/g, item.uid)
} else if(this.tab == 0) {
let url = "{:U('course/Video/view')}"
window.location.href = url.replace(/\[.*?\]/g, item.id)
} else {
} }
}, },
onTab: function(idx) { onTab: function(idx) {
......
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