|
@@ -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);
|