调整架构,新增系统模块服务
This commit is contained in:
@@ -8,3 +8,24 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
||||
namespace catchAdmin\system;
|
||||
|
||||
use catchAdmin\system\events\AttachmentEvent;
|
||||
use catcher\ModuleService;
|
||||
|
||||
class SystemService extends ModuleService
|
||||
{
|
||||
|
||||
public function loadRouteFrom()
|
||||
{
|
||||
// TODO: Implement loadRouteFrom() method.
|
||||
return __DIR__ . DIRECTORY_SEPARATOR . 'route.php';
|
||||
}
|
||||
|
||||
public function loadEvents()
|
||||
{
|
||||
return [
|
||||
'attachment' => [ AttachmentEvent::class ],
|
||||
];
|
||||
}
|
||||
}
|
@@ -62,7 +62,7 @@ class DataDictionary extends CatchController
|
||||
*/
|
||||
public function view($table): \think\response\Json
|
||||
{
|
||||
$fields = Db::query('show full columns from ' . $table);
|
||||
$fields = Db::query(' ' . $table);
|
||||
|
||||
array_walk($fields, function (&$item){
|
||||
$item = array_change_key_case($item);
|
||||
|
@@ -4,8 +4,11 @@
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"order": 2,
|
||||
"services": [],
|
||||
"services": [
|
||||
"catchAdmin\\system\\SystemService"
|
||||
],
|
||||
"aliases": {},
|
||||
"files": [],
|
||||
"requires": []
|
||||
"requires": [],
|
||||
"enable": true
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$router->group(function () use ($router){
|
||||
// 登录日志
|
||||
$router->get('log/login', '\catchAdmin\system\controller\LoginLog@list');
|
||||
$router->delete('loginLog/empty', '\catchAdmin\system\controller\LoginLog@empty');
|
||||
@@ -29,3 +30,4 @@ $router->post('generate/preview', '\catchAdmin\system\controller\Generate@previe
|
||||
|
||||
// 敏感词
|
||||
$router->resource('sensitive/word', '\catchAdmin\system\controller\SensitiveWord');
|
||||
})->middleware('auth');
|
Reference in New Issue
Block a user