1.修复矿建鉴权报错
2.优化登录跳转接口 3.优化登录跳转接口 4.修复CURD生成代码模块表不加前缀访问返回404问题 5.系统级报错***优化报错Fatal error: Type of app\common\library\token\TokenExpirationException::$message
This commit is contained in:
@@ -204,7 +204,24 @@ if (!function_exists('get_controller_path')) {
|
||||
if (count($parts) < 2) {
|
||||
return $parts[0] ?? null;
|
||||
}
|
||||
return implode('/', array_slice($parts, 1, -1)) ?: $parts[1];
|
||||
$segments = array_slice($parts, 1, -1);
|
||||
if ($segments === []) {
|
||||
return $parts[1] ?? null;
|
||||
}
|
||||
// ThinkPHP 风格段 game.Config -> game/config,与 $request->controller 解析结果一致(否则权限节点对不上)
|
||||
$normalized = [];
|
||||
foreach ($segments as $seg) {
|
||||
if (str_contains($seg, '.')) {
|
||||
$dotPos = strpos($seg, '.');
|
||||
$mod = substr($seg, 0, $dotPos);
|
||||
$ctrl = substr($seg, $dotPos + 1);
|
||||
$normalized[] = strtolower($mod);
|
||||
$normalized[] = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $ctrl));
|
||||
} else {
|
||||
$normalized[] = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $seg));
|
||||
}
|
||||
}
|
||||
return implode('/', $normalized);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user