ConfigController.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\adminapi\controller;
  20. use app\adminapi\logic\auth\AuthLogic;
  21. use app\adminapi\logic\ConfigLogic;
  22. use think\facade\Config;
  23. /**
  24. * 配置控制器
  25. * Class ConfigController
  26. * @package app\adminapi\controller
  27. */
  28. class ConfigController extends BaseAdminController
  29. {
  30. public array $notNeedLogin = ['getConfig'];
  31. /**
  32. * @notes 获取配置
  33. * @return \think\response\Json
  34. * @author cjhao
  35. * @date 2021/8/19 16:29
  36. */
  37. public function getConfig()
  38. {
  39. $data = ConfigLogic::getConfig();
  40. return $this->data($data);
  41. }
  42. /**
  43. * @notes 获取菜单
  44. * @return \think\response\Json
  45. * @author cjhao
  46. * @date 2021/8/25 17:46
  47. */
  48. public function getMenu()
  49. {
  50. $auth = AuthLogic::getMenu('menu');
  51. return $this->data($auth);
  52. }
  53. /**
  54. * @notes 获取权限
  55. * @return \think\response\Json
  56. * @author cjhao
  57. * @date 2021/8/25 19:32
  58. */
  59. public function getAuth()
  60. {
  61. $data = ConfigLogic::getAuth($this->adminInfo);
  62. return $this->data($data);
  63. }
  64. /**
  65. * @notes 获取营销模块接口
  66. * @return \think\response\Jon
  67. * @author cjhao
  68. * @date 2021/9/8 17:19
  69. */
  70. public function getMarketingModule()
  71. {
  72. $data = ConfigLogic::getMarketingModule();
  73. return $this->data($data);
  74. }
  75. /**
  76. * @notes 获取应用中心模块接口
  77. * @return \think\response\Json
  78. * @author cjhao
  79. * @date 2021/9/24 16:58
  80. */
  81. public function getAppModule()
  82. {
  83. $data = ConfigLogic::getAppModule();
  84. return $this->data($data);
  85. }
  86. /**
  87. * @notes 正版检测
  88. * @return \think\response\Json
  89. * @author ljj
  90. * @date 2023/5/16 11:49 上午
  91. */
  92. public function checkLegal()
  93. {
  94. $data = ConfigLogic::checkLegal();
  95. return $this->data($data);
  96. }
  97. }