|
@@ -37,6 +37,11 @@ class ZQDcsApiService
|
|
|
|
|
|
// 发送 HTTP POST 请求
|
|
|
$response = $this->client->post($apiUrl, [
|
|
|
+ 'headers' => [
|
|
|
+ 'Authorization' => 'Token appkey_100100',
|
|
|
+ 'Content-Type'=>'application/json; charset=utf-8',
|
|
|
+ // 其他头部信息
|
|
|
+ ],
|
|
|
'PageNum'=>"-1",
|
|
|
'PointIds' => $pointIds,
|
|
|
]);
|
|
@@ -44,6 +49,10 @@ class ZQDcsApiService
|
|
|
// 获取 API 响应的 JSON 数据
|
|
|
$res = json_decode($response->getBody(), true);
|
|
|
|
|
|
+ if($res['Errors']) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
$transformedData = $this->transformData($res);
|
|
|
|
|
|
return $transformedData;
|