ConfigController.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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\shopapi\controller;
  20. use app\common\service\ConfigService;
  21. use app\shopapi\logic\ConfigLogic;
  22. /**
  23. * 配置控制器
  24. * Class ConfigController
  25. * @package app\shopapi\controller
  26. */
  27. class ConfigController extends BaseShopController
  28. {
  29. public array $notNeedLogin = ['getconfig','getLoginContent', 'getPolicyAgreement','getKefuConfig','getShareConfig'];
  30. /**
  31. * @notes 获取商城配置
  32. * @return \think\response\Json
  33. * @author cjhao
  34. * @date 2021/8/28 17:23
  35. */
  36. public function getConfig()
  37. {
  38. $data = (new ConfigLogic())->getConfig();
  39. return $this->success('',$data);
  40. }
  41. public function getLoginContent()
  42. {
  43. $data = (new ConfigLogic())->getLoginContentConfig();
  44. return $this->success('',$data);
  45. }
  46. /**
  47. * @notes 获取政策协议
  48. * @return \think\response\Json
  49. * @author Tab
  50. * @date 2021/7/28 16:06
  51. */
  52. public function getPolicyAgreement()
  53. {
  54. $result = (new ConfigLogic())->getPolicyAgreement();
  55. return $this->data($result);
  56. }
  57. /**
  58. * @notes 版权资质
  59. * @return \think\response\Json
  60. * @author ljj
  61. * @date 2022/2/22 11:49 上午
  62. */
  63. public function copyright()
  64. {
  65. $result = (new ConfigLogic())->copyright();
  66. return $this->success('',$result);
  67. }
  68. /**
  69. * @notes 获取客服配置
  70. * @return \think\response\Json
  71. * @author ljj
  72. * @date 2024/8/28 下午4:07
  73. */
  74. public function getKefuConfig()
  75. {
  76. $result = (new ConfigLogic())->getKefuConfig();
  77. return $this->data($result);
  78. }
  79. /**
  80. * @notes 获取分享配置
  81. * @return \think\response\Json
  82. * @throws \think\db\exception\DataNotFoundException
  83. * @throws \think\db\exception\DbException
  84. * @throws \think\db\exception\ModelNotFoundException
  85. * @author ljj
  86. * @date 2024/9/11 下午3:20
  87. */
  88. public function getShareConfig()
  89. {
  90. $result = (new ConfigLogic())->getShareConfig();
  91. return $this->data($result);
  92. }
  93. }