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.
 
 
 
 
 

27 lines
834 B

  1. <?php
  2. /*
  3. * wechat 2.0
  4. * Copyright (c) 2016 yixi wei http://zhizhuchuxing.com/
  5. * Date: 2016.7.12
  6. * Something is to pay QQ1062140302
  7. */
  8. //require_once '../../Common/Mysql.php';
  9. if (ALLOW_ORIGIN)
  10. header("Access-Control-Allow-Origin:*");
  11. date_default_timezone_set('PRC');
  12. $userid =$_COOKIE['user_id'];
  13. $openid = $_COOKIE['open_id'];
  14. $sql = "select id,name,id_type,id_num from wechat_customer where cancel_flag =0 and wechat_user_id ='".$userid."'";
  15. writeLog($sql);
  16. $rs = $pdo->query($sql);
  17. $rowset = $rs->fetchAll(PDO::FETCH_ASSOC);
  18. foreach ($rowset as $v) {
  19. $list[] = array('id'=>$v['id'],'name'=>$v['name'],'id_type'=>$v['id_type'],'id_num'=>$v['id_num']);
  20. }
  21. if($rowset){
  22. echo json_encode(array('code'=>'0','info'=>'0','list'=>$list));
  23. }else{
  24. echo json_encode(array('code'=>'0','info'=>$rs,'list'=>array()));
  25. }