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.
 
 
 
 

37 lines
1000 B

  1. <?php
  2. //选择产品
  3. header("Access-Control-Allow-Origin:*");
  4. $line=isset($_POST['line'])?$_POST['line']:"";
  5. $line_type=isset($_POST['line_type'])?$_POST['line_type']:"";
  6. $start_area=isset($_POST['start_area'])?$_POST['start_area']:"舟山";
  7. $end_area=isset($_POST['end_area'])?$_POST['end_area']:"杭州";
  8. $start_date=isset($_POST['start_date'])?$_POST['start_date']:"2016-10-10";
  9. $current_page=$_POST['current_page'];
  10. $page_size=$_POST['page_size'];
  11. $arr=array();
  12. for($i=0;$i<20;$i++){
  13. $arr1=array(
  14. "product_id"=>$i+9*$i,
  15. "start_area"=>$start_area.$i ,
  16. "end_area"=>$end_area.$i,
  17. "line"=>"ZSHZ - Z002".$start_area." - ".$end_area,
  18. "start_time"=>"09:30",
  19. "end_time"=>"10:00",
  20. "seat_level"=>"普通座",
  21. "zero_price"=>"233",
  22. "product_stock"=>"25",
  23. "line_type"=>$line_type
  24. );
  25. $arr[]=$arr1;
  26. }
  27. $data['code']="0";
  28. $data['info']="";
  29. $data['current_page']="1";
  30. $data['page_size']="15";
  31. $data['total_page']="2";
  32. $data['total_count']="20";
  33. $data['product_list']=$arr;
  34. echo json_encode($data);