mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-20 22:42:48 +00:00
56 lines
1.5 KiB
PHP
56 lines
1.5 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | Niucloud-admin 企业快速开发的多应用管理平台
|
||
// +----------------------------------------------------------------------
|
||
// | 官方网址:https://www.niucloud.com
|
||
// +----------------------------------------------------------------------
|
||
// | niucloud团队 版权所有 开源版本可自由商用
|
||
// +----------------------------------------------------------------------
|
||
// | Author: Niucloud Team
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\service\admin\channel;
|
||
|
||
use app\dict\common\ChannelDict;
|
||
use app\service\core\channel\CorePcService;
|
||
use app\service\core\sys\CoreConfigService;
|
||
use core\base\BaseAdminService;
|
||
|
||
/**
|
||
* 配置服务层
|
||
* Class ConfigService
|
||
* @package app\service\core\sys
|
||
*/
|
||
class PcService extends BaseAdminService
|
||
{
|
||
//系统配置文件
|
||
public $core_config_service;
|
||
|
||
public function __construct()
|
||
{
|
||
parent::__construct();
|
||
$this->core_config_service = new CoreConfigService();
|
||
}
|
||
|
||
/**
|
||
* 设置pc信息
|
||
* @param array $value
|
||
* @return bool
|
||
*/
|
||
public function setPc(array $value)
|
||
{
|
||
$data = [
|
||
'is_open' => $value['is_open']
|
||
];
|
||
return $this->core_config_service->setConfig(ChannelDict::PC, $data);
|
||
}
|
||
|
||
/**
|
||
* 获取pc配置
|
||
* @return mixed
|
||
*/
|
||
public function getPc(){
|
||
return (new CorePcService())->getPc();
|
||
}
|
||
}
|