From acc114cd7fdc3f3d3a6b8c590a88d1a7e23358aa Mon Sep 17 00:00:00 2001 From: pengda <1111@qq.com> Date: Fri, 29 Aug 2025 09:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E4=B9=A6=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- control/index.php | 10 ++++++++++ model/mManage.php | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/control/index.php b/control/index.php index af2c7e4..359bcf3 100755 --- a/control/index.php +++ b/control/index.php @@ -135,4 +135,14 @@ class index extends publicBase { public function interlocution() { } + + public function ajax_get_medical_book_list() { + $title = $this->post('title'); + $state = $this->post('state'); + + $obj = new mManage(); + $res = $obj->getMedicalBookList($title, $state); + + $this->ajax_json(true, '设置成功', $res); + } } diff --git a/model/mManage.php b/model/mManage.php index fb02930..ff9235b 100755 --- a/model/mManage.php +++ b/model/mManage.php @@ -132,4 +132,38 @@ class mManage extends mBase { return $id; } + + public function getMedicalBookList($title, $state) { + $params = array( + 'title' => $title, + 'state' => $state, + ); + + $jsonres = $this->postCUrl('http://118.178.228.101:27000/upload_file_check', $params, 90); + if (!$jsonres) { + $this->setError('请求失败'); + return false; + } + + $res = json_decode($jsonres, true); + if ($res['code'] != 200) { + $this->setError('请求错误'); + return false; + } + if(!isset($res['info']) || empty($res['info'])) { + $this->setError('数据有误'); + return false; + } + $data = array(); + foreach ($res['info'] as $value) { + $temp = array(); + $temp['sign'] = $value[2]; + $temp['content'] = $value[1]; + + $data[] = $temp; + } + unset($res); + + return $data; + } } \ No newline at end of file -- 1.8.3.1