Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

93 řádky
2.8 KiB

  1. var order_status = '';
  2. var order_id = '';
  3. var goHTML = '';
  4. var backHTML = '';
  5. window.onload = function(){
  6. goHTML = $('#go').html();
  7. backHTML = $('#goback').html();
  8. order_status = getPar('order_status');
  9. order_id = getPar('order_id');
  10. httpData(order_id);
  11. }
  12. //请求数据
  13. function httpData(order_id){
  14. $.ajax({
  15. url:'./zz_wxsct/Model/order/order_detail_info.php', //请求地址
  16. type: "post", //请求方式
  17. async:false,
  18. data:{
  19. order_id:order_id
  20. },
  21. dataType: "json",
  22. success: function (data) {
  23. console.log(data);
  24. if(data.code == 0){
  25. reloadData(data);
  26. }else{
  27. alert(data.info);
  28. }
  29. }
  30. });
  31. }
  32. //加载数据
  33. function reloadData(data){
  34. if (data.if_back == 0) {
  35. $('#go').removeClass('ui_hide');
  36. $('#goback').addClass('ui_hide');
  37. //判断展示
  38. } else{
  39. var golist = data.go_list;
  40. $('#go').addClass('ui_hide');
  41. $('#goback').removeClass('ui_hide');
  42. var tempHTML = backHTML;
  43. tempHTML=tempHTML.replace('[185518]',data.order_id);
  44. // tempHTML=tempHTML.replace('[order_id]',golist.start_area_name);
  45. tempHTML=tempHTML.replace('[出发地]',golist.start_area_name);
  46. // if (inglist[i].ORDER_STATUS == "145") {
  47. // tempHTML=tempHTML.replace('待支付',golist.start_area_name);
  48. // } else{
  49. // tempHTML=tempHTML.replace('已出票',golist.start_area_name);
  50. // if (inglist[i].CAN_DO == "0") {
  51. //// $('#refund_ticket').hide();
  52. //
  53. // 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>';
  54. //
  55. // tempHTML=tempHTML.replace('<div class="tuipiao"></div>',cstr);
  56. // }else{
  57. // 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>';
  58. //
  59. // tempHTML=tempHTML.replace('<div class="tuipiao"></div>',cstr);
  60. // }
  61. // }
  62. // tempHTML=tempHTML.replace('待支付',inglist[i].ORDER_STATUS_info);
  63. tempHTML=tempHTML.replace('[出发地站点]',golist.start_res_name);
  64. tempHTML=tempHTML.replace('[去程时间]',golist.start_time);
  65. tempHTML=tempHTML.replace('[去程日期]',golist.start_date);
  66. tempHTML=tempHTML.replace('[目的地]',golist.end_area_name);
  67. tempHTML=tempHTML.replace('[目的地站点]',golist.end_res_name);
  68. tempHTML=tempHTML.replace('[去程人数]',golist.seat_num);
  69. tempHTML=tempHTML.replace('[去程座位]',golist.seat_type);
  70. tempHTML=tempHTML.replace('[联系人]',golist.contact_name);
  71. tempHTML=tempHTML.replace('[联系人手机号]',golist.contact_mobile);
  72. if (golist.golist) {
  73. } else{
  74. }
  75. }
  76. $('#goback').html(tempHTML);
  77. }