Config.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
  9. * 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
  10. * =========================================================
  11. */
  12. namespace addon\store\api\controller;
  13. use addon\store\model\Config as ConfigModel;
  14. use app\api\controller\BaseApi;
  15. class Config extends BaseApi
  16. {
  17. /**
  18. * 门店配置
  19. * @return false|string
  20. */
  21. public function config()
  22. {
  23. $config_model = new ConfigModel();
  24. $business_config = $config_model->getStoreBusinessConfig($this->site_id)[ 'data' ][ 'value' ];
  25. $withdraw_config = $config_model->getStoreWithdrawConfig($this->site_id)[ 'data' ][ 'value' ];
  26. $res = [
  27. 'business_config' => $business_config,
  28. 'withdraw_config' => $withdraw_config
  29. ];
  30. return $this->response($this->success($res));
  31. }
  32. }