From 3bfc58f252cfc7c3610d507774c98cbec9f8eb3e Mon Sep 17 00:00:00 2001 From: Chaim Date: Fri, 22 May 2020 13:38:59 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/SystemService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service/SystemService.php b/src/service/SystemService.php index bfd3e26..24cf322 100644 --- a/src/service/SystemService.php +++ b/src/service/SystemService.php @@ -46,7 +46,8 @@ class SystemService extends Service if (empty($suffix) && !empty($fillSuffix)) { if (empty($url_common_param)) $location = $this->app->route->buildUrl($url, $vars)->suffix($suffix)->domain($domain)->build(); else $location = $this->app->route->buildUrl($url, [])->suffix($suffix)->domain($domain)->build(); - $location = $location . "{$pathinfo_depr}" . $this->arr_to_str($vars, $pathinfo_depr) . ".{$url_html_suffix}"; + if (empty($vars)) $location = substr($location . "{$pathinfo_depr}" . $this->arr_to_str($vars, $pathinfo_depr), 0, -1) . ".{$url_html_suffix}"; + else $location = $location . "{$pathinfo_depr}" . $this->arr_to_str($vars, $pathinfo_depr) . ".{$url_html_suffix}"; } else $location = $this->app->route->buildUrl($url, $vars)->suffix($suffix)->domain($domain)->build(); return $location; }