ConfigService.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\service\api\sys;
  12. use app\service\core\sys\CoreConfigService;
  13. use app\service\core\sys\CoreSysConfigService;
  14. use core\base\BaseApiService;
  15. /**
  16. * 配置服务层
  17. * Class ConfigService
  18. * @package app\service\core\sys
  19. */
  20. class ConfigService extends BaseApiService
  21. {
  22. //系统配置文件
  23. public function __construct()
  24. {
  25. parent::__construct();
  26. }
  27. /**
  28. * 获取版权信息(网站整体,不按照站点设置)
  29. * @return array|mixed
  30. */
  31. public function getCopyright()
  32. {
  33. return (new CoreSysConfigService())->getCopyright(0);
  34. }
  35. /**
  36. * 获取手机端首页列表
  37. * @param $data
  38. * @return array
  39. */
  40. public function getWapIndexList($data = [])
  41. {
  42. return ( new CoreSysConfigService() )->getWapIndexList($data);
  43. }
  44. public function getWebSite()
  45. {
  46. $info = ( new CoreConfigService() )->getConfigValue(0,'WEB_SITE_INFO');
  47. if (empty($info)) {
  48. $info = [
  49. 'site_name' => '',
  50. 'logo' => '',
  51. 'desc' => '',
  52. 'latitude' => '',
  53. 'longitude' => '',
  54. 'province_id' => 0,
  55. 'city_id' => 0,
  56. 'district_id' => 0,
  57. 'address' => '',
  58. 'full_address' => '',
  59. 'phone' => '',
  60. 'business_hours' => '',
  61. 'front_end_name' => '',
  62. 'front_end_logo' => '',
  63. 'icon' => '',
  64. ];
  65. }
  66. return $info;
  67. }
  68. /**
  69. * 获取地图key
  70. * @return array|mixed
  71. */
  72. public function getMap()
  73. {
  74. return (new CoreSysConfigService())->getMap($this->site_id);
  75. }
  76. }