diff --git a/library/think/Route.php b/library/think/Route.php index fb9eeff2..8e0a6cca 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -1064,12 +1064,12 @@ class Route { $url = str_replace($depr, '|', $url); $array = explode('|', $url, 3); - $class = Loader::parseName(!empty($array[0]) ? $array[0] : Config::get('default_controller'), 1); + $class = !empty($array[0]) ? $array[0] : Config::get('default_controller'); $method = !empty($array[1]) ? $array[1] : Config::get('default_action'); if (!empty($array[2])) { self::parseUrlParams($array[2]); } - return ['type' => 'method', 'method' => [$namespace . '\\' . $class, $method]]; + return ['type' => 'method', 'method' => [$namespace . '\\' . Loader::parseName($class, 1), $method]]; } /**