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.
 
 
 
 

31 lines
741 B

  1. <?php
  2. /*
  3. Author:ZSQ
  4. Compeny:Spiders Travel
  5. */
  6. require_once '../Common/Mysql.php';
  7. //if (ALLOW_ORIGIN)
  8. header("Access-Control-Allow-Origin:*");
  9. //$USER_ID=isset($_GET['user_id'])?$_GET['user_id']:'';
  10. $productName=isset($_GET['productName'])?$_GET['productName']:'';
  11. $user_id=getUserId();
  12. if ($user_id ===false){
  13. echo json_encode(array("errcode"=>1,"errinfo"=>"用户未登录"));
  14. exit;
  15. }
  16. $pdo=conn();
  17. $sql="CALL HT_GET_PRODUCTNAMES_BY_SEARCH('".$productName."')";
  18. $result=$pdo->query($sql);
  19. $rowset=$result->fetchAll(PDO::FETCH_ASSOC);
  20. //if(strlen(trim($USER_ID))<=0){
  21. // $data['code']='1';
  22. // $data['info']='未登录';
  23. //}else{
  24. $data['code']='0';
  25. $data['info']='';
  26. $data['pro_names']=$rowset;
  27. //}
  28. echo json_encode($data);
  29. exit();