diff --git a/app/api/controller/Merchant.php b/app/api/controller/Merchant.php index 5bf0102d..77d40d46 100644 --- a/app/api/controller/Merchant.php +++ b/app/api/controller/Merchant.php @@ -129,8 +129,10 @@ class Merchant extends Controller */ public function list(): Json { $model = new MerchantModel; - $pageSize = $this->request->get('pageSize', 15); - $sort = $this->request->get('sort', "merchant_id"); + $pageSize = $this->request->param('pageSize'); + $pageSize = empty($pageSize) ?? 15; + $sort = $this->request->param('sort'); + $sort = empty($sort) ?? "merchant_id"; $list = $model->getList($this->request->param(), intval($pageSize), $sort)->toArray(); foreach ($list['data'] as $kr => $r) {