|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <?php
- /*
- Author:XM
- Compeny:Spiders Travel
- */
- //$_POST['status']==1?$status="待支付":($_POST['status']==2?$status="已出票":($_POST['status']==3?$status="已完成":($_POST['status']==4?$status="已取消":$status="待支付")));
- $status=file_get_contents("a.txt");
- $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"));
- if ($status=="待支付"){
- $json['pay_second']=900;
- }else if($status=="已出票"){
- $json['order_pay_success']=array("order_pay_success_date"=>"2016-05-01","order_pay_success_time"=>"16:35");
- $json['order_ticket_success']=array("order_ticket_success_date"=>"2016-05-01","order_ticket_success_time"=>"16:35");
- }else if($status=="已完成"){
- $json['order_pay_success']=array("order_pay_success_date"=>"2016-05-02","order_pay_success_time"=>"16:35");
- $json['order_ticket_success']=array("order_ticket_success_date"=>"2016-05-02","order_ticket_success_time"=>"16:35");
- $json['order_travel_success']=array("order_travel_success_date"=>"2016-05-04");
- }else if ($status=="已取消"){
- $json['order_cancel']=array("order_cancel_reason"=>"取消订单(支付超时)","order_cancel_date"=>"2016-05-04","order_cancel_time"=>"06:40");
- }
- $json['line_info']=array(
- array(
- 'line_code'=>'SHWZ - J01',
- 'line_name'=>'(上海 - 乌镇 - 萧山)',
- 'start_area'=>'上海(黄埔集散)',
- 'end_area'=>'乌镇(西栅牌坊)',
- 'tickets'=>array(
- array(
- 'start_time'=>'2016.05.20 07:00',
- 'car_number'=>'00001111',
- 'seat'=>'普通',
- 'ticket_name'=>'成人',
- 'seat_number'=>2,
- 'if_print'=>0,
- 'if_meal'=>0,
- 'if_bounce'=>0,
- 'if_ticket_left'=>0,
- 'price'=>100
-
- ),
- array(
- 'start_time'=>'2016.05.20 07:00',
- 'car_number'=>'00001111',
- 'seat'=>'普通',
- 'ticket_name'=>'儿童',
- 'seat_number'=>3,
- 'if_print'=>0,
- 'if_meal'=>0,
- 'if_bounce'=>0,
- 'if_ticket_left'=>1,
- 'price'=>50
- )
-
- )
- ),
- array(
- 'line_code'=>'SHWZ - J02',
- 'line_name'=>'(上海 - 普陀)',
- 'start_area'=>'上海(黄埔集散)',
- 'end_area'=>'普陀',
- 'tickets'=>array(
- array(
- 'start_time'=>'2016.05.20 07:00',
- 'car_number'=>'1111',
- 'seat'=>'普通',
- 'ticket_name'=>'成人',
- 'seat_number'=>2,
- 'if_print'=>0,
- 'if_meal'=>0,
- 'if_bounce'=>0,
- 'if_ticket_left'=>1,
- 'price'=>80
- ),
- array(
- 'start_time'=>'2016.05.20 07:00',
- 'car_number'=>'1111',
- 'seat'=>'普通',
- 'ticket_name'=>'儿童',
- 'seat_number'=>3,
- 'if_print'=>0,
- 'if_meal'=>0,
- 'if_bounce'=>0,
- 'if_ticket_left'=>0,
- 'price'=>50
- ),
- array(
- 'start_time'=>'2016.05.20 07:00',
- 'car_number'=>'1111',
- 'seat'=>'普通',
- 'ticket_name'=>'儿童',
- 'seat_number'=>4,
- 'if_print'=>1,
- 'if_meal'=>0,
- 'if_bounce'=>0,
- 'if_ticket_left'=>1,
- 'price'=>50
- )
- )
-
-
-
- ),
- array(
- 'line_code'=>'SHWZ - J04',
- 'line_name'=>'(上海 - 舟山)',
- 'start_area'=>'上海(黄埔集散)',
- 'end_area'=>'舟山',
- 'tickets'=>array(
- array(
- 'start_time'=>'2016.05.20 07:00',
- 'car_number'=>'222',
- 'seat'=>'普通',
- 'ticket_name'=>'成人',
- 'seat_number'=>2,
- 'if_print'=>0,
- 'if_meal'=>0,
- 'if_bounce'=>1,
- 'if_ticket_left'=>1,
- 'price'=>120
- )
-
- )
- )
- );
- $json['total_rmb']=1000;
- $json['customer_info']=array('customer_name'=>'张三','customer_mobile'=>13131313131,'customer_id'=>111111111111112222);
- echo json_encode($json);
|