From 21e28aee924ed56a6885e6a62a5b41719eb9f7eb Mon Sep 17 00:00:00 2001 From: ykxiao Date: Thu, 7 Sep 2023 14:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0SDK=E7=AD=BE=E5=90=8D?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/OrderActions/Order.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/OrderActions/Order.php b/src/OrderActions/Order.php index e0c7ecb..5e49f3e 100644 --- a/src/OrderActions/Order.php +++ b/src/OrderActions/Order.php @@ -53,14 +53,15 @@ class Order /** * @param $params + * @param $api * @return mixed|string * @throws GuzzleException * @throws HttpException * @throws InvalidArgumentException */ - public function baseFun($params) + public function baseFun($params, $api) { - $url = $this->apiUrl . 'production.status'; + $url = $this->apiUrl . $api; if (!in_array(strtolower($this->format), ['xml', 'json'])) { throw new InvalidArgumentException('Invalid response format: ' . $this->format); @@ -70,6 +71,8 @@ class Order throw new InvalidArgumentException('Invalid type value(base/all): ' . $this->type); } + // 附加参数 + $params['times'] = time(); $params['output'] = $this->format; $params['extensions'] = $this->type; @@ -109,6 +112,6 @@ class Order $data = [ 'order_sn' => $order_sn ]; - return $this->baseFun($data); + return $this->baseFun($data, 'production.status'); } }