diff --git a/extend/catcher/CatchQuery.php b/extend/catcher/CatchQuery.php index 95d2e21..cad39d2 100644 --- a/extend/catcher/CatchQuery.php +++ b/extend/catcher/CatchQuery.php @@ -101,14 +101,15 @@ class CatchQuery extends Query return $this; } - /** - * - * @time 2020年01月13日 - * @return CatchQuery - */ - public function catchSearch(): CatchQuery + /** + * + * @time 2020年01月13日 + * @param array $params + * @return CatchQuery + */ + public function catchSearch($params = []): CatchQuery { - $params = \request()->param(); + $params = empty($params) ? \request()->param() : $params; if (empty($params)) { return $this;