From b00ec77547d3f7f4898ca23269fc851814f89bc3 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Fri, 8 Dec 2023 17:32:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E8=83=BD=E9=97=A8=E9=94=81-=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=AE=9E=E6=97=B6=E4=B8=8A=E6=8A=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=963?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Smartlock.php | 4 ++-- application/common/SzxfjkSdk/SmartLocks.php | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/application/api/controller/Smartlock.php b/application/api/controller/Smartlock.php index c8f2cb0..4f1eb64 100644 --- a/application/api/controller/Smartlock.php +++ b/application/api/controller/Smartlock.php @@ -82,9 +82,9 @@ class Smartlock extends Base $param = array_merge($deviceInfo,$deviceStatus); $pushRes = SmartLocks::TimingDataPush($param); - if (!$pushRes['status']) throw new \Exception($pushRes['msg']); + #if (!$pushRes['status']) throw new \Exception($pushRes['msg']); - return $this->jsonSuccess(); + return $this->jsonSuccess('成功',$pushRes); } catch (\Exception $exception) { return $this->jsonError($exception->getMessage()); } diff --git a/application/common/SzxfjkSdk/SmartLocks.php b/application/common/SzxfjkSdk/SmartLocks.php index ef26eaa..db8677a 100644 --- a/application/common/SzxfjkSdk/SmartLocks.php +++ b/application/common/SzxfjkSdk/SmartLocks.php @@ -52,13 +52,13 @@ class SmartLocks ],//数据内容 ]; - $result = self::curlPost($requestUrl, $data); + return $result = self::curlPost($requestUrl, $data); - if (!$result['code']) { - return ['status' => 1,'msg' => '推送成功']; - } - - return ['status' => 0,'msg' => '推送失败']; +// if (!$result['code']) { +// return ['status' => 1,'msg' => '推送成功']; +// } +// +// return ['status' => 0,'msg' => '推送失败']; } /**