Diy.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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\api\controller\diy;
  12. use app\service\api\diy\AdvService;
  13. use app\service\api\diy\DiyConfigService;
  14. use app\service\api\diy\DiyRouteService;
  15. use app\service\api\diy\DiyService;
  16. use core\base\BaseApiController;
  17. use think\Response;
  18. class Diy extends BaseApiController
  19. {
  20. /**
  21. * 自定义页面信息
  22. * @return Response
  23. */
  24. public function info()
  25. {
  26. $params = $this->request->params([
  27. [ 'id', '' ],
  28. [ 'name', '' ],
  29. [ 'site_id', 0 ]
  30. ]);
  31. return success(( new DiyService() )->getInfo($params));
  32. }
  33. /**
  34. * 底部菜单信息
  35. * @return Response
  36. */
  37. public function tabbarList()
  38. {
  39. $params = $this->request->params([
  40. [ 'key', '' ],
  41. ]);
  42. return success(( new DiyConfigService() )->getBottomList($params));
  43. }
  44. /**
  45. * 底部菜单信息
  46. * @return Response
  47. */
  48. public function tabbar()
  49. {
  50. return success(( new DiyConfigService() )->getBottomConfig());
  51. }
  52. /**
  53. * 分享内容
  54. * @return Response
  55. */
  56. public function share()
  57. {
  58. $data = $this->request->params([
  59. [ 'route', '' ],
  60. [ 'params', '' ]
  61. ]);
  62. return success(( new DiyRouteService() )->getShare($data));
  63. }
  64. public function getAdv()
  65. {
  66. $data = $this->request->params([
  67. [ 'ap_key', '' ]
  68. ]);
  69. return success(( new AdvService() )->getInfo($data[ 'ap_key' ]));
  70. }
  71. }