Commit f1c0c130 by 冷斌

fix bug

parent 6b902d8d
<include file="__THEME__/public_header_w3g" /> <include file="__THEME__/public_header_w3g" />
<style> <style>
body { body {
padding: 0 !important; padding: 0 !important;
} }
.van-cell:not(:last-child)::after { .van-cell:not(:last-child)::after {
border-bottom: none !important; border-bottom: none !important;
} }
.van-field__control { .van-field__control {
width: 6.25rem !important; width: 6.25rem !important;
height: 2rem; height: 2rem;
background: rgba(245,245,245,1); background: rgba(245,245,245,1);
border-radius: 1rem; border-radius: 1rem;
} }
.van-dropdown-item__content { .van-dropdown-item__content {
max-height: 100% !important; max-height: 100% !important;
} }
</style> </style>
<div id="app" style="height: 100%;"> <div id="app" style="height: 100%;">
<div class="layout_v"> <div class="layout_v">
...@@ -34,10 +34,6 @@ ...@@ -34,10 +34,6 @@
<div @click="onCategory('{$top['id']}', '{$top.title}')" class="van-ellipsis" :class="selectedCategory('{$top['id']}') ? 'drop_down_option_selected' : 'drop_down_option'">{$top.title}</div> <div @click="onCategory('{$top['id']}', '{$top.title}')" class="van-ellipsis" :class="selectedCategory('{$top['id']}') ? 'drop_down_option_selected' : 'drop_down_option'">{$top.title}</div>
</volist> </volist>
</div> </div>
<span class="all_category_title text_16_600 color_333333">讲师</span>
<div class="drop_down_grid">
</div>
<span class="all_category_title text_16_600 color_333333">状态</span> <span class="all_category_title text_16_600 color_333333">状态</span>
<div class="drop_down_grid"> <div class="drop_down_grid">
<div @click="onBuy('', '')" class="van-ellipsis" :class="selectedBuy('') ? 'drop_down_option_selected' : 'drop_down_option'">全部</div> <div @click="onBuy('', '')" class="van-ellipsis" :class="selectedBuy('') ? 'drop_down_option_selected' : 'drop_down_option'">全部</div>
...@@ -68,7 +64,7 @@ ...@@ -68,7 +64,7 @@
:finished="finished" :finished="finished"
finished-text="没有更多了" finished-text="没有更多了"
@load="onLoad"> @load="onLoad">
<div @click="onTapItem(item)" v-for="(item, index) in items" :key="index" class="home_class_item layout_v"> <div @click="onTapItem(item)" v-for="(item, index) in items" :key="index" class="home_class_item layout_v">
<div class="layout_h"> <div class="layout_h">
<van-image style="margin-right: 0.75rem;" height="72" width="128" fit="cover" :src="item.cover"> <van-image style="margin-right: 0.75rem;" height="72" width="128" fit="cover" :src="item.cover">
...@@ -85,13 +81,13 @@ ...@@ -85,13 +81,13 @@
</div> </div>
<div class="home_divider divider"></div> <div class="home_divider divider"></div>
</div> </div>
</van-list> </van-list>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
el: '#app', el: '#app',
data: function() { data: function() {
...@@ -109,28 +105,28 @@ ...@@ -109,28 +105,28 @@
} }
}, },
computed: { computed: {
selectedCategory: function() { selectedCategory: function() {
let cate = this.cate let cate = this.cate
return function(c) { return function(c) {
return c == cate return c == cate
} }
}, },
selectedBuy: function() { selectedBuy: function() {
let buy = this.buy let buy = this.buy
return function(c) { return function(c) {
return c == buy return c == buy
} }
}, },
}, },
created: function(){ created: function(){
document.title = "全部课程" document.title = "全部课程"
this.onInit() this.onInit()
}, },
methods: { methods: {
onInit: function() { onInit: function() {
let p = {:json_encode($selCate)}; let p = {:json_encode($selCate)};
if(p[this.cate]) { if(p[this.cate]) {
...@@ -138,12 +134,12 @@ ...@@ -138,12 +134,12 @@
this.selected = this.conditions this.selected = this.conditions
} }
}, },
onTapItem: function(item) { onTapItem: function(item) {
let url = "{:U('course/Video/view')}" let url = "{:U('course/Video/view')}"
window.location.href = url.replace(/\[.*?\]/g, item.id) window.location.href = url.replace(/\[.*?\]/g, item.id)
}, },
//Helper //Helper
onCondition: function(id, title, key) { onCondition: function(id, title, key) {
let idx = this.conditions.hx_indexOf( r => { return r.type == key }) let idx = this.conditions.hx_indexOf( r => { return r.type == key })
...@@ -162,17 +158,17 @@ ...@@ -162,17 +158,17 @@
} }
} }
}, },
onCategory: function(id, title) { onCategory: function(id, title) {
this.onCondition(id, title, 'category') this.onCondition(id, title, 'category')
this.cate = id this.cate = id
}, },
onBuy: function(type, title) { onBuy: function(type, title) {
this.onCondition(type, title, 'buy') this.onCondition(type, title, 'buy')
this.buy = type this.buy = type
}, },
onSure: function() { onSure: function() {
this.$refs.filter.toggle() this.$refs.filter.toggle()
this.selected = this.conditions this.selected = this.conditions
...@@ -180,7 +176,7 @@ ...@@ -180,7 +176,7 @@
this.page = 0 this.page = 0
this.onLoad() this.onLoad()
}, },
onReset: function() { onReset: function() {
this.$refs.filter.toggle(); this.$refs.filter.toggle();
this.onCategory('', '') this.onCategory('', '')
...@@ -189,7 +185,7 @@ ...@@ -189,7 +185,7 @@
this.page = 0 this.page = 0
this.onLoad() this.onLoad()
}, },
onLoad: function() { onLoad: function() {
let that = this let that = this
let on = "{$marketConf['order_switch']}" == 1 let on = "{$marketConf['order_switch']}" == 1
...@@ -222,9 +218,9 @@ ...@@ -222,9 +218,9 @@
} }
}) })
} }
} }
}) })
</script> </script>
<include file="__THEME__/public_footer_w3g" /> <include file="__THEME__/public_footer_w3g" />
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