longyi hai 5 meses
pai
achega
f1c0bd3c80
Modificáronse 1 ficheiros con 8 adicións e 5 borrados
  1. 8 5
      core/CoreApp/controllers/Apipf.php

+ 8 - 5
core/CoreApp/controllers/Apipf.php

@@ -112,7 +112,7 @@ class Apipf extends Start_Controller{
        $url = $this->url;
        
        var_dump($send_list);
-       die;
+       
        foreach($send_list as $item){
            if(empty($item['orders'])){
                //直接同步更新了吧  都满足条件了 结果还没订单 就先不查询了 等有新的订单在判断一遍
@@ -122,8 +122,9 @@ class Apipf extends Start_Controller{
                 ],$item['customer_id']);
                continue;
            }
-            $res = $this->sendHttp($url,$header,$item);
-            if($res){
+            $res = $this->sendHttp($url,$header,['data'=>[$item]]);
+            var_dump($res);
+            if($res['status']){
                 $this->customer->save([
                     'more_three'=>3,
                     'is_tb'=>1,
@@ -180,7 +181,9 @@ class Apipf extends Start_Controller{
                  ],$item['customer_id']);
                 continue;
             }
-             $res = $this->sendHttp($url,$header,$item);
+             $res = $this->sendHttp($url,$header,[
+                    $item
+                 ]);
              if($res){
                  $this->customer->save([
                      'is_tb'=>1,
@@ -451,7 +454,7 @@ class Apipf extends Start_Controller{
         curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
 		curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
 		curl_setopt($ch, CURLOPT_POST, 1);
-        curl_setopt($ch, CURLOPT_POSTFIELDS, $list);
+        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($list));
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
         $res = curl_exec($ch);