ShopSettingController.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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\settings\shop;
  20. use app\adminapi\controller\BaseAdminController;
  21. use app\adminapi\logic\settings\shop\ShopSettingLogic;
  22. use app\adminapi\validate\settings\shop\ShopSettingsValidate;
  23. /**
  24. * 店铺设置控制器
  25. * Class ShopSettingController
  26. * @package app\adminapi\controller\settings\shop
  27. */
  28. class ShopSettingController extends BaseAdminController
  29. {
  30. /**
  31. * @notes 获取店铺信息
  32. * @return \think\response\Json
  33. * @author Tab
  34. * @date 2021/7/28 14:17
  35. */
  36. public function getShopInfo()
  37. {
  38. $result = ShopSettingLogic::getShopInfo();
  39. return $this->data($result);
  40. }
  41. /**
  42. * @notes 设置店铺信息
  43. * @return \think\response\Json
  44. * @author Tab
  45. * @date 2021/7/28 14:42
  46. */
  47. public function setShopInfo()
  48. {
  49. $params = (new ShopSettingsValidate())->post()->goCheck('setShopInfo');
  50. ShopSettingLogic::setShopInfo($params);
  51. return $this->success('设置成功');
  52. }
  53. /**
  54. * @notes 获取备案信息
  55. * @return \think\response\Json
  56. * @author Tab
  57. * @date 2021/7/28 15:01
  58. */
  59. public function getRecordInfo()
  60. {
  61. $result = ShopSettingLogic::getRecordInfo();
  62. return $this->data($result);
  63. }
  64. /**
  65. * @notes 设置备案信息
  66. * @return \think\response\Json
  67. * @author Tab
  68. * @date 2021/7/28 15:22
  69. */
  70. public function setRecordInfo()
  71. {
  72. $params = $this->request->post();
  73. ShopSettingLogic::setRecordInfo($params);
  74. return $this->success('设置成功');
  75. }
  76. /**
  77. * @notes 获取分享设置
  78. * @return \think\response\Json
  79. * @author Tab
  80. * @date 2021/7/28 15:25
  81. */
  82. public function getShareSetting()
  83. {
  84. $result = ShopSettingLogic::getShareSetting();
  85. return $this->data($result);
  86. }
  87. /**
  88. * @notes 分享设置
  89. * @return \think\response\Json
  90. * @author Tab
  91. * @date 2021/7/28 15:38
  92. */
  93. public function setShareSetting()
  94. {
  95. $params = (new ShopSettingsValidate())->post()->goCheck('setShareSetting');
  96. ShopSettingLogic::setShareSetting($params);
  97. return $this->success('设置成功');
  98. }
  99. /**
  100. * @notes 获取政策协议
  101. * @return \think\response\Json
  102. * @author Tab
  103. * @date 2021/7/28 16:06
  104. */
  105. public function getPolicyAgreement()
  106. {
  107. $result = ShopSettingLogic::getPolicyAgreement();
  108. return $this->data($result);
  109. }
  110. /**
  111. * @notes 设置政策协议
  112. * @return \think\response\Json
  113. * @author Tab
  114. * @date 2021/7/28 16:11
  115. */
  116. public function setPolicyAgreement()
  117. {
  118. $params = $this->request->post();
  119. ShopSettingLogic::setPolicyAgreement($params);
  120. return $this->success('设置成功');
  121. }
  122. /**
  123. * @notes 设置地图秘钥
  124. * @return \think\response\Json
  125. * @author ljj
  126. * @date 2022/3/10 5:12 下午
  127. */
  128. public function setMapKey()
  129. {
  130. $params = $this->request->post();
  131. ShopSettingLogic::setMapKey($params);
  132. return $this->success('设置成功');
  133. }
  134. /**
  135. * @notes 获取地图秘钥
  136. * @return \think\response\Json
  137. * @author ljj
  138. * @date 2022/3/10 5:12 下午
  139. */
  140. public function getMapKey()
  141. {
  142. $result = ShopSettingLogic::getMapKey();
  143. return $this->data($result);
  144. }
  145. /**
  146. * @notes 获取站点统计配置
  147. * @return \think\response\Json
  148. * @author yfdong
  149. * @date 2024/09/20 22:24
  150. */
  151. public function getSiteStatistics()
  152. {
  153. $result = ShopSettingLogic::getSiteStatistics();
  154. return $this->data($result);
  155. }
  156. /**
  157. * @notes 获取站点统计配置
  158. * @return \think\response\Json
  159. * @author yfdong
  160. * @date 2024/09/20 22:51
  161. */
  162. public function setSiteStatistics()
  163. {
  164. $params = $this->request->post();
  165. ShopSettingLogic::setSiteStatistics($params);
  166. return $this->success('设置成功', [], 1, 1);
  167. }
  168. }