diff --git a/app/admin/controller/Config.php b/app/admin/controller/Config.php index 2c30d57bc..32f866ed7 100644 --- a/app/admin/controller/Config.php +++ b/app/admin/controller/Config.php @@ -53,7 +53,7 @@ class Config extends Controller { $this->title = '系统参数配置'; $this->super = AdminService::isSuper(); - $this->version = ModuleService::instance()->getVersion(); + $this->version = ModuleService::getVersion(); $this->fetch(); } diff --git a/app/admin/controller/Module.php b/app/admin/controller/Module.php index e4942348a..24b35e2c6 100644 --- a/app/admin/controller/Module.php +++ b/app/admin/controller/Module.php @@ -34,7 +34,7 @@ class Module extends Controller public function index() { $this->title = '系统模块管理'; - $this->modules = ModuleService::instance()->change(); + $this->modules = ModuleService::change(); $this->fetch(); } @@ -45,7 +45,7 @@ class Module extends Controller public function install() { $data = $this->_vali(['name.require' => '模块名称不能为空!']); - [$state, $message] = ModuleService::instance()->install($data['name']); + [$state, $message] = ModuleService::install($data['name']); $state ? $this->success($message) : $this->error($message); } @@ -56,8 +56,8 @@ class Module extends Controller public function change() { $data = $this->_vali(['name.require' => '模块名称不能为空!']); - $online = ModuleService::instance()->online(); - $locals = ModuleService::instance()->getModules(); + $online = ModuleService::online(); + $locals = ModuleService::getModules(); if (isset($online[$data['name']])) { $this->module = $online[$data['name']]; $this->current = $locals[$data['name']] ?? []; diff --git a/app/admin/controller/Queue.php b/app/admin/controller/Queue.php index 2d48b97f3..c678eaa4b 100644 --- a/app/admin/controller/Queue.php +++ b/app/admin/controller/Queue.php @@ -45,7 +45,7 @@ class Queue extends Controller SystemQueue::mQuery()->layTable(function () { $this->title = '系统任务管理'; $this->iswin = ProcessService::instance()->iswin(); - if ($this->super = AdminService::instance()->isSuper()) { + if ($this->super = AdminService::isSuper()) { $process = ProcessService::instance(); if ($process->iswin() || empty($_SERVER['USER'])) { $this->command = $process->think('xadmin:queue start'); diff --git a/app/admin/controller/api/Update.php b/app/admin/controller/api/Update.php index d02cb351b..958bd7a07 100644 --- a/app/admin/controller/api/Update.php +++ b/app/admin/controller/api/Update.php @@ -44,7 +44,7 @@ class Update extends Controller public function get() { $filename = decode(input('encode', '0')); - if (!ModuleService::instance()->checkAllowDownload($filename)) { + if (!ModuleService::checkAllowDownload($filename)) { $this->error('下载的文件不在认证规则中!'); } if (file_exists($realname = $this->app->getRootPath() . $filename)) { @@ -61,7 +61,7 @@ class Update extends Controller */ public function node() { - $this->success('获取文件列表成功!', ModuleService::instance()->getChanges( + $this->success('获取文件列表成功!', ModuleService::getChanges( json_decode($this->request->post('rules', '[]', ''), true), json_decode($this->request->post('ignore', '[]', ''), true) )); @@ -72,6 +72,6 @@ class Update extends Controller */ public function version() { - $this->success('获取模块信息成功!', ModuleService::instance()->getModules()); + $this->success('获取模块信息成功!', ModuleService::getModules()); } } \ No newline at end of file