|
- var login_data = getStorJson("login_data");
- var curpage = 1;
- var pagesize = 10;
- $(document).ready(function(){
- order_list();
-
- $(window).scroll(function() {
- if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
- curpage += 1;
- order_list();
- }
- });
-
- })
-
- function order_list(){
- $.ajax({
- url:'./zz-fx/control.php',
- data:{type:"distribut_OrderList",currpage:curpage,pagesize:pagesize},
- type:"post",
- dataType: "json",
- success: function (data) {
- console.log(data);
- if(data.code == 0){
- createHtml(data.searchInfo);
-
- }
- },
- fail: function (date) {
-
- alert("数据加载失败");
-
- }
-
- });
- }
-
-
- function createHtml(data){
- var temp="";
- var ind = "";
- for(var i = 0;i<data.length;i++){
- if(data[i].go_pay==0){
- ind = "";
- }else if(data[i].go_pay==1){
- ind = '<div style="width:1%;" order_id="'+data[i].order_id+'" ifdisney="'+data[i].ifdisney+'" class="ub-f1 text_middle ui_btn_border ui_p_l10 ui_p_r10 ui_p_t05 ui_p_b05 gopay_ticket">去支付</div>'
- }else{
- ind = '<div style="width:1%;" order_id="'+data[i].order_id+'" class="ub-f1 text_middle ui_btn_border ui_p_l10 ui_p_r10 ui_p_t05 ui_p_b05 exit_ticket">退票</div>'
- }
- if(data[i].ifdisney==1){
- temp += '<div class="umar-a-15 sg-bg ub ub-ver">'
- + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
- + '<div style="width: 1%;" class="ub-f2 ui_p_t15 ui_p_b15">'
- +'<span>'+data[i].pic_type+'</span><span>('+data[i].order_id+')</span>'
- + '</div>'
- + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_pay_type+'</div>'
- + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_status+'</div>'
- + '</div>'
- + '<div class="ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border ">'
- + '<div class=" ui_p_t15 ">'+data[i].product_info+'</div>'
- + '<div class=" ui_p_t10 ui_p_b15">'
- + '<span>'+data[i].run_time+' 出发</span>'
- + '<span class="ui_p_l20">'+data[i].tic_info+'</span>'
- + '</div>'
- + '</div>'
- + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
- + '<div class="ui_p_b15 ui_p_t15" id="">'
- + '<div id="">'
- + '<span>联 系 人:</span>'
- + '<span class="ui_p_l10">'+data[i].customer_name+'</span>'
- + '<span class="ui_p_l15">'+data[i].customer_mobile+'</span>'
- + '</div>'
- + '</div>'
- + '</div>'
- + '<div class="ub ub-f1 ui_m_l10 ui_m_r10">'
- + '<div class="ub ub-f1 ui_p_b10 ui_p_t10" id="">'
- + '<div class="ub-f3 ui_p_t05 ui_p_b05" style="font-size: 0.14rem;width:1%;">¥'+data[i].order_pay+'</div>'
- + ind
- + '</div>'
- + '</div>'
- + '</div>'
- }else if(data[i].ifdisney==0){
- temp += '<div class="umar-a-15 sg-bg ub ub-ver">'
- + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
- + '<div style="width: 1%;" class="ub-f2 ui_p_t15 ui_p_b15">'
- + '<span>'+data[i].pic_type+'</span><span>('+data[i].order_id+')</span>'
- + '</div>'
- + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_pay_type+'</div>'
- + '<div style="width: 1%;" class="ub-f1 text_right ui_p_t15 ui_p_b15">'+data[i].order_status+'</div>'
- + '</div>'
- + '<div class="ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border ">'
- + '<div class=" ui_p_t15 ">'
- + '<span>'+data[i].product_info+'</span>'
- + '<span class="ui_p_l20">7月28日 出发</span>'
- + '</div>'
- + '<div class=" ui_p_t10 ui_p_b15">'
- + '<span>'+data[i].tic_info+'</span>'
- + '</div>'
- + '</div>'
- + '<div class="ub ub-f1 ui_m_l10 ui_m_r10 ui_line_b bc-border">'
- + '<div class="ub-f1 ui_p_b15 ui_p_t10 " id="">'
- + '<span>联系人:</span>'
- + '</div>'
- + '<div class="ub-f3">'
- + '<div class=" ui_p_t10">'
- + '<span class="">'+data[i].customer_name+'</span>'
- + '<span class="ui_p_l15">'+data[i].customer_mobile+'</span>'
- + '</div>'
- + '<div class="ui_p_b15 ui_p_t10" id="">'
- + '<span>证件号</span>'
- + '<span class="ui_p_l10">'+data[i].customer_id_no+'</span>'
- + '</div>'
- + '</div>'
- + '</div>'
- + '<div class="ub ub-f1 ui_m_l10 ui_m_r10">'
- + '<div class="ub ub-f1 ui_p_b10 ui_p_t10" id="">'
- + '<div class="ub-f3 ui_p_t05 ui_p_b05" style="font-size: 0.14rem;width:1%;">¥'+data[i].order_pay+'</div>'
- + ind
- + '</div>'
- + '</div>'
- + '</div>'
- }
- }
- $("#order_list").append(temp);
- $(".gopay_ticket").click(function(){
- var order_id = $(this).attr("order_id");
- var ifdisney = $(this).attr("ifdisney");
- $.ajax({
- url:'./zz-fx/Api/heyk_pay_detail_info.php', //请求地址
- type: "post", //请求方式
- data:{
- order_id:order_id,
- ifdisney:ifdisney
- },
- dataType: "json",
- success: function (data) {
- console.log(data);
- if(data.code == 0){
- if(ifdisney==0){
- setStorJson("resever_succsee",data);
- window.location.href="pay_order_disney.html";
- }else{
- setStorJson("submite_success",data);
- window.location.href="pay_order.html";
- }
-
- }else if(data.code == 1){
-
- alert(data.info);
-
- }
- },
- fail: function (date) {
-
- // 此处放失败后执行的代码
- }
- });
- })
- $(".exit_ticket").click(function(){
- setStorage("order_id",$(this).attr("order_id"));
- window.location.href="refund_ticket.html";
- })
- }
|