master
wangxinglong 2022-08-08 17:58:57 +08:00
parent 68c5315435
commit c22ceaa5f9
1 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@ class SpuRepository extends Repository
public function listForFront(array $params = [], callable $callback = null, array $order = [], array $where = []): array public function listForFront(array $params = [], callable $callback = null, array $order = [], array $where = []): array
{ {
$page = $params['page'] ?? 1; $page = $params['page'] ?? 1;
$size = $params['size'] ?? 0; $size = $params['size'] ?? 10;
$page = (!is_numeric($page) || $page <= 0) ? 1 : $page; $page = (!is_numeric($page) || $page <= 0) ? 1 : $page;
$size = (!is_numeric($size) || $size <= 0) ? 10 : $size; $size = (!is_numeric($size) || $size <= 0) ? 10 : $size;