diff --git a/library/think/Request.php b/library/think/Request.php index b6ef5c7f..a88c70c3 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1301,12 +1301,10 @@ class Request * @param array $params 参数 * @return array */ - public function dispatch($dispatch = null, $type = null, $params = []) + public function dispatch($dispatch = null, $type = 'module', $params = []) { if (!is_null($dispatch)) { - $this->dispatch = is_array($dispatch) ? - $dispatch : - ['type' => $type, $type => $dispatch, 'params' => $param]; + $this->dispatch = ['type' => $type, $type => $dispatch, 'params' => $param]; } return $this->dispatch; }