Commit 994389c4 by 陈超

A

parent 31ca24a1
<div v-if="showEmpty" class="empty_container text_12_400 color_999999">暂无内容</div>
\ No newline at end of file
<include file="__THEME__/public_header_w3g" />
<script src="__THEMEW3G__/js/flexible.js"></script>
<link rel="stylesheet" href="__APP__/css/collect_w3g.css">
<div class="bar-nav">
<a href="{:U('home/User/index')}" class="bar-btn eduline-v4 v4-iconfont-houtui"></a>
<div class="bar-title">我的收藏</div>
</div>
<div class="page">
<div class="navbar">
<div class="tab-item <if condition=" $_GET['tab'] eq null">is-selected</if>"
onclick="window.location.href='{:U('home/Home/collect')}'">资讯</div>
<php>if(OPEN_SCHOOL){</php>
<div class="tab-item <if condition=" $_GET['tab'] eq 1">is-selected</if>"
onclick="window.location.href='{:U('home/Home/collect',['tab'=>1])}'">机构</div>
<php>}</php>
</div>
<div class="collect">
<if condition="$data['data'] eq null">
<include file="__THEME__/no_data" />
<else/>
<div class="collect-institut">
<if condition="$_GET['tab'] eq null">
<!-- 资讯 -->
<foreach name="data['data']" item="l" key="k">
<div class="informat-item">
<div class="pic">
<img class="lazyload" data-original="" alt="" src="{:getCover($l['image'],150,90)}">
</div>
<div class="info">
<div class="name"><a href="{:U('news/Topic/view',array('id'=>$l['source_id']))}">{$l.topictitle|mStr=28}</a></div>
<div class="cancel">
<span class="time">{$l.ctime|friendlyDate}</span>
<span class="browse">
<i class="eduline-v4 v4-iconfont-liulan1"></i>{$l.commentcount}
</span>
</div>
</div>
</div>
</foreach>
<else/>
<!-- 机构 -->
<foreach name="data['data']" item="l" key='k'>
<div class="institut-item">
<div class="pic">
<img class="lazyload" data-original="" alt="" src="{:getCover($l['cover'],60,60)}">
</div>
<div class="name">{$l.title}</div>
<div class="cancel"><a href="javascript:;" onclick="delCollect('{$l[\'collection_id\']}','school')" >取消收藏</a></div>
</div>
</foreach>
</if>
</div>
<if condition="$data['data']">
<div class="loadding">
<if condition="$data['nowPage'] eq $data['totalPages']">
<div>再拉也没有了</div><else/>正在加载更多。。
</if>
</div>
<a class="backtop"></a>
</if>
</if>
</div>
</div>
<script>
$(function () {
var p = 1;
var tab = "{$_GET['tab']}";
$(window).scroll(function() {
var scrollTop = $(this).scrollTop();
var scrollHeight = $(document).height();
var windowHeight = $(this).height();
if (scrollHeight - (scrollTop + windowHeight) <60 ) {
if(!p || p >= parseInt("{$data['totalPages']}")){
$('.loadding').html('<div>再拉也没有了</div>');
return false;
}else{
p = p+1;
ajaxData();
}
}
});
//请求事件
function ajaxData(){
$.ajax({
type: "GET",
url:"{:U('home/Home/collect')}",
data:"p="+p+"&tab="+tab,
dataType:"json",
success:function(data){
$(".collect-institut").append(data.data);
if(!p || p >= data.totalPages){
$('.loadding').html('<div>再拉也没有了</div>')
return false;
}else{
p = data.nowPage;//下一页
}
}
});
}
});
//取消收藏
function delCollect(collection_id,tableName){
ui.confirm('确定要取消收藏机构吗?', {
yes: function () {
$.post("{:U('home/Home/delCollect')}", {id:collection_id,tableName:tableName}, function(res){
if(res==200){
ui.success("取消收藏成功", {
end: function() {
location.reload();
}
});
return false;
}else{
ui.error("取消收藏失败请重试!");
return false;
}
});
}
});
}
</script>
<include file="__THEME__/public_footer_w3g" />
<include file="__THEME__/public_header_w3g"/>
<link rel="stylesheet" href="__APP__/css/order_w3g.css">
<div style="position:relative;" class="header2">
<img src="__THEME__/images/orderbanner.png"></img>
<a href="{:U('home/User/index')}" class="iconfontNEW">&#xe682;</a>
<p>我的订单 </p>
<ul class="fqalistnavNEW">
<li <php> if(!$_GET['ordertype'] || $_GET['ordertype'] == 'course') {</php> echo class="on" ; <php>}</php> >
<a href="{:U('home/Home/order',array('ordertype'=>'course'))}" class="iconfontNEW">&#xe6af;</a>
<a href="{:U('home/Home/order',array('ordertype'=>'course'))}" >点播订单</a>
</li>
<li <php> if($_GET['ordertype'] == 'live') {</php> echo class="on" ; <php>}</php> >
<a href="{:U('home/Home/order',array('ordertype'=>'live'))}" class="iconfontNEW">&#xe6ac;</a>
<a href="{:U('home/Home/order',array('ordertype'=>'live'))}" >直播订单</a>
</li>
<li <php> if($_GET['ordertype'] == 'teacher') {</php> echo class="on" ; <php>}</php> >
<a href="{:U('home/Home/order',array('ordertype'=>'teacher'))}" class="iconfontNEW">&#xe6ad;</a>
<a href="{:U('home/Home/order',array('ordertype'=>'teacher'))}" >线下课订单</a>
</li>
<li <php> if($_GET['ordertype'] == 'album') {</php> echo class="on" ; <php>}</php> >
<a href="{:U('home/Home/order',array('ordertype'=>'album'))}" class="iconfontNEW">&#xe6ad;</a>
<a href="{:U('home/Home/order',array('ordertype'=>'album'))}" >套餐订单</a>
</li>
<li <php> if($_GET['ordertype'] == 'classes') {</php> echo class="on" ; <php>}</php> >
<a href="{:U('home/Home/order',array('ordertype'=>'classes'))}" class="iconfontNEW">&#xe6ad;</a>
<a href="{:U('home/Home/order',array('ordertype'=>'classes'))}" >班级订单</a>
</li>
<li <php> if($_GET['ordertype'] == 'exams') {</php> echo class="on" ; <php>}</php> >
<a href="{:U('home/Home/order',array('ordertype'=>'exams'))}" class="iconfontNEW">&#xe6ad;</a>
<a href="{:U('home/Home/order',array('ordertype'=>'exams'))}" >考试订单</a>
</li>
</ul>
</div>
<div class="body">
<!--<input type ="hidden" id= "ordertype" <php>if(!$_GET['ordertype'] || $_GET['ordertype'] == 'course') {</php> echo value="course" ; <php>} else if($_GET['ordertype'] == 'live') {</php> echo value="live" ; <php>} else if($_GET['ordertype'] == 'teacher') {</php> echo value="teacher" ; <php>}</php>/>-->
<input type ="hidden" id= "ordertype" <if condition="$_GET['ordertype'] neq ''">value="{$_GET['ordertype']}"<else/>value="course"</if>/>
<input type ="hidden" id= "orderby" value ="0" />
<ul class="orderlistnav">
<li class="choose <eq name='orderby' value=''>on</eq>"><a href="{:U('home/Home/order')}" ><span class="iconfontNEW" >&#xe6b5;</span>全部</a></li>
<li class="choose <eq name='orderby' value='1'>on</eq>"><a href="{:U('home/Home/order',array('orderby'=>1,'ordertype' => $_GET['ordertype']))}" ><span class="iconfontNEW">&#xe954;</span>未支付</a></li>
<li class="choose <eq name='orderby' value='2'>on</eq>"><a href="{:U('home/Home/order',array('orderby'=>2,'ordertype' => $_GET['ordertype']))}" ><span class="iconfontNEW">&#xe709;</span>已取消</a></li>
<li class="choose <eq name='orderby' value='3'>on</eq>"><a href="{:U('home/Home/order',array('orderby'=>3,'ordertype' => $_GET['ordertype']))}" ><span class="iconfontNEW">&#xe6b7;</span>已支付</a></li>
<li class="choose <eq name='orderby' value='5'>on</eq>"><a href="{:U('home/Home/order',array('orderby'=>5,'ordertype' => $_GET['ordertype']))}" ><span class="iconfontNEW">&#xe6ba;</span>已退款</a></li>
<!--<li><a href="#">已发货</a></li>-->
</ul>
<ul class="orderlist">
<if condition="$data['data'] neq ''">
<volist name="data.data" id="l">
<li>
<div class="top">
<span>
<switch name="l.pay_status">
<case value="2">已取消</case>
<case value="3|9">已支付</case>
<case value="5">已退款</case>
<default/>未支付
</switch>
</span>
<a .chref="javascript:;">{$l.ctime|date="Y-m-d",###}</a>
</div>
<div class="mid">
<div>
<div>
<php>if($ordertype == 'course') { </php>
<a href="{:U('course/Video/view',array('id'=>$l['video_id']))}">
<php> } else if($ordertype == 'live'){</php>
<a href="{:U('live/index/view',array('id'=>$l['live_id']))}">
<php> } else if($ordertype == 'teacher'){</php>
<a href="{:U('course/LineClass/view',array('id'=>$l['video_id']))}">
<php> } else if($ordertype == 'album'){</php>
<a href="{:U('course/Album/view',array('id'=>$l['album_id']))}">
<php> } else if($ordertype == 'exams'){</php>
<a href="javascript:;">
<php>}</php>
<php>if($ordertype != 'exams') { </php>
<img src="{:getCover($l['cover'],580,320)}" style="max-width:151px" alt="{:mStr($l['video_name'],12)}" />
<php>} </php>
<p class="text1">
<if condition="$l['video_name']">
<a>{$l.video_name|mStr=8}</a>
</if>
<if condition="$l['course_hour_title']">
<a>{$l.course_hour_title|mStr=4}</a>
</if>
<span>¥{$l.price}</span></p>
<p class="text2">有效期:<php>if($l['time_limit']){echo date('y-m-d',$l['time_limit']);}else{echo '永久';}</php></p>
</a>
<if condition="$check_type">
<if condition="$l['pay_status'] eq 1">
<form <if condition="$ordertype eq 'exams'">action="{:U('exams/Index/pay',['vst'=>$l['order']])}"<else/>action="{:U('course/PayVideo/index',['vst'=>$l['order']])}" </if> method="POST" class="pay_form">
<input type="hidden" value="{$l.course_id}" name="vid" />
<input type="hidden" value="{$check_type}" name="check_type" />
<input type="hidden" value="ConPay" name="type" />
<input type="hidden" id="money" value="{$l['price']}" name="money" />
<a href="javascript:;" id ="{$l.id}" class="but quxiao" onclick ="delCancel(this.id)">取消订单</a>
<a href="javascript:;" class="but jixu" id="charge_video" data-id="{$l.coupon_id}">继续支付</a>
<!--<a href="javascropt:;">评价课程</a>-->
</form>
</if>
<if condition="$l['pay_status'] eq 2">
<form <if condition="$ordertype eq 'exams'">action="{:U('exams/Index/pay',['vst'=>$l['pay_url']])}"<else/>action="{:U('course/PayVideo/index',['vst'=>$l['pay_url'], 'asb'=>$l['asb_params']])}" </if> method="POST" class="pay_form">
<input type="hidden" value="{$l.course_id}" name="vid" />
<input type="hidden" value="{$check_type}" name="check_type" />
<input type="hidden" id="money" value="{$l['price']}" name="money" />
<a href="javascript:;" class="but" id="charge_video2">重新购买</a>
<a href="javascript:;" class="but del" id ="{$l.id}" onclick ="delOrder(this.id)">删除订单</a>
</form>
</if>
<if condition="$l['pay_status'] eq 3">
<if condition="$l['price'] gt 0 AND $refund_switch eq 1 AND $l['refund_ptime_over'] eq 0">
<a href="javascript:;" class="but" id ="{$l.id}" onclick ="applyForRefund(this.id)">申请退款</a>
</if>
<a href="javascript:;" class="but del" id ="{$l.id}" onclick ="delOrder(this.id)">删除订单</a>
</if>
<if condition="$l['pay_status'] eq 4">
<a href="javascript:;" class="outkuan">退款审核中。。</a>
<a href="javascript:;" class="but" id ="{$l.id}" onclick ="withdraw(this.id)">取消申请</a>
</if>
<if condition="$l['pay_status'] eq 5">
<a href="javascript:;" class="but del" id ="{$l.id}" onclick ="delOrder(this.id)">删除订单</a>
<a href="javascript:;" id ="{$l.id}" style="color: green;">退款成功</a>
</if>
<if condition="$l['pay_status'] eq 6">
<a href="javascript:;" id ="{$l.id}" onclick = checkResigInfo(this.id,"{$check_type}")>查看驳回原因</a>
<if condition="$refund_switch eq 1">
<a href="javascript:;" id ="{$l.id}" onclick ="applyForRefund(this.id)">重新申请退款</a>
</if>
</if>
</if>
</div>
</div>
</a>
</div>
</li>
</volist>
<else/>
<include file="__THEME__/no_data_w3g" />
</if>
</ul>
</div>
<if condition="$data['data']">
<div class="loadding">
<if condition="$data['nowPage'] eq $data['totalPages']">
<div>再拉也没有了。。</div><else/>正在加载更多。。
</if>
</div>
<a class="backtop"></a>
</if>
<script>
var type;
var p = 1;
$(function() {
$(".header").hide();
$(window).scroll(function () {
//已经滚动到上面的页面高度
var scrollTop = $(this).scrollTop();
//页面高度
var scrollHeight = $(document).height();
//浏览器窗口高度
var windowHeight = $(this).height();
//此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
if (scrollHeight - (scrollTop + windowHeight)<60) {
if(!p || p >= "{$data['totalPages']}"){
$('.loadding').html('<div>再拉也没有了。。</div>');
return false;
}else{
p = p + 1;
ajaxBang();
}
}
});
});
//请求事件
function ajaxBang(url,type,orderby){
orderby = $('#orderby').val();
type = $('#ordertype').val();
$.ajax({
type: "GET",
url:"{:U('home/Home/getOrderlist')}",
data:"p="+p+"&type="+type+"&orderby="+orderby,
dataType:"json",
success:function(data){
appendHtml(data,type);
}
});
}
//追加html
function appendHtml(data){
$(".orderlist").append(data.data);
if(!p || p >= data.totalPages){
$('.loadding').html('<div>再拉也没有了。。</div>')
return false;
}
}
function delCancel(ids) {
orderby = $('#orderby').val();
type = $('#ordertype').val();
ui.confirm('你确定要取消这个订单?', {
yes: function () {
$.ajax({
type: "POST",
url: "{:U('home/Home/delCancel')}",
data: "ids=" + ids + "&type=" + type + "&orderby=" + orderby,
dataType: "json",
success: function (data) {
if(data.status == 1){
ui.success(data.info, {
end: function() {
location.reload();
}
});
return false;
}else{
ui.error(data.info);
return false;
}
}
});
}
});
}
function delOrder(ids) {
orderby = $('#orderby').val();
type = $('#ordertype').val();
ui.confirm('你确定要删除这个订单?', {
yes: function () {
$.ajax({
type: "POST",
url: "{:U('home/Home/delOrder')}",
data: "ids=" + ids + "&type=" + type + "&orderby=" + orderby,
dataType: "json",
success: function (data) {
location.reload();
}
});
}
});
}
function checkResigInfo(id,type) {
if(uid<=0){
reg_login();
return false;
}
if(!id){
ui.error("参数错误");
return false;
}
$.post("{:U('home/Home/getrejectinfo')}", {id:id,type:type}, function (e) {
if(e.status == 1){
layer.open({
title:'驳回原因',
content: "驳回原因:"+e.info,
btn: '我知道了'
});
}else{
ui.error(e.info);
}
}, 'json');
}
function withdraw(ids) {
orderby = $('#orderby').val();
type = $('#ordertype').val();
ui.confirm('你确定要取消申请退款?', {
yes: function () {
$.ajax({
type: "POST",
url: "{:U('home/Home/withdraw')}",
data: "ids=" + ids + "&type=" + type + "&orderby=" + orderby,
dataType: "json",
success: function (data) {
if(data.status == 1){
ui.success(data.info);
location.reload();
}else{
ui.error(data.info);
}
}
});
}
});
}
"<php>if($refund_switch == 1){</php>"
function applyForRefund(ids) {
type = $('#ordertype').val();
$.post(U('home/Home/doApplyFR'),
{id: ids, order_type: type, status: 1}, function (res) {
res = JSON.parse(res);
if (res.status == 1) {
$.get(U('home/Home/refundBox'),{id: ids, type: type,from:'h5'},function(e){
e = JSON.parse(e);
// $(".hide_box_h5").fadeToggle();
// $(".ts_box_h5").fadeToggle();
$('body').append(e.info);
});
return false;
} else {
ui.error(res.info);
return false;
}
});
}
"<php>}</php>"
$(function(){
$(".hide_box_h5").fadeToggle();
$(".ts_box_h5").fadeToggle();
});
var uid = '{$uid}';
//购买操作
$('#charge_video,#charge_video2').click(function () {
if(uid<=0){
reg_login();
return false;
}
var form = $(this).parents('form');
var vid = form.find('input:hidden[name="vid"]').val();
var vtype = form.find('input:hidden[name="check_type"]').val();
if(!vid || !vtype){
ui.error('参数错误');
return false;
}
var money = form.find('input:hidden[name="money"]').val();
if(money <= 0){
ui.error('此课程不需要您购买');
return false;
}
$.post(U("course/PayVideo/checkPay"),form.serialize(),function(data){
if(data.status == 1){
window.location.href = form.attr('action');
} else if(data.status == 9){
ui.error(data.info);
window.location.reload();
} else {
ui.error(data.info);
return false;
}
},'json');
});
//头部点击事件
function navClick(cate,type){
$(".comment_list").html("");
type=type;
$('#ordertype').val(type);
$("li").removeClass("on");
$(cate).parent("li").addClass("on");
p=1;
ajaxBang('',type);
}
</script>
<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