From ce8853ff6f6a621bd093702cf08f9c9b861eca9b Mon Sep 17 00:00:00 2001 From: Devil Date: Thu, 10 Dec 2020 18:54:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=8A=A8=E6=80=81=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=BB=98=E8=AE=A4=E5=80=BC=E4=B8=BA=E7=A9=BA=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/common.php b/application/common.php index 3afb90f38..0809b704f 100755 --- a/application/common.php +++ b/application/common.php @@ -365,9 +365,12 @@ function FormModulePath($params = []) // 是否插件调用 if($controller == 'Plugins') { - if(!empty($params['pluginsname']) && !empty($params['pluginscontrol'])) + if(!empty($params['pluginsname'])) { - $path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.ucfirst($params['pluginscontrol']); + // 控制器和方法默认值处理 + $controller = empty($params['pluginscontrol']) ? 'index' : $params['pluginscontrol']; + $action = empty($params['pluginsaction']) ? 'index' : $params['pluginsaction']; + $path = '\app\plugins\\'.$params['pluginsname'].'\form\\'.ucfirst($controller); } } else { $path = '\app\\'.request()->module().'\form\\'.$controller;