Commit 32cdc93d by 冷斌

Merge remote-tracking branch 'origin/master'

parents 625b6fdc 4e470fcd
......@@ -290,6 +290,40 @@ div::-webkit-scrollbar {
position: relative;
}
.two_button_container {
padding: 0.75rem;
margin-bottom: 1.5rem;
}
.two_button_left {
border-radius: 1.5rem;
border:1px solid rgba(163,228,96,1);
width: 0;
height: 3rem;
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
font-size: 1rem;
font-weight: 600;
color: rgba(101,192,0,1);
margin-right: 1.9375rem;
}
.two_button_right {
width: 0;
height: 3rem;
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
background:rgba(163,228,96,1);
border-radius:24px;
font-size:16px;
font-weight:600;
color:rgba(255,255,255,1);
}
.confirm_button {
box-sizing: border-box;
height:44px;
......@@ -645,3 +679,25 @@ div::-webkit-scrollbar {
margin-bottom: 0.75rem;
padding: 0.4375rem 0.75rem;
}
/* All */
.all_category_title {
margin-top: 0.5rem;
margin-left: 0.75rem;
}
.all_gap_line {
width: 0.75rem;
height: 0.0625rem;
background:rgba(204,204,204,1);
margin-left: 0.75rem;
margin-right: 0.75rem;
}
.all_range_input {
width: 6.25rem !important;
background:rgba(245,245,245,1);
border-radius: 1rem;
padding: 0 !important;
margin: 0.75rem;
}
<include file="__THEME__/public_header_w3g" />
<link rel="stylesheet" href="__APP__/css/course_3g.css">
<!-- <link rel="stylesheet" href="__APP__/css/course_3g.css">
<style>
.icon-01{background-image:url(__THEME__/icon/icon.png);width:8px;height:12px;background-position:-220px -219px}
.icon-02{margin-left:5px;background-image:url(__THEME__/icon/icon.png);width:12px;height:7px;background-position:-469px -172px}
......@@ -9,9 +9,70 @@
.jiujiunone-class-id.active {
color: #00BED4 !important;
}
</style> -->
<style>
body {
padding: 0 !important;
}
.van-cell:not(:last-child)::after {
border-bottom: none !important;
}
.van-field__control {
width: 6.25rem !important;
height: 2rem;
background: rgba(245,245,245,1);
border-radius: 1rem;
}
.van-dropdown-item__content {
max-height: 100% !important;
}
</style>
<div id="app" style="height: 100%;">
<div class="layout_v">
<van-sticky>
<van-dropdown-menu>
<van-dropdown-item title="筛选条件" ref="filter">
<div class="layout_v" style="width: 100vw">
<span class="all_category_title text_16_600 color_333333">分类</span>
<div class="drop_down_grid">
<div @click="onCategory('')" class="van-ellipsis" :class="selectedCategory('') ? 'drop_down_option_selected' : 'drop_down_option'">全部</div>
<volist name="selCate" id="top">
<div @click="onCategory('{$top['id']}')" class="van-ellipsis" :class="selectedCategory('{$top['id']}') ? 'drop_down_option_selected' : 'drop_down_option'">{$top.title}</div>
</volist>
</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>
<div class="drop_down_grid">
<div @click="onBuy('')" class="van-ellipsis" :class="selectedBuy('') ? 'drop_down_option_selected' : 'drop_down_option'">全部</div>
<div @click="onBuy('1')" class="van-ellipsis" :class="selectedBuy('1') ? 'drop_down_option_selected' : 'drop_down_option'">已购买</div>
<div @click="onBuy('2')" class="van-ellipsis" :class="selectedBuy('2') ? 'drop_down_option_selected' : 'drop_down_option'">未购买</div>
</div>
<span class="all_category_title text_16_600 color_333333">价格区间</span>
<div all-range-input class="layout_h">
<van-field class="all_range_input" v-model="minPrice" type="number" input-align="center" placeholder="最低价" ></van-field>
<div class="all_gap_line self_center"></div>
<van-field class="all_range_input" v-model="maxPrice" type="number" input-align="center" placeholder="最高价" ></van-field>
</div>
<div class="two_button_container layout_h" style="margin-top: 2.5rem;">
<div class="two_button_left">重置</div>
<div class="two_button_right">确认</div>
</div>
</div>
</van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
</div>
</div>
<!--选择价格区间弹框-->
<div class="jiujiunone-class-bg"></div>
<!-- <div class="jiujiunone-class-bg"></div>
<div class="jiujiunone-class">
<div class="jiujiunone-class-title">分类筛选</div>
<div class="jiujiunone-class-box">
......@@ -20,24 +81,23 @@
<div class="jiujiunone-class-base jiujiunone-class-id <php>if($_GET['cateId'] == $top['id']){</php>active<php>}</php>" data-url="{:U('course/Video/index',array_merge($default_params,['cateId'=>$top['id']]))}">{$top.title}</div>
<div class="jiujiunone-class-next">
<volist name="top.child" id="child">
<a href="javascript:;" class="jiujiunone-class-item jiujiunone-class-id <php>if($_GET['cateId'] == $child['id']){</php>active<php>}</php>" data-url="{:U('course/Video/index',array_merge($default_params,['cateId'=>$child['id']]))}">{$child.title}</a><!-- -->
<a href="javascript:;" class="jiujiunone-class-item jiujiunone-class-id <php>if($_GET['cateId'] == $child['id']){</php>active<php>}</php>" data-url="{:U('course/Video/index',array_merge($default_params,['cateId'=>$child['id']]))}">{$child.title}</a>
</volist>
</div>
</div>
</volist>
</div>
<div class="jiujiunone-class-bottom">
<!-- <div class="jiujiunone-class-del">清空条件</div> -->
<div class="jiujiunone-class-dete">确定</div>
</div>
</div>
</div> -->
<div class="selebox"></div>
<div class="cover"></div>
<div class="min-height-wrap">
<!-- <div class="selebox"></div>
<div class="cover"></div> -->
<!-- <div class="min-height-wrap">
<div class="maskbox"></div>
<div class="body">
<div class="selectdiv">
<div class="selectdiv"> -->
<!-- <div>
<dl>
......@@ -75,12 +135,11 @@
</volist>
</div> -->
<php>if($vip_levels){</php>
<!-- <php>if($vip_levels){</php>
<div>
<dl>
<dt>会员:<span class="<php>if(!$_GET['vip_id']){</php>on<php>}</php>"><a href="{:U('course/Video/index',array_merge($default_params,['vip_id'=>'']))}">不限</a></span>
</dt>
<!-- <dt <if condition="$_GET['vip_id'] eq null">class="on"</if>><a href="{:U('course/Video/index',array_merge($default_params,['vip_id'=>'']))}">不限</a></dt> -->
<volist name="vip_levels" id="vo">
<dt <if condition="$_GET['vip_id'] eq $key">class="on"</if>>
<a href="{:U('course/Video/index',array_merge($default_params,['vip_id'=>$key]))}">{$vo}<span class="icon-ck"></span></a>
......@@ -88,9 +147,9 @@
</volist>
</dl>
</div>
<php>}</php>
<php>}</php> -->
<div>
<!-- <div>
<dl class="margin-left">
<dt>类型:</dt>
<dt <eq name="vtype" value="2">class="on"</eq>><a href="{:U('course/Video/index',array_merge($default_params,['vtype'=>2]))}">直播</a></dt>
......@@ -135,11 +194,10 @@
<div style="line-height: 32px"><a class="fl screen prevValue" href="{:U('course/Video/index')}">清空条件</a></div>
<php>}</php>
<span class="jiujiunone_span posabs_span">课程分类</span>
<!-- <div onclick="clickoffon(document.getElementsByClassName('clickoffon')[0])" class="iconfontNEW jiujiunone_span">&#xe664;</div> -->
<div class="clickoffon" onclick="clickoffon(this)">筛选</div>
</div>
</div>
<php>if($cateId){</php>
</div> -->
<!-- <php>if($cateId){</php>
<div class="searchdiv">在“<span>{:mStr(t($title),10)}</span>”分类下,找到{$list_data.count}门课程</div>
<php>}</php>
<ul class="classlist clearfix" style="float:left;width:100%">
......@@ -163,7 +221,6 @@
<span>
<h4>
{$vo['video_title']}
<!--<img src="__APP__/images/hot.png" alt="">-->
</h4>
<div class="clearfix">
<em>
......@@ -197,9 +254,50 @@
<a class="backtop"></a>
<php>}</php>
</div>
</div>-->
<script>
new Vue({
el: '#app',
data: function() {
return {
cate: "",
buy: "",
minPrice: "",
maxPrice: ""
}
},
computed: {
selectedCategory: function() {
let cate = this.cate
return function(c) {
return c == cate
}
},
selectedBuy: function() {
let buy = this.buy
return function(c) {
return c == buy
}
}
},
created: function(){
document.title = "全部真题"
},
methods: {
onCategory: function(id) {
this.cate = id
},
onBuy: function(type) {
this.buy = type
},
}
})
function clickoffon(a) {
var _this = $(a)
if (_this.html() == "收起") {
......
......@@ -36,35 +36,22 @@
@load="onLoad">
<template v-if="tab == 2">
<volist name="listData" id="vo">
<!-- <li style="width: 48%;margin:6px 1% 0">
<a href="{:U("mall/Goods/view",array('id'=>$vo['goods_id']))}">
<img src="{:getCover($vo['cover_ids'],360,360)}" class="lazyloading" alt="{$vo.title}" />
<h3>{$vo.title}</h3>
<div class="info">
<div class="num"><span><if condition="in_array('credpay',$payConfig['pay'])">{$vo.price}积分<else/>¥{$vo['price']/$sple_score}</if></span></div>
<div class="num" style="float:right;">库存:{$vo.stock}</div>
</div>
</a>
</li> -->
<a href="{:U('mall/Goods/view',array('id'=>$vo['goods_id']))}" 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
style="margin-right: 0.75rem;"
height="68"
width="128"
fit="cover"
src="{:getCover($vo['cover_ids'],360,360)}">
:src="item.cover">
</van-image>
<div class="weight_full layout_v">
<span class="text_14_600 color_333333 van-multi-ellipsis--l2">{$vo.title}</span>
<span class="text_14_600 color_333333 van-multi-ellipsis--l2">{{item.title}}</span>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B self_center">¥{$vo.price}</span>
<span class="text_14_600 color_FF3B3B self_center">¥{{item.price}}</span>
<div class="item_green_button">购买</div>
</div>
</div>
</a>
</volist>
</div>
</template>
</van-list>
......@@ -167,16 +154,19 @@
finished: false,
options: [{
title: '视频',
items: [1,2],
page: 1,
items: [],
page: 0,
finished: false
},{
title: '真题',
items: [1,2],
page: 1,
items: [],
page: 0,
finished: false
},{
title: '实物',
items: [1,2],
page: 1,
items: [],
page: 0,
finished: false
}]
}
},
......@@ -187,22 +177,52 @@
},
methods: {
onItem: function(item) {
if(this.tab == 2) {
let url = "{:U('mall/Goods/view')}"
window.location.href = url.replace(/\[.*?\]/g, item.uid)
}
},
onTab: function(idx) {
this.tab = idx
let opt = this.options[idx]
if(opt.finished) {
this.loading = false
this.finished = true
} else {
this.onLoad()
}
},
onLoad: function() {
console.log('onLoad')
let that = this
let opt = that.options[that.tab]
if(that.tab == 2) {
$.ajax({
type: "GET",
url: "{:U('mall/Goods/index')}",
data: "p=" + 1 +
data: "api=1&p=" + (opt.page + 1) +
"&sort_type={$_GET['sort_type']}&cateId={$_GET['cateId']}",
dataType: "json",
success: function (data) {
console.log(data)
that.loading = false
let res = data
let opt = that.options[2]
opt.items = opt.items.concat(res.data.map( r => { return {
uid: r.uid,
title: r.title,
cover: r.cover,
price: r.price
}}))
opt.page = res.nowPage
opt.finished = res.nowPage == res.totalPages
that.finished = res.nowPage == res.totalPages
console.log(that.finished)
}
})
}
}
}
})
/*确定点击*/
......
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