You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
2.9 KiB
127 lines
2.9 KiB
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
// +----------------------------------------------------------------------
|
|
// | 官方网址:https://www.niucloud.com
|
|
// +----------------------------------------------------------------------
|
|
// | niucloud团队 版权所有 开源版本可自由商用
|
|
// +----------------------------------------------------------------------
|
|
// | Author: Niucloud Team
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\adminapi\controller\sys;
|
|
|
|
use app\service\admin\sys\SystemService;
|
|
use core\base\BaseAdminController;
|
|
use think\Response;
|
|
|
|
/**
|
|
* 系统信息查询
|
|
* Class System
|
|
* @package app\adminapi\controller\sys
|
|
*/
|
|
class System extends BaseAdminController
|
|
{
|
|
/**
|
|
* 获取当前系统信息
|
|
* @return Response
|
|
*/
|
|
public function info()
|
|
{
|
|
return success((new SystemService())->getInfo());
|
|
}
|
|
|
|
/**
|
|
* 获取当前url配置
|
|
* @return Response
|
|
*/
|
|
public function url()
|
|
{
|
|
return success((new SystemService())->getUrl());
|
|
}
|
|
|
|
/**
|
|
* 获取系统环境配置
|
|
* @return Response
|
|
*/
|
|
public function getSystemInfo()
|
|
{
|
|
return success((new SystemService())->getSystemInfo());
|
|
}
|
|
|
|
/**
|
|
* 清理缓存,更新菜单
|
|
*/
|
|
public function schemaCache()
|
|
{
|
|
|
|
return success((new SystemService())->schemaCache());
|
|
}
|
|
|
|
/**
|
|
* 校验消息队列是否正常运行
|
|
* @return Response
|
|
*/
|
|
public function checkJob()
|
|
{
|
|
return success(data: (new SystemService())->checkJob());
|
|
}
|
|
|
|
/**
|
|
* 校验计划任务是否正常运行
|
|
* @return Response
|
|
*/
|
|
public function checkSchedule()
|
|
{
|
|
return success(data: (new SystemService())->checkSchedule());
|
|
}
|
|
|
|
/**
|
|
* 获取布局
|
|
* @return Response
|
|
*/
|
|
public function layout() {
|
|
$layouts = event('SiteLayout');
|
|
if (count($layouts) > 1) {
|
|
array_multisort(array_column($layouts, 'sort'), SORT_ASC, $layouts);
|
|
}
|
|
return success($layouts);
|
|
}
|
|
|
|
/**
|
|
*
|
|
* 设置布局
|
|
* @return Response
|
|
*/
|
|
public function setLayout(){
|
|
$key = input('key', '');
|
|
return success(data: (new SystemService())->setLayout($key));
|
|
}
|
|
|
|
/**
|
|
* 环境变量查询
|
|
* @return Response
|
|
*/
|
|
public function getEnvInfo()
|
|
{
|
|
return success(['app_debug' => env('app_debug', false)]);
|
|
}
|
|
|
|
|
|
public function get_yjpz_config(){
|
|
return success(data: (new SystemService())->get_yjpz_config());
|
|
|
|
}
|
|
|
|
|
|
public function yjpz_config(){
|
|
$data = $this->request->params([
|
|
['priceRules', []],
|
|
]);
|
|
|
|
return success(data: (new SystemService())->yjpz_config($data));
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|