mirror of https://gitee.com/karson/fastadmin.git
parent
332e786a83
commit
fb6c6bffe2
|
|
@ -31,7 +31,6 @@ class Menu extends Command
|
||||||
{
|
{
|
||||||
$this->model = new AuthRule();
|
$this->model = new AuthRule();
|
||||||
$adminPath = dirname(__DIR__) . DS;
|
$adminPath = dirname(__DIR__) . DS;
|
||||||
$moduleName = 'admin';
|
|
||||||
//控制器名
|
//控制器名
|
||||||
$controller = $input->getOption('controller') ?: '';
|
$controller = $input->getOption('controller') ?: '';
|
||||||
if (!$controller)
|
if (!$controller)
|
||||||
|
|
@ -47,7 +46,7 @@ class Menu extends Command
|
||||||
throw new Exception("could not delete all menu");
|
throw new Exception("could not delete all menu");
|
||||||
}
|
}
|
||||||
$ids = [];
|
$ids = [];
|
||||||
$list = $this->model->where('name', 'like', "/{$moduleName}/" . strtolower($controller) . "%")->select();
|
$list = $this->model->where('name', 'like', strtolower($controller) . "%")->select();
|
||||||
foreach ($list as $k => $v)
|
foreach ($list as $k => $v)
|
||||||
{
|
{
|
||||||
$output->warning($v->name);
|
$output->warning($v->name);
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ class Backend extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// 语言检测
|
// 语言检测
|
||||||
$lang = Lang::detect();
|
$lang = strip_tags(Lang::detect());
|
||||||
|
|
||||||
$site = Config::get("site");
|
$site = Config::get("site");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class Frontend extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// 语言检测
|
// 语言检测
|
||||||
$lang = Lang::detect();
|
$lang = strip_tags(Lang::detect());
|
||||||
|
|
||||||
$site = Config::get("site");
|
$site = Config::get("site");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
//如果有定义绑定后台模块则禁用路由规则
|
//如果有定义绑定后台模块则禁用路由规则
|
||||||
if (defined('BIND_MODULE') && BIND_MODULE == 'admin')
|
if (\think\Route::getBind('module') == 'admin')
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue