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.
55 lines
1.5 KiB
55 lines
1.5 KiB
<?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();
|
|
}
|
|
}
|
|
|