Config.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace app\shopapi\controller;
  11. use app\model\web\Config as ConfigModel;
  12. class Config extends BaseApi
  13. {
  14. /**
  15. * 详情信息
  16. */
  17. public function defaultimg()
  18. {
  19. $upload_config_model = new ConfigModel();
  20. $res = $upload_config_model->getDefaultImg($this->site_id);
  21. if (!empty($res[ 'data' ][ 'value' ])) {
  22. return $this->response($this->success($res[ 'data' ][ 'value' ]));
  23. } else {
  24. return $this->response($this->error());
  25. }
  26. }
  27. /**
  28. * 版权信息
  29. */
  30. public function copyright()
  31. {
  32. $config_model = new ConfigModel();
  33. $res = $config_model->getCopyright();
  34. return $this->response($this->success($res[ 'data' ][ 'value' ]));
  35. }
  36. /**
  37. * 查询验证码设置
  38. * @return false|string
  39. */
  40. public function captchaConfig()
  41. {
  42. $config_model = new ConfigModel();
  43. $config_info = $config_model->getCaptchaConfig();
  44. return $this->response($this->success($config_info[ 'data' ][ 'value' ]));
  45. }
  46. }