Request类dispatch方法改进

This commit is contained in:
thinkphp
2016-06-24 17:40:36 +08:00
parent d3d7fdb83d
commit 2839d9b31d

View File

@@ -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;
}