Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

127 righe
3.8 KiB

  1. <?php
  2. /*
  3. Author:XM
  4. Compeny:Spiders Travel
  5. */
  6. //$_POST['status']==1?$status="待支付":($_POST['status']==2?$status="已出票":($_POST['status']==3?$status="已完成":($_POST['status']==4?$status="已取消":$status="待支付")));
  7. $status=file_get_contents("a.txt");
  8. $json=array("order_no"=>1605201515,"order_status"=>$status,"order_source"=>"微信服务号4","sales"=>"单票1","order_sub"=>array("order_sub_date"=>"2016-05-01","order_sub_time"=>"16:30"));
  9. if ($status=="待支付"){
  10. $json['pay_second']=900;
  11. }else if($status=="已出票"){
  12. $json['order_pay_success']=array("order_pay_success_date"=>"2016-05-01","order_pay_success_time"=>"16:35");
  13. $json['order_ticket_success']=array("order_ticket_success_date"=>"2016-05-01","order_ticket_success_time"=>"16:35");
  14. }else if($status=="已完成"){
  15. $json['order_pay_success']=array("order_pay_success_date"=>"2016-05-02","order_pay_success_time"=>"16:35");
  16. $json['order_ticket_success']=array("order_ticket_success_date"=>"2016-05-02","order_ticket_success_time"=>"16:35");
  17. $json['order_travel_success']=array("order_travel_success_date"=>"2016-05-04");
  18. }else if ($status=="已取消"){
  19. $json['order_cancel']=array("order_cancel_reason"=>"取消订单(支付超时)","order_cancel_date"=>"2016-05-04","order_cancel_time"=>"06:40");
  20. }
  21. $json['line_info']=array(
  22. array(
  23. 'line_code'=>'SHWZ - J01',
  24. 'line_name'=>'(上海 - 乌镇 - 萧山)',
  25. 'start_area'=>'上海(黄埔集散)',
  26. 'end_area'=>'乌镇(西栅牌坊)',
  27. 'tickets'=>array(
  28. array(
  29. 'start_time'=>'2016.05.20 07:00',
  30. 'car_number'=>'00001111',
  31. 'seat'=>'普通',
  32. 'ticket_name'=>'成人',
  33. 'seat_number'=>2,
  34. 'if_print'=>0,
  35. 'if_meal'=>0,
  36. 'if_bounce'=>0,
  37. 'if_ticket_left'=>0,
  38. 'price'=>100
  39. ),
  40. array(
  41. 'start_time'=>'2016.05.20 07:00',
  42. 'car_number'=>'00001111',
  43. 'seat'=>'普通',
  44. 'ticket_name'=>'儿童',
  45. 'seat_number'=>3,
  46. 'if_print'=>0,
  47. 'if_meal'=>0,
  48. 'if_bounce'=>0,
  49. 'if_ticket_left'=>1,
  50. 'price'=>50
  51. )
  52. )
  53. ),
  54. array(
  55. 'line_code'=>'SHWZ - J02',
  56. 'line_name'=>'(上海 - 普陀)',
  57. 'start_area'=>'上海(黄埔集散)',
  58. 'end_area'=>'普陀',
  59. 'tickets'=>array(
  60. array(
  61. 'start_time'=>'2016.05.20 07:00',
  62. 'car_number'=>'1111',
  63. 'seat'=>'普通',
  64. 'ticket_name'=>'成人',
  65. 'seat_number'=>2,
  66. 'if_print'=>0,
  67. 'if_meal'=>0,
  68. 'if_bounce'=>0,
  69. 'if_ticket_left'=>1,
  70. 'price'=>80
  71. ),
  72. array(
  73. 'start_time'=>'2016.05.20 07:00',
  74. 'car_number'=>'1111',
  75. 'seat'=>'普通',
  76. 'ticket_name'=>'儿童',
  77. 'seat_number'=>3,
  78. 'if_print'=>0,
  79. 'if_meal'=>0,
  80. 'if_bounce'=>0,
  81. 'if_ticket_left'=>0,
  82. 'price'=>50
  83. ),
  84. array(
  85. 'start_time'=>'2016.05.20 07:00',
  86. 'car_number'=>'1111',
  87. 'seat'=>'普通',
  88. 'ticket_name'=>'儿童',
  89. 'seat_number'=>4,
  90. 'if_print'=>1,
  91. 'if_meal'=>0,
  92. 'if_bounce'=>0,
  93. 'if_ticket_left'=>1,
  94. 'price'=>50
  95. )
  96. )
  97. ),
  98. array(
  99. 'line_code'=>'SHWZ - J04',
  100. 'line_name'=>'(上海 - 舟山)',
  101. 'start_area'=>'上海(黄埔集散)',
  102. 'end_area'=>'舟山',
  103. 'tickets'=>array(
  104. array(
  105. 'start_time'=>'2016.05.20 07:00',
  106. 'car_number'=>'222',
  107. 'seat'=>'普通',
  108. 'ticket_name'=>'成人',
  109. 'seat_number'=>2,
  110. 'if_print'=>0,
  111. 'if_meal'=>0,
  112. 'if_bounce'=>1,
  113. 'if_ticket_left'=>1,
  114. 'price'=>120
  115. )
  116. )
  117. )
  118. );
  119. $json['total_rmb']=1000;
  120. $json['customer_info']=array('customer_name'=>'张三','customer_mobile'=>13131313131,'customer_id'=>111111111111112222);
  121. echo json_encode($json);