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