改进Route类在多种路由地址下面对URL额外参数的支持 修正 bindtoController方法 App类调整对bindToApi的调用

This commit is contained in:
thinkphp
2016-06-27 11:53:21 +08:00
parent 15577f75ce
commit d17643dfd9
2 changed files with 37 additions and 54 deletions

View File

@@ -95,13 +95,8 @@ class App
// 获取应用调度信息
$dispatch = self::$dispatch;
if (empty($dispatch)) {
if (IS_API) {
// 直接绑定到控制器类命名空间 URL区分大小写 v1/User/getInfo
$dispatch = Route::bindToApi($request->path(), self::$namespace, $config['pathinfo_depr']);
} else {
// 进行URL路由检测
$dispatch = self::routeCheck($request, $config);
}
// 进行URL路由检测
$dispatch = self::routeCheck($request, $config);
}
// 记录当前调度信息
$request->dispatch($dispatch);