Commit e56e34bb by 陈超

A

parent b774f1e8
<include file="__THEME__/public_header_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>/>--> <div id="app">
<input type ="hidden" id= "ordertype" <if condition="$_GET['ordertype'] neq ''">value="{$_GET['ordertype']}"<else/>value="course"</if>/> <div class="layout_v">
<van-tabs
<input type ="hidden" id= "orderby" value ="0" /> :border="false"
<ul class="orderlistnav"> v-model="tab"
<li class="choose <eq name='orderby' value=''>on</eq>"><a href="{:U('home/Home/order')}" ><span class="iconfontNEW" >&#xe6b5;</span>全部</a></li> sticky
<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> @change="onTopTab"
<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> line-width="72px"
<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> line-height="4px"
<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> background="white"
<!--<li><a href="#">已发货</a></li>--> color="#A3E460"
</ul> title-inactive-color="#333333"
<ul class="orderlist"> title-active-color="#A3E460">
<if condition="$data['data'] neq ''">
<volist name="data.data" id="l"> <van-tab>
<li>
<div class="top"> <span slot="title" v-bind:class="tab == 0 ? 'tab_text_selected' : 'tab_text_normal'">
<span> 待支付
<switch name="l.pay_status"> </span>
<case value="2">已取消</case>
<case value="3|9">已支付</case> </van-tab>
<case value="5">已退款</case>
<default/>未支付 <van-tab>
</switch>
</span> <span slot="title" v-bind:class="tab == 0 ? 'tab_text_selected' : 'tab_text_normal'">
<a .chref="javascript:;">{$l.ctime|date="Y-m-d",###}</a> 待发货
</div> </span>
<div class="mid">
<div> </van-tab>
<div>
<php>if($ordertype == 'course') { </php> <van-tab>
<a href="{:U('course/Video/view',array('id'=>$l['video_id']))}">
<php> } else if($ordertype == 'live'){</php> <span slot="title" v-bind:class="tab == 0 ? 'tab_text_selected' : 'tab_text_normal'">
<a href="{:U('live/index/view',array('id'=>$l['live_id']))}"> 待收货
<php> } else if($ordertype == 'teacher'){</php> </span>
<a href="{:U('course/LineClass/view',array('id'=>$l['video_id']))}">
<php> } else if($ordertype == 'album'){</php> </van-tab>
<a href="{:U('course/Album/view',array('id'=>$l['album_id']))}">
<php> } else if($ordertype == 'exams'){</php> <van-tab>
<a href="javascript:;">
<php>}</php> <span slot="title" v-bind:class="tab == 0 ? 'tab_text_selected' : 'tab_text_normal'">
已完成
<php>if($ordertype != 'exams') { </php> </span>
<img src="{:getCover($l['cover'],580,320)}" style="max-width:151px" alt="{:mStr($l['video_name'],12)}" />
<php>} </php> </van-tab>
<p class="text1">
<if condition="$l['video_name']"> <van-tab>
<a>{$l.video_name|mStr=8}</a>
</if> <span slot="title" v-bind:class="tab == 0 ? 'tab_text_selected' : 'tab_text_normal'">
<if condition="$l['course_hour_title']"> 已取消
<a>{$l.course_hour_title|mStr=4}</a> </span>
</if>
<span>¥{$l.price}</span></p> </van-tab>
<p class="text2">有效期:<php>if($l['time_limit']){echo date('y-m-d',$l['time_limit']);}else{echo '永久';}</php></p>
</a> </van-tabs>
<if condition="$check_type"> </div>
<if condition="$l['pay_status'] eq 1"> </div>
<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> <script>
var type;
var p = 1; new Vue({
el: "#app",
$(function() { data: function() {
$(".header").hide(); return {
$(window).scroll(function () { tab: 0,
//已经滚动到上面的页面高度 innerTab: 0
var scrollTop = $(this).scrollTop(); }
//页面高度 },
var scrollHeight = $(document).height(); mounted:function(){
//浏览器窗口高度 $("#preloader").hide()
var windowHeight = $(this).height(); },
//此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作 methods: {
if (scrollHeight - (scrollTop + windowHeight)<60) { onTopTab: function(tab) {
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> </script>
<include file="__THEME__/public_footer_w3g"/> <include file="__THEME__/public_footer_w3g"/>
<include file="__THEME__/public_header_w3g" /> <include file="__THEME__/public_header_w3g" />
<style> <style>
body { body {
padding: 0 !important; padding: 0 !important;
} }
</style> </style>
<div id="app"> <div id="app">
<div class="layout_v">
</div> <van-field v-model="content" type="textarea" autosize rows="5" placeholder="请输入您的建议…"></van-field>
<van-uploader :after-read="afterRead" result-type="file" style="margin-left: 0.75rem;">
<script type="text/javascript"> <div class="layout_h_c" style="position: relative;">
<van-image width="108" width="108" :src="uploadImage"></van-image>
<span v-if="showIcon" class="text_14_400 color_primary" style="position: absolute;left: 1.625rem;bottom: 1.875rem;">上传图片</span>
</div>
</van-uploader>
</div>
<div @click="onConfirm" class="confirm_button" style="margin-top: 5rem;">
<span>提交</span>
</div>
</div>
<script type="text/javascript">
new Vue({ new Vue({
el: "#app", el: "#app",
data: function() { data: function() {
return { return {
content: "",
savedUrl: "",
uploadImage: "__THEME__/img/upload_icon.png"
} }
}, },
mounted:function(){ created:function(){
document.title = "意见反馈" document.title = "意见反馈"
}, },
computed: {
showIcon: function() {
return this.savedUrl.length == 0
}
},
methods: { methods: {
onChangePwd: function() { onConfirm: function() {
window.location.href = "{:U('home/Repwd/index')}"
},
afterRead: function(r) {
let that = this
let formData = new FormData()
formData.append('file', r.file)
let url = U('widget/Upload/save') + '&attach_type=avatar&upload_type=image&thumb=1&width=108&height=108&cut=false'
$.ajax({
url: url,
type: "post",
data: formData,
contentType: false,
processData: false,
success: function(res) {
let result = JSON.parse(res)
if(result.status == 1) {
that.uploadImage = result.data.src
that.savedUrl = result.data.save_path + result.data.save_name
} else {
ui.error('上传失败')
}
},
error: function(data) {
ui.error('上传失败')
}
})
} }
} }
}) })
</script>
</script>
<include file="__THEME__/public_footer_w3g" />
<include file="__THEME__/public_footer_w3g"/>
...@@ -22,31 +22,31 @@ ...@@ -22,31 +22,31 @@
</div> </div>
<div class="center_order_part layout_h"> <div class="center_order_part layout_h">
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/wait_pay.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/wait_pay.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">待支付</span> <span class="self_center text_12_400 color_333333 center_top_order_text">待支付</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/wait_send.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/wait_send.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">待发货</span> <span class="self_center text_12_400 color_333333 center_top_order_text">待发货</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div @click="onTabOrder" class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/wait_receive.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/wait_receive.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">待收货</span> <span class="self_center text_12_400 color_333333 center_top_order_text">待收货</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/finished.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/finished.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">已完成</span> <span class="self_center text_12_400 color_333333 center_top_order_text">已完成</span>
</div> </div>
</div> </div>
<div class="center_order_item layout_center weight_full"> <div @click="onTabOrder" class="center_order_item layout_center weight_full">
<div class="layout_v"> <div class="layout_v">
<van-icon class="self_center" size="24" name="__THEME__/img/cancelled.png" ></van-icon> <van-icon class="self_center" size="24" name="__THEME__/img/cancelled.png" ></van-icon>
<span class="self_center text_12_400 color_333333 center_top_order_text">已取消</span> <span class="self_center text_12_400 color_333333 center_top_order_text">已取消</span>
...@@ -455,6 +455,9 @@ ...@@ -455,6 +455,9 @@
}, },
onCellTap: function(url) { onCellTap: function(url) {
window.location.href = url window.location.href = url
},
onTabOrder: function() {
window.location.href = "{:U('home/Home/order')}"
} }
} }
}) })
......
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