Register.php 897 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\admin\controller\setting;
  3. use app\common\basics\AdminBase;
  4. use app\common\server\ConfigServer;
  5. use app\common\server\JsonServer;
  6. class Register extends AdminBase
  7. {
  8. public function index()
  9. {
  10. $config = [
  11. // 'wechat_h5' => ConfigServer::get('login', 'wechat_h5', 0),
  12. 'captcha' => ConfigServer::get('register', 'captcha', 0),
  13. 'growth' => ConfigServer::get('register', 'growth', 0)
  14. ];
  15. return view('', [
  16. 'config' => $config
  17. ]);
  18. }
  19. public function set()
  20. {
  21. $post = $this->request->post();
  22. // ConfigServer::set('login','wechat_h5', $post['wechat_h5']);
  23. // test 再次测试1
  24. ConfigServer::set('register','captcha', $post['captcha']);
  25. ConfigServer::set('register','growth', $post['growth']);
  26. return JsonServer::success('设置成功');
  27. }
  28. }