同步代码

This commit is contained in:
Anyon 2021-11-26 10:21:09 +08:00
parent 60bbd9545f
commit 2995b2ced7
4 changed files with 54 additions and 6 deletions

View File

@ -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()');
}
}

View File

@ -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;

View File

@ -0,0 +1,51 @@
<?php
// +----------------------------------------------------------------------
// | ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2021 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: https://thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// | 免费声明 ( https://thinkadmin.top/disclaimer )
// +----------------------------------------------------------------------
// | gitee 代码仓库https://gitee.com/zoujingli/ThinkAdmin
// | github 代码仓库https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------
return [
'name' => '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'],
],
],
],
],
],
];

View File

@ -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' => '演示环境禁止给菜单排序!']);
});