You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

129 lines
3.9 KiB

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