截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommunitySetting.php 975B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\admin\controller\community;
  3. use app\admin\logic\community\CommunitySettingLogic;
  4. use app\common\basics\AdminBase;
  5. use app\common\server\JsonServer;
  6. /**
  7. * 种草社区设置
  8. * Class CommunityTopic
  9. * @package app\admin\controller\content
  10. */
  11. class CommunitySetting extends AdminBase
  12. {
  13. /**
  14. * @notes 社区配置
  15. * @return \think\response\Json|\think\response\View
  16. * @throws \think\db\exception\DataNotFoundException
  17. * @throws \think\db\exception\DbException
  18. * @throws \think\db\exception\ModelNotFoundException
  19. * @author 段誉
  20. * @date 2022/4/28 16:16
  21. */
  22. public function setting()
  23. {
  24. if ($this->request->isAjax()) {
  25. $post = $this->request->post();
  26. CommunitySettingLogic::setConfig($post);
  27. return JsonServer::success('操作成功');
  28. }
  29. $config = CommunitySettingLogic::getConfig();
  30. return view('', ['config' => $config]);
  31. }
  32. }