diff --git a/app/admin/controller/Config.php b/app/admin/controller/Config.php index f8e25cc13..e49f145e5 100644 --- a/app/admin/controller/Config.php +++ b/app/admin/controller/Config.php @@ -69,7 +69,7 @@ class Config extends Controller } foreach ($this->request->post() as $name => $value) sysconf($name, $value); sysoplog('系统配置管理', "修改系统参数成功"); - $this->success('修改系统参数成功!', admuri('admin/config/index')); + $this->success('修改系统参数成功!', 'javascript:location.reload()'); } } diff --git a/app/admin/controller/api/Queue.php b/app/admin/controller/api/Queue.php index 64426dad6..83dbad010 100644 --- a/app/admin/controller/api/Queue.php +++ b/app/admin/controller/api/Queue.php @@ -51,14 +51,14 @@ class Queue extends Controller public function stop() { try { - $message = nl2br($this->app->console->call('xadmin:queue', ['stop'])->fetch()); + $message = $this->app->console->call('xadmin:queue', ['stop'])->fetch(); if (stripos($message, 'sent end signal to process')) { sysoplog('系统运维管理', '尝试停止后台服务主进程'); $this->success('停止后台服务主进程成功!'); } elseif (stripos($message, 'processes to stop')) { $this->success('没有找到需要停止的进程!'); } else { - $this->error($message); + $this->error(nl2br($message)); } } catch (HttpResponseException $exception) { throw $exception; diff --git a/app/admin/module/default.php b/app/admin/module/default.php new file mode 100644 index 000000000..969c2ac35 --- /dev/null +++ b/app/admin/module/default.php @@ -0,0 +1,51 @@ + 'admin', + 'vers' => '2021.11.08.01', + 'user' => '广州楚才信息科技有限公司', + 'link' => 'https://www.cuci.cc', + 'desc' => '系统管理模块,提供系统配置及应用模块管理。', + 'menu' => [ + [ + 'name' => '应用管理', + 'subs' => [], + ], + [ + 'name' => '系统管理', + 'subs' => [ + [ + 'name' => '系统配置', + 'subs' => [ + ['name' => '系统参数配置', 'icon' => 'layui-icon layui-icon-set', 'path' => 'admin/config/index'], + ['name' => '系统任务管理', 'icon' => 'layui-icon layui-icon-log', 'path' => 'admin/queue/index'], + ['name' => '系统日志管理', 'icon' => 'layui-icon layui-icon-tabs', 'path' => 'admin/oplog/index'], + ['name' => '应用模块管理', 'icon' => 'layui-icon layui-icon-app', 'path' => 'admin/module/index'], + ['name' => '数据字典管理', 'icon' => 'layui-icon layui-icon-read', 'path' => 'admin/base/index'], + ], + ], + [ + 'name' => '权限管理', + 'subs' => [ + ['name' => '访问权限管理', 'icon' => 'layui-icon layui-icon-vercode', 'path' => 'admin/auth/index'], + ['name' => '系统用户管理', 'icon' => 'layui-icon layui-icon-username', 'path' => 'admin/user/index'], + ], + ], + ], + ], + ], +]; \ No newline at end of file diff --git a/app/admin/route/demo.php b/app/admin/route/demo.php index 5911e6d59..a94e673ef 100644 --- a/app/admin/route/demo.php +++ b/app/admin/route/demo.php @@ -36,9 +36,6 @@ invoke(function (App $app) { $app->route->post('config/storage', function () { return json(['code' => 0, 'info' => '演示环境禁止修改系统配置!']); }); - $app->route->post('menu', function () { - return json(['code' => 0, 'info' => '演示环境禁止给菜单排序!']); - }); $app->route->post('menu/index', function () { return json(['code' => 0, 'info' => '演示环境禁止给菜单排序!']); });