123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- // +----------------------------------------------------------------------
- // | Niucloud-admin 企业快速开发的saas管理平台
- // +----------------------------------------------------------------------
- // | 官方网址:https://www.niucloud.com
- // +----------------------------------------------------------------------
- // | niucloud团队 版权所有 开源版本可自由商用
- // +----------------------------------------------------------------------
- // | Author: Niucloud Team
- // +----------------------------------------------------------------------
- namespace app\service\api\sys;
- use app\service\core\sys\CoreConfigService;
- use app\service\core\sys\CoreSysConfigService;
- use core\base\BaseApiService;
- /**
- * 配置服务层
- * Class ConfigService
- * @package app\service\core\sys
- */
- class ConfigService extends BaseApiService
- {
- //系统配置文件
- public function __construct()
- {
- parent::__construct();
- }
- /**
- * 获取版权信息(网站整体,不按照站点设置)
- * @return array|mixed
- */
- public function getCopyright()
- {
- return (new CoreSysConfigService())->getCopyright(0);
- }
- /**
- * 获取前端域名
- * @return array|string[]
- */
- public function getSceneDomain()
- {
- return ( new CoreSysConfigService() )->getSceneDomain();
- }
- /**
- * 获取服务信息
- * @return array|mixed
- */
- public function getService()
- {
- $info = ( new CoreConfigService() )->getConfig($this->request->defaultSiteId(), 'SERVICE_INFO');
- if (empty($info)) {
- $info = [];
- $info[ 'value' ] = [
- 'wechat_code' => '',
- 'enterprise_wechat' => '',
- 'tel' => '',
- ];
- }
- return $info[ 'value' ];
- }
- /**
- * 获取手机端首页列表
- * @param $data
- * @return array
- */
- public function getWapIndexList($data = [])
- {
- return ( new CoreSysConfigService() )->getWapIndexList($data);
- }
-
- public function getWebSite()
- {
- $info = ( new CoreConfigService() )->getConfigValue(0,'WEB_SITE_INFO');
- if (empty($info)) {
- $info = [
- 'site_name' => '',
- 'logo' => '',
- 'desc' => '',
- 'latitude' => '',
- 'longitude' => '',
- 'province_id' => 0,
- 'city_id' => 0,
- 'district_id' => 0,
- 'address' => '',
- 'full_address' => '',
- 'phone' => '',
- 'business_hours' => '',
- 'front_end_name' => '',
- 'front_end_logo' => '',
- 'icon' => '',
- ];
- }
- return $info;
- }
- /**
- * 获取地图key
- * @return array|mixed
- */
- public function getMap()
- {
- return (new CoreSysConfigService())->getMap($this->site_id);
- }
- }
|