mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
@@ -232,6 +232,7 @@ class Route
|
||||
public static function rule($rule, $route = '', $type = '*', $option = [], $pattern = [])
|
||||
{
|
||||
$group = self::getGroup('name');
|
||||
|
||||
if (!is_null($group)) {
|
||||
// 路由分组
|
||||
$option = array_merge(self::getGroup('option'), $option);
|
||||
@@ -308,6 +309,9 @@ class Route
|
||||
$suffix = isset($option['ext']) ? $option['ext'] : null;
|
||||
self::name($name, [$key, $vars, self::$domain, $suffix]);
|
||||
}
|
||||
if (isset($option['modular'])) {
|
||||
$route = $option['modular'] . '/' . $route;
|
||||
}
|
||||
if ($group) {
|
||||
if ('*' != $type) {
|
||||
$option['method'] = $type;
|
||||
@@ -1166,7 +1170,7 @@ class Route
|
||||
$len1 = substr_count($url, '|');
|
||||
$len2 = substr_count($rule, '/');
|
||||
// 多余参数是否合并
|
||||
$merge = !empty($option['merge_extra_vars']) ? true : false;
|
||||
$merge = !empty($option['merge_extra_vars']);
|
||||
if ($merge && $len1 > $len2) {
|
||||
$url = str_replace('|', $depr, $url);
|
||||
$url = implode('|', explode($depr, $url, $len2 + 1));
|
||||
|
||||
Reference in New Issue
Block a user