Commit bbf743f9 by 陈超

A

parent c8528a1c
<include file="__THEME__/public_header_w3g" />
<div id="app">
<div class="layout_v tab_container">
<!--search-->
<a href="{:U('classroom/Index/search')}">
<van-search style="padding-bottom: 0 !important;" left-icon="__THEME__/img/serch@3x.png" readonly shape="round"
background="#FFFFFF" placeholder="搜索课程...">
</van-search>
</a>
<!--banner start-->
<van-swipe class="home_swapper" indicator-color="white">
<volist name="ad_list" id="adlt">
<van-swipe-item>
<a class="home_swapper_image" href="{$adlt['bannerurl']}" title="{$adlt['banner_title']}">
<van-image width="100%" height="100%" fit="cover" src="{:getCover($adlt['banner'],720,300)}" />
</a>
</van-swipe-item>
</volist>
</van-swipe>
<volist name="config_index.item" id="item_name">
<eq name="item_name" value="category">
<!-- 分类 -->
<div class="layout_h scroll_h">
<volist name="re_cate" id="vo" offset="0" length='8'>
<div class="layout_center">
<a href="{:U('course/Video/index',array('cateId'=>$vo['full_cate']))}">
<div class="layout_v" style="width: 5.375rem;">
<van-image class="self_center" height="45" width="45" src="{:getCover($vo['middle_ids'],45,45)}">
</van-image>
<span class="text_12_400 color_333333 self_center" style="margin-top: 0.125rem;">{$vo['title']}</span>
</div>
</a>
</div>
</volist>
</div>
</eq>
<eq name="item_name" value="bestCourse_new">
<!-- 精选课程 -->
<div class="home_list_part" style="margin-top: 2.125rem;">
<div class="home_list_header layout_h">
<div class="home_list_header_v_line"></div>
<span class="text_16_600 color_333333 self_center" style="margin-left: 0.5rem;">精选课程</span>
<div class="layout_h_r weight_full self_center">
<van-icon name="__THEME__/img/tiny_right_arrow.png" class="self_center"></van-icon>
<a href="{:U('course/Video/index', array('best'=>1))}"><span class="text_12_400 color_999999 self_center">查看全部</span></a>
</div>
</div>
</div>
<div class="layout_v">
<volist name="bestVideo" id="vo" offset="0" length='4'>
<switch name="vo.type">
<case value="1"><a href="{:U('course/Video/view',array('id'=>$vo['id']))}"></case>
<case value="2"><a href="{:U('live/Index/view',array('id'=>$vo['id']))}"></case>
<case value="6"><a href="{:U('course/Classes/view',array('id'=>$vo['id']))}"></case>
</switch>
<div class="home_class_item layout_v">
<div class="layout_h">
<van-image style="margin-right: 0.75rem;" height="72" width="128" fit="cover" src="{:getCover($vo['cover'] ,580 , 320 )}">
</van-image>
<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_FF3B3B" style="margin-top: 0.5rem;">
<if condition="$vo['t_price'] eq 0">免费
<else />¥{$vo['t_price']}</if>
</span>
<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>人正在学习
</span>
</div>
</div>
<div class="home_divider divider"></div>
</div>
</a>
</volist>
<!-- 精选真题 -->
<div class="home_list_part" style="margin-top: 1rem;">
<div class="home_list_header layout_h">
<div class="home_list_header_v_line"></div>
<span class="text_16_600 color_333333 self_center" style="margin-left: 0.5rem;">精选真题</span>
<div class="layout_h_r weight_full self_center">
<van-icon name="__THEME__/img/tiny_right_arrow.png" class="self_center"></van-icon>
<span class="text_12_400 color_999999 self_center">查看全部</span>
</div>
</div>
</div>
<volist name="exams.data" id="vo" offset="0" length='4'>
<div class="layout_v home_question_item">
<div class="layout_h">
<if condition="$vo['price'] eq 0">
<div class="home_item_mark_green layout_center">免费</div>
<else />
<div class="home_item_mark_orange layout_center">付费</div>
</if>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-right: 1.5rem;margin-left: 0.625rem;">{$vo['exams_paper_title']}</span>
<if condition="$vo['price'] eq 0">
<div @click="onStart({$vo['exams_paper_id']})" class="home_button_green layout_center">开始做题</div>
<else />
<div @click="onPay({$vo['exams_paper_id']})" class="home_button_orange layout_center">¥{$vo['price']}</div>
</if>
</div>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B"><if condition="$vo['price'] eq 0">免费<else />¥{$vo['price']}</if></span>
<van-image src="__THEME__/img/down_load_icon.png" width="13" height="16" ></van-icon>
</div>
<div class="home_divider divider"></div>
</div>
</volist>
</div>
</eq>
</volist>
</div>
<div>
<van-tabbar
v-model="active"
@change="onChange"
:fixed="true"
:route="false"
:safe-area-inset-bottom="true"
active-color="#65C000"
inactive-color="#363636">
<van-tabbar-item>
<span class="text_10_400">名师课堂</span>
<template #icon="props">
<a href="{:U('classroom/Index/index')}">
<img :src="props.active ? '__THEME__/img/minshi.png' : '__THEME__/img/minshi_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">真题题库</span>
<template #icon="props">
<a href="{:U('home/Home/exams')}">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">考试咨询</span>
<template #icon="props">
<a href="{:U('classroom/Index/find')}">
<img :src="props.active ? '__THEME__/img/zixun.png' : '__THEME__/img/zixun_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">会员中心</span>
<template #icon="props">
<if condition="$_SESSION['mid']">
<a href="{:U('home/User/index')}">
<else/>
<a href="{:U('basic/Passport/login')}">
</if>
<img :src="props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'" />
</a>
</template>
</van-tabbar-item>
</van-tabbar>
</div>
</div>
<!-- <include file="__THEME__/public_footer_w3g" /> -->
<script type="text/javascript">
new Vue({
el: '#app',
data: function() {
return {
active: 0
}
},
created:function(){
let j = {:json_encode($exams)};
console.log(j)
},
methods: {
onChange: function(tab) {
},
onPay: function(id) {
console.log("Id = " + id)
if(MID<=0) {
ui.confirm('请先登录', {
yes: function () {
window.location.href = "{:U('basic/Passport/login')}";
}
})
return
}
$.ajax({
type: "POST",
url: "{:U('exams/index/getPayUrl')}",
data:{
paper_id: id,
},
dataType:"json",
success:function(res){
var res = getResponseData(res)
if(res.status == 1){
window.location.href = res.data
}else{
ui.error(res.message)
}
}
})
},
onStart: function(id) {
if(MID<=0) {
ui.confirm('请先登录', {
yes: function () {
window.location.href = "{:U('basic/Passport/login')}";
}
})
return
}
let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + id + "&joinType=1"
window.location.href = url
}
}
})
<include file="__THEME__/public_header_w3g" />
<div id="app">
<div class="layout_v tab_container">
<!--search-->
<a href="{:U('classroom/Index/search')}">
<van-search style="padding-bottom: 0 !important;" left-icon="__THEME__/img/serch@3x.png" readonly shape="round"
background="#FFFFFF" placeholder="搜索课程...">
</van-search>
</a>
<!--banner start-->
<van-swipe class="home_swapper" indicator-color="white">
<volist name="ad_list" id="adlt">
<van-swipe-item>
<a class="home_swapper_image" href="{$adlt['bannerurl']}" title="{$adlt['banner_title']}">
<van-image width="100%" height="100%" fit="cover" src="{:getCover($adlt['banner'],720,300)}" />
</a>
</van-swipe-item>
</volist>
</van-swipe>
<volist name="config_index.item" id="item_name">
<eq name="item_name" value="category">
<!-- 分类 -->
<div class="layout_h scroll_h">
<volist name="re_cate" id="vo" offset="0" length='8'>
<div class="layout_center">
<a href="{:U('course/Video/index',array('cateId'=>$vo['full_cate']))}">
<div class="layout_v" style="width: 5.375rem;">
<van-image class="self_center" height="45" width="45" src="{:getCover($vo['middle_ids'],45,45)}">
</van-image>
<span class="text_12_400 color_333333 self_center" style="margin-top: 0.125rem;">{$vo['title']}</span>
</div>
</a>
</div>
</volist>
</div>
</eq>
<eq name="item_name" value="bestCourse_new">
<!-- 精选课程 -->
<div class="home_list_part" style="margin-top: 2.125rem;">
<div class="home_list_header layout_h">
<div class="home_list_header_v_line"></div>
<span class="text_16_600 color_333333 self_center" style="margin-left: 0.5rem;">精选课程</span>
<div class="layout_h_r weight_full self_center">
<van-icon name="__THEME__/img/tiny_right_arrow.png" class="self_center"></van-icon>
<a href="{:U('course/Video/index', array('best'=>1))}"><span class="text_12_400 color_999999 self_center">查看全部</span></a>
</div>
</div>
</div>
<div class="layout_v">
<volist name="bestVideo" id="vo" offset="0" length='4'>
<a href="{:U('course/Video/view',array('id'=>$vo['id']))}">
<div class="home_class_item layout_v">
<div class="layout_h">
<van-image style="margin-right: 0.75rem;" height="72" width="128" fit="cover" src="{:getCover($vo['cover'] ,580 , 320 )}">
</van-image>
<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_FF3B3B" style="margin-top: 0.5rem;">
<if condition="$vo['t_price'] eq 0">免费
<else />¥{$vo['t_price']}</if>
</span>
<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>人正在学习
</span>
</div>
</div>
<div class="home_divider divider"></div>
</div>
</a>
</volist>
<!-- 精选真题 -->
<div class="home_list_part" style="margin-top: 1rem;">
<div class="home_list_header layout_h">
<div class="home_list_header_v_line"></div>
<span class="text_16_600 color_333333 self_center" style="margin-left: 0.5rem;">精选真题</span>
<div class="layout_h_r weight_full self_center">
<van-icon name="__THEME__/img/tiny_right_arrow.png" class="self_center"></van-icon>
<span class="text_12_400 color_999999 self_center">查看全部</span>
</div>
</div>
</div>
<volist name="exams.data" id="vo" offset="0" length='4'>
<div class="layout_v home_question_item">
<div class="layout_h">
<if condition="$vo['price'] eq 0">
<div class="home_item_mark_green layout_center">免费</div>
<else />
<div class="home_item_mark_orange layout_center">付费</div>
</if>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-right: 1.5rem;margin-left: 0.625rem;">{$vo['exams_paper_title']}</span>
<if condition="$vo['price'] eq 0">
<div @click="onStart({$vo['exams_paper_id']})" class="home_button_green layout_center">开始做题</div>
<else />
<div @click="onPay({$vo['exams_paper_id']})" class="home_button_orange layout_center">¥{$vo['price']}</div>
</if>
</div>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B">
<if condition="$vo['price'] eq 0">免费
<else />¥{$vo['price']}</if>
</span>
<van-image src="__THEME__/img/down_load_icon.png" width="13" height="16">
</van-icon>
</div>
<div class="home_divider divider"></div>
</div>
</volist>
</div>
</eq>
</volist>
</div>
<div>
<van-tabbar v-model="active" @change="onChange" :fixed="true" :route="false" :safe-area-inset-bottom="true"
active-color="#65C000" inactive-color="#363636">
<van-tabbar-item>
<span class="text_10_400">名师课堂</span>
<template #icon="props">
<a href="{:U('classroom/Index/index')}">
<img :src="props.active ? '__THEME__/img/minshi.png' : '__THEME__/img/minshi_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">真题题库</span>
<template #icon="props">
<a href="{:U('home/Home/exams')}">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">考试咨询</span>
<template #icon="props">
<a href="{:U('classroom/Index/find')}">
<img :src="props.active ? '__THEME__/img/zixun.png' : '__THEME__/img/zixun_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
<span class="text_10_400">会员中心</span>
<template #icon="props">
<if condition="$_SESSION['mid']">
<a href="{:U('home/User/index')}">
<else />
<a href="{:U('basic/Passport/login')}">
</if>
<img :src="props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'" />
</a>
</template>
</van-tabbar-item>
</van-tabbar>
</div>
</div>
<!-- <include file="__THEME__/public_footer_w3g" /> -->
<script type="text/javascript">
new Vue({
el: '#app',
data: function() {
return {
active: 0
}
},
created: function() {
let j = {: json_encode($exams)
};
console.log(j)
},
methods: {
onChange: function(tab) {
},
onPay: function(id) {
console.log("Id = " + id)
if (MID <= 0) {
ui.confirm('请先登录', {
yes: function() {
window.location.href = "{:U('basic/Passport/login')}";
}
})
return
}
$.ajax({
type: "POST",
url: "{:U('exams/index/getPayUrl')}",
data: {
paper_id: id,
},
dataType: "json",
success: function(res) {
var res = getResponseData(res)
if (res.status == 1) {
window.location.href = res.data
} else {
ui.error(res.message)
}
}
})
},
onStart: function(id) {
if (MID <= 0) {
ui.confirm('请先登录', {
yes: function() {
window.location.href = "{:U('basic/Passport/login')}";
}
})
return
}
let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + id + "&joinType=1"
window.location.href = url
}
}
})
</script>
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