isPost()) throw new \Exception("请求失败,仅允许POST请求方式"); $curlData = YingShiSdk::DeviceStatus(); if (!is_array($curlData)) throw new \Exception("cURL Error #:" . $curlData); return $this->jsonSuccess('操作成功',$curlData); } catch (\Exception $e) { return $this->jsonError($e->getMessage()); } } public function deviceInfo() { try { $request = Request::instance(); if (!$request->isPost()) throw new \Exception("请求失败,仅允许POST请求方式"); $curlData = YingShiSdk::DeviceInfo(); if (!is_array($curlData)) throw new \Exception("cURL Error #:" . $curlData); return $this->jsonSuccess('操作成功',$curlData); } catch (\Exception $e) { return $this->jsonError($e->getMessage()); } } }