ConfigLogic.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace app\businessapi\logic;
  3. use app\common\{service\ConfigService, service\FileService};
  4. // +----------------------------------------------------------------------
  5. // | likeshop100%开源免费商用商城系统
  6. // +----------------------------------------------------------------------
  7. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  8. // | 开源版本可自由商用,可去除界面版权logo
  9. // | 商业版本务必购买商业授权,以免引起法律纠纷
  10. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  11. // | gitee下载:https://gitee.com/likeshop_gitee
  12. // | github下载:https://github.com/likeshop-github
  13. // | 访问官网:https://www.likeshop.cn
  14. // | 访问社区:https://home.likeshop.cn
  15. // | 访问手册:http://doc.likeshop.cn
  16. // | 微信公众号:likeshop技术社区
  17. // | likeshop团队 版权所有 拥有最终解释权
  18. // +----------------------------------------------------------------------
  19. // | author: likeshopTeam
  20. // +----------------------------------------------------------------------
  21. /**
  22. * 配置类逻辑层
  23. * Class ConfigLogic
  24. * @package app\adminapi\logic
  25. */
  26. class ConfigLogic
  27. {
  28. /**
  29. * @notes 获取配置
  30. * @return array
  31. * @author cjhao
  32. * @date 2021/8/19 16:28
  33. */
  34. public static function getConfig():array
  35. {
  36. $data = [
  37. 'oss_domain' => FileService::getFileUrl(),
  38. 'copyright' => ConfigService::get('shop', 'copyright', ''),
  39. 'record_number' => ConfigService::get('shop', 'record_number', ''),
  40. 'record_system_link' => ConfigService::get('shop', 'record_system_link', ''),
  41. 'name' => ConfigService::get('shop', 'name'),
  42. 'logo' => FileService::getFileUrl(ConfigService::get('shop', 'logo')),
  43. 'admin_login_image' => FileService::getFileUrl(ConfigService::get('shop', 'admin_login_image')),
  44. 'favicon' => FileService::getFileUrl(ConfigService::get('shop','favicon'))
  45. ];
  46. return $data;
  47. }
  48. }