协议列表
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user