截流自动化的商城平台
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.

Setting.php 888B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\admin\controller\team;
  3. use app\common\basics\AdminBase;
  4. use app\common\server\ConfigServer;
  5. use app\common\server\JsonServer;
  6. use think\facade\View;
  7. class Setting extends AdminBase
  8. {
  9. /**
  10. * @Notes: 拼团设置页
  11. * @Author: 张无忌
  12. * @return \think\response\View
  13. */
  14. public function index()
  15. {
  16. $automatic = ConfigServer::get('team', 'automatic', 0);
  17. View::assign('automatic', $automatic);
  18. return view();
  19. }
  20. /**
  21. * @Notes: 设置拼团
  22. * @Author: 张无忌
  23. */
  24. public function set()
  25. {
  26. if ($this->request->isAjax()) {
  27. $automatic = $this->request->post('automatic', 0, 'intval');
  28. ConfigServer::set('team', 'automatic', $automatic);
  29. return JsonServer::success('设置成功');
  30. }
  31. return JsonServer::error('异常');
  32. }
  33. }