DiyConfigService.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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\admin\diy;
  12. use app\model\sys\SysConfig;
  13. use app\service\core\diy\CoreDiyConfigService;
  14. use core\base\BaseAdminService;
  15. use think\Model;
  16. /**
  17. * 自定义页面相关配置服务层
  18. * Class DiyConfigService
  19. * @package app\service\admin\diy
  20. */
  21. class DiyConfigService extends BaseAdminService
  22. {
  23. /**
  24. * 获取底部导航列表
  25. * @param array $params
  26. * @return array|mixed
  27. */
  28. public function getBottomList($params = [])
  29. {
  30. $list = ( new CoreDiyConfigService() )->getBottomList($params);
  31. return $list;
  32. }
  33. /**
  34. * 获取底部导航配置
  35. * @return array
  36. */
  37. public function getBottomConfig()
  38. {
  39. return ( new CoreDiyConfigService() )->getBottomConfig($this->site_id);
  40. }
  41. /**
  42. * 底部导航配置
  43. * @param $data
  44. * @return SysConfig|bool|Model
  45. */
  46. public function setBottomConfig($data)
  47. {
  48. return ( new CoreDiyConfigService() )->setBottomConfig($this->site_id, $data);
  49. }
  50. /**
  51. * 设置启动页
  52. * @param $data
  53. * @return SysConfig|bool|Model
  54. */
  55. public function setStartUpPageConfig($data)
  56. {
  57. return ( new CoreDiyConfigService() )->setStartUpPageConfig($this->site_id, $data);
  58. }
  59. /**
  60. * 获取启动页配置
  61. * @param $name
  62. * @return array
  63. */
  64. public function getStartUpPageConfig($name)
  65. {
  66. return ( new CoreDiyConfigService() )->getStartUpPageConfig($this->site_id, $name);
  67. }
  68. }