Baseconfig.php 914 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 基础配置接口
  7. */
  8. class Baseconfig extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. public function index(){
  13. $config = [
  14. 'appversion' => config('site.appversion'),
  15. 'name' => config('site.name'),
  16. ];
  17. $config['kefu_mobile'] = config('site.kefu_mobile');
  18. $config['kefu_time'] = config('site.kefu_time');
  19. $config['kefu_qq'] = config('site.kefu_qq');
  20. $config['kefu_weixin'] = localpath_to_netpath(config('site.kefu_weixin'));
  21. $config['index_dingwei'] = config('site.index_dingwei');
  22. $config['app_wechatpay'] = config('site.app_wechatpay');
  23. $config['usercenter_image'] = localpath_to_netpath(config('site.usercenter_image'));
  24. $this->success('success',$config);
  25. }
  26. }