|
-
- var order_status = '';
- var order_id = '';
-
- var goHTML = '';
- var backHTML = '';
-
- window.onload = function(){
- goHTML = $('#go').html();
- backHTML = $('#goback').html();
-
- order_status = getPar('order_status');
- order_id = getPar('order_id');
- httpData(order_id);
- }
-
-
- //请求数据
- function httpData(order_id){
- $.ajax({
- url:'./zz_wxsct/Model/order/order_detail_info.php', //请求地址
- type: "post", //请求方式
- async:false,
- data:{
- order_id:order_id
- },
- dataType: "json",
- success: function (data) {
- console.log(data);
- if(data.code == 0){
- reloadData(data);
- }else{
- alert(data.info);
- }
- }
- });
- }
-
-
- //加载数据
- function reloadData(data){
- if (data.if_back == 0) {
- $('#go').removeClass('ui_hide');
- $('#goback').addClass('ui_hide');
- //判断展示
-
- } else{
- var golist = data.go_list;
-
- $('#go').addClass('ui_hide');
- $('#goback').removeClass('ui_hide');
-
- var tempHTML = backHTML;
- tempHTML=tempHTML.replace('[185518]',data.order_id);
- // tempHTML=tempHTML.replace('[order_id]',golist.start_area_name);
- tempHTML=tempHTML.replace('[出发地]',golist.start_area_name);
- // if (inglist[i].ORDER_STATUS == "145") {
- // tempHTML=tempHTML.replace('待支付',golist.start_area_name);
- // } else{
- // tempHTML=tempHTML.replace('已出票',golist.start_area_name);
- // if (inglist[i].CAN_DO == "0") {
- //// $('#refund_ticket').hide();
- //
- // var cstr='<div class="ub-f1 text_middle ui_radiu_all ui_m_r25 ui_m_t05 ui_m_b05" id="refund_ticket" style="display: block;padding:0.07rem 0; border: 1px solid white; color:white;">隐藏</div>';
- //
- // tempHTML=tempHTML.replace('<div class="tuipiao"></div>',cstr);
- // }else{
- // var cstr='<div class="ub-f1 text_middle ui_radiu_all ui_m_r25 ui_m_t05 ui_m_b05" id="refund_ticket" style="display: block;padding:0.07rem 0; border: 1px solid #3d434f;" onclick="goToDetail([order_id],1)">退票</div>';
- //
- // tempHTML=tempHTML.replace('<div class="tuipiao"></div>',cstr);
- // }
- // }
- // tempHTML=tempHTML.replace('待支付',inglist[i].ORDER_STATUS_info);
- tempHTML=tempHTML.replace('[出发地站点]',golist.start_res_name);
- tempHTML=tempHTML.replace('[去程时间]',golist.start_time);
- tempHTML=tempHTML.replace('[去程日期]',golist.start_date);
- tempHTML=tempHTML.replace('[目的地]',golist.end_area_name);
- tempHTML=tempHTML.replace('[目的地站点]',golist.end_res_name);
- tempHTML=tempHTML.replace('[去程人数]',golist.seat_num);
- tempHTML=tempHTML.replace('[去程座位]',golist.seat_type);
- tempHTML=tempHTML.replace('[联系人]',golist.contact_name);
- tempHTML=tempHTML.replace('[联系人手机号]',golist.contact_mobile);
-
- if (golist.golist) {
-
- } else{
-
- }
-
- }
- $('#goback').html(tempHTML);
- }
|