|
- <?php
- /*
- Author:XM
- Compeny:Spiders Travel
- */
- //$_POST['status']==1?$status="待支付":($_POST['status']==2?$status="已出票":($_POST['status']==3?$status="已完成":($_POST['status']==4?$status="已取消":$status="待支付")));
- if($_POST){
-
- $method=$_POST['method'];
- if ($method=='exist_ticket'){
- $orderid=$_POST['orderid'];
- $json=array("order_no"=>1605201515);
-
- $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'=>1,
- 'if_bounce'=>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'=>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'=>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,
-
- '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,
-
- 'price'=>120
- )
-
- )
- )
- );
- }else if($method=='bounce'){
- $json=array("errcode"=>0,"errinfo"=>"退票成功");
- }else if($method=='meal'){
- $json=array("errcode"=>0,"errinfo"=>"改签显示");
- $json['line_info']=array(
- 'line_code'=>'SHWZ - J04',
- 'line_name'=>'(上海 - 舟山)',
- 'start_area'=>'上海(黄埔集散)',
- 'end_area'=>'舟山',
- 'start_time'=>'2016.05.21',
- 'departure_station'=>array(
- '黄埔集散07:00',
- '黄埔集散07:30',
- '黄埔集散08:00'
-
- ),
- 'destination_station'=>array(
- '舟山11:00',
- '舟山12:00',
- '舟山13:00',
- '舟山14:00'
- ),
- 'seat'=>'普通',
- 'ticket_name'=>'成人',
- 'price'=>120,
- 'in_stock'=>1000,
- );
- }else if($method=='confirm_meal'){
- $json=array("errcode"=>0,"errinfo"=>"改签成功");
- }else if($method=='meal_tickets'){
- $json=array("errcode"=>0,"errinfo"=>"改签票显示");
- $json['line_info']=array(
- 'line_code'=>'SHWZ - J04',
- 'line_name'=>'(上海 - 舟山)',
- 'start_area'=>'上海(黄埔集散)',
- 'end_area'=>'舟山',
- 'start_time'=>'2016.05.20 07:00',
-
- 'car_number'=>'222',
- 'seat'=>'普通',
- 'ticket_name'=>'成人',
- 'seat_number'=>10,
- 'if_print'=>0,
- 'if_meal'=>0,
- 'if_bounce'=>0,
-
- 'price'=>130
-
- );
- }else if($method=='search'){
- $json=array("errcode"=>0,"errinfo"=>"查询成功");
- $json['line_info']=array(
- 'line_code'=>'SHWZ - J04',
- 'line_name'=>'(上海 - 舟山)',
- 'start_area'=>'上海(黄埔集散)',
- 'end_area'=>'舟山',
- 'start_time'=>'2016.05.21',
- 'departure_station'=>array(
- '黄埔集散07:00',
- '黄埔集散07:30',
- '黄埔集散08:00'
-
- ),
- 'destination_station'=>array(
- '舟山11:00',
- '舟山12:00',
- '舟山13:00',
- '舟山14:00'
- ),
- 'seat'=>'普通',
- 'ticket_name'=>'成人',
- 'price'=>120,
- 'in_stock'=>100,
- );
- }
- }
- //$json=array("errcode"=>0,"errinfo"=>"success");
- echo json_encode($json);
|