Config.php 574 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace addons\ddrive\controller;
  3. use app\common\controller\Api;
  4. /**
  5. * 配置管理
  6. *
  7. * @icon fa fa-circle-o
  8. */
  9. class Config extends Api
  10. {
  11. // 无需登录的接口,*表示全部
  12. protected $noNeedLogin = '*';
  13. // 无需鉴权的接口,*表示全部
  14. protected $noNeedRight = '*';
  15. public function index()
  16. {
  17. $config = get_addon_config('ddrive');
  18. // 去掉敏感信息
  19. unset($config['wx_appid']);
  20. unset($config['wx_secret']);
  21. unset($config['__tips__']);
  22. $this->success("", $config);
  23. }
  24. }