Config.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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\adminapi\controller\diy;
  12. use app\service\admin\diy\DiyConfigService;
  13. use core\base\BaseAdminController;
  14. use think\Response;
  15. /**
  16. * 自定义配置相关
  17. * Class Config
  18. * @package app\adminapi\controller\diy
  19. */
  20. class Config extends BaseAdminController
  21. {
  22. /**
  23. * 获取底部导航列表
  24. * @return Response
  25. */
  26. public function getBottomList()
  27. {
  28. return success(( new DiyConfigService() )->getBottomList());
  29. }
  30. /**
  31. * 获取底部导航
  32. * @return Response
  33. */
  34. public function getBottomConfig()
  35. {
  36. return success(( new DiyConfigService() )->getBottomConfig());
  37. }
  38. /**
  39. * 设置底部导航
  40. * @return Response
  41. */
  42. public function setBottomConfig()
  43. {
  44. $data = $this->request->params([
  45. [ 'value', [] ],
  46. ]);
  47. ( new DiyConfigService() )->setBottomConfig($data[ 'value' ]);
  48. return success();
  49. }
  50. }