mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 00:22:48 +08:00
修正Url类路由分组的情况
This commit is contained in:
@@ -150,10 +150,11 @@ class Url
|
||||
if (Config::get('url_domain_deploy')) {
|
||||
// 根域名
|
||||
$urlDomainRoot = Config::get('url_domain_root');
|
||||
$route_domain = array_keys(Route::domain());
|
||||
$domains = Route::domain();
|
||||
$route_domain = array_keys($domains);
|
||||
foreach ($route_domain as $domain_prefix) {
|
||||
if(strpos($domain, trim($domain_prefix, '*.')) !== false) {
|
||||
foreach (Route::domain() as $key => $rule) {
|
||||
if (0 === strpos($domain_prefix, '*.') && strpos($domain, ltrim($domain_prefix, '*.')) !== false) {
|
||||
foreach ($domains as $key => $rule) {
|
||||
$rule = is_array($rule) ? $rule[0] : $rule;
|
||||
if (false === strpos($key, '*') && 0 === strpos($url, $rule)) {
|
||||
$url = ltrim($url, $rule);
|
||||
@@ -269,7 +270,9 @@ class Url
|
||||
if (is_numeric($key)) {
|
||||
$key = array_shift($route);
|
||||
}
|
||||
if (is_array($route)) {
|
||||
$route = $route[0];
|
||||
}
|
||||
$param = [];
|
||||
if (is_array($route)) {
|
||||
$route = implode('\\', $route);
|
||||
|
||||
Reference in New Issue
Block a user