From 72f43763b39a0956dd7a538794b0a5ec79b3f46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Thu, 29 Feb 2024 17:35:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/tencent/controller/Index.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/tencent/controller/Index.php b/app/tencent/controller/Index.php index 178a5b8..7e8df8b 100644 --- a/app/tencent/controller/Index.php +++ b/app/tencent/controller/Index.php @@ -72,4 +72,29 @@ class Index extends Controller echo json_encode(['code' => 1,'msg'=>'上传成功']); } } + + public function get_list() { + $get_data = json_decode(file_get_contents("php://input"), true); + $agreement_model = new AgreementModel; + $where = []; + $page = 0; + + if (!empty($get_data['username'])) { + $where['username'] = $get_data['username']; + } + + if (isset($get_data['PageIndex'])) { + $page = ($get_data['PageIndex'] - 1) * 50; + } + + $list = $agreement_model->getListPage($where, '*', 'id desc', "$page,50"); + + $data = [ + 'Code' => 30000, + 'Data' => $list, + 'Message' => '', + 'TotalCount' => (int)$agreement_model->getCount($where)['count'], + ]; + echo json_encode($data); + } } \ No newline at end of file