tongshanglei 1 year ago
parent
commit
cb8ac892ea
1 changed files with 8 additions and 0 deletions
  1. 8 0
      catch/api/controller/Api.php

+ 8 - 0
catch/api/controller/Api.php

@@ -273,6 +273,14 @@ class Api extends CatchController
                    echo 'assetReceiveReport res'.PHP_EOL;
                    var_dump($url_res);
                 }
+                //推送给闸机用
+                $url="http://localhost:8115/api/gateReport";
+                var_dump($report_data);
+                $postFields = http_build_query($report_data);
+                $url_res= curl_http_post($postFields,$url,false);
+                echo 'gateReceiveReport res'.PHP_EOL;
+                var_dump($url_res);
+
                 $hashKey='station_access_last_data';
                 $beforeKey='station_access_before_data';
                 $key=$mac.'_'.$val['label'];