From b4046fb21e6163ba23a792b694162693dbe71b4b Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 27 Jun 2020 00:03:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E8=B7=AF=E7=94=B1=E5=88=B0?= =?UTF-8?q?=E7=B1=BB=E7=9A=84=E9=9D=99=E6=80=81=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/think/route/Rule.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/think/route/Rule.php b/src/think/route/Rule.php index 87dfe22d5d..05213934c5 100644 --- a/src/think/route/Rule.php +++ b/src/think/route/Rule.php @@ -630,8 +630,9 @@ protected function dispatch(Request $request, $route, array $option): Dispatch } elseif ($route instanceof Closure) { // 执行闭包 $result = new CallbackDispatch($request, $this, $route, $this->vars); - } elseif (false !== strpos($route, '@')) { + } elseif (false !== strpos($route, '@') || false !== strpos($route, '::')) { // 路由到类的方法 + $route = str_replace('::', '@', $route); $result = $this->dispatchMethod($request, $route); } else { // 路由到控制器/操作