From 80eb0ecaa31feba6a2015d8e358ba60d6ba7d628 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Thu, 27 Apr 2023 09:38:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=8C=E6=AD=A5=E8=B7=AF?= =?UTF-8?q?=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/SystemRouteServices.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crmeb/app/services/system/SystemRouteServices.php b/crmeb/app/services/system/SystemRouteServices.php index 0060198de..56c76d472 100644 --- a/crmeb/app/services/system/SystemRouteServices.php +++ b/crmeb/app/services/system/SystemRouteServices.php @@ -266,11 +266,14 @@ class SystemRouteServices extends BaseServices foreach ($list as $key => $value) { foreach ($value as $item) { if (!$this->diffRoute($data, $item['rule'], $item['method']) && strstr($item['rule'], '') === false) { + $pathAndAction = explode('/', $item['route']); $save[] = [ 'name' => $item['option']['real_name'] ?? $item['name'], 'path' => $item['rule'], 'cate_id' => $key, 'app_name' => $app, + 'file_path' => 'app/' . $app . '/controller/' . str_replace('.', '/', $pathAndAction[0]) . '.php', + 'action' => $pathAndAction[1], 'type' => isset($item['option']['is_common']) && $item['option']['is_common'] ? 1 : 0, 'method' => $item['method'], 'add_time' => date('Y-m-d H:i:s'), @@ -305,6 +308,7 @@ class SystemRouteServices extends BaseServices app()->make(SystemMenusServices::class)->deleteMenu($item['path'], $item['method']); } } + $this->cacheDriver()->clear(); } /**