From bb69a26eff63e1baa8767155a27f008c4d104a06 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 19 Jun 2023 18:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=89=A9=E6=B5=81=E5=85=AC?= =?UTF-8?q?=E5=8F=B8=E8=8E=B7=E5=8F=96=E7=94=B5=E5=AD=90=E9=9D=A2=E5=8D=95?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/HttpService.php | 9 +++++++-- crmeb/crmeb/services/express/storage/Express.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/crmeb/crmeb/services/HttpService.php b/crmeb/crmeb/services/HttpService.php index e9f09ed4d..53688523b 100644 --- a/crmeb/crmeb/services/HttpService.php +++ b/crmeb/crmeb/services/HttpService.php @@ -88,8 +88,13 @@ class HttpService $method = strtoupper($method); //请求方式 curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); - //post请求 - if ($method == 'POST') curl_setopt($curl, CURLOPT_POSTFIELDS, $data); + //携带参数 + if ($method == 'POST') { + curl_setopt($curl, CURLOPT_POSTFIELDS, $data); + } elseif ($method == 'GET' && count($data)) { + $url .= '?' . http_build_query($data); + curl_setopt($curl, CURLOPT_URL, $url); + } //超时时间 curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); //设置header头 diff --git a/crmeb/crmeb/services/express/storage/Express.php b/crmeb/crmeb/services/express/storage/Express.php index 1705ac371..eff8a5254 100644 --- a/crmeb/crmeb/services/express/storage/Express.php +++ b/crmeb/crmeb/services/express/storage/Express.php @@ -30,7 +30,7 @@ class Express extends BaseExpress /** * 电子面单模版 */ - const EXPRESS_TEMP = 'v2/expr/temp'; + const EXPRESS_TEMP = 'v2/expr_dump/temp'; /** * 快递公司