mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-11-04 05:32:09 +08:00 
			
		
		
		
	修改代码
This commit is contained in:
		
							parent
							
								
									12c50de24b
								
							
						
					
					
						commit
						95596bf3b7
					
				@ -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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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']] ?? [];
 | 
			
		||||
 | 
			
		||||
@ -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');
 | 
			
		||||
 | 
			
		||||
@ -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());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user